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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@draw.io>2022-09-19 15:32:42 +0300
committerDavid Benson <david@draw.io>2022-09-19 15:32:42 +0300
commit5383c20e947fd772668316e407edc5d5db4850db (patch)
treeb1b262e2f2d1607157e4a153576f528db37eb0fd
parentea012baba6fb2e903797fa6306833ca4f31ab361 (diff)
20.3.3 releasev20.3.3
-rw-r--r--ChangeLog8
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/electron.js4
-rw-r--r--src/main/webapp/index.html4
-rw-r--r--src/main/webapp/js/app.min.js4396
-rw-r--r--src/main/webapp/js/diagramly/App.js1166
-rw-r--r--src/main/webapp/js/diagramly/Devel.js6
-rw-r--r--src/main/webapp/js/diagramly/Editor.js7
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js231
-rw-r--r--src/main/webapp/js/diagramly/Menus.js57
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js43
-rw-r--r--src/main/webapp/js/grapheditor/Actions.js4
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js23
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js21
-rw-r--r--src/main/webapp/js/grapheditor/Format.js2
-rw-r--r--src/main/webapp/js/grapheditor/Graph.js52
-rw-r--r--src/main/webapp/js/grapheditor/Menus.js4
-rw-r--r--src/main/webapp/js/integrate.min.js3464
-rw-r--r--src/main/webapp/js/viewer-static.min.js4044
-rw-r--r--src/main/webapp/js/viewer.min.js4044
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/resources/dia_fr.txt38
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
-rw-r--r--src/main/webapp/shortcuts.svg2
-rw-r--r--src/main/webapp/teams.html4
26 files changed, 8923 insertions, 8709 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d534deb..a2911eb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+19-SEP-2022: 20.3.3
+
+- Replaces CSS classname in live UI refresh to avoid extension clash [DS-909]
+
+16-SEP-2022: 20.3.2
+
+- Keep SVG content attribute in DOMPurify [DID-6193]
+
15-SEP-2022: 20.3.1
- Multiple commits preparing for live UI switch [DS-909]
diff --git a/VERSION b/VERSION
index 7639d857..908e4308 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.3.1 \ No newline at end of file
+20.3.3 \ No newline at end of file
diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js
index 0d44fdab..40becf28 100644
--- a/src/main/webapp/electron.js
+++ b/src/main/webapp/electron.js
@@ -1871,7 +1871,7 @@ async function saveDraft(fileObject, data)
try
{
// Add Hidden attribute:
- spawn("attrib", ["+h", draftFileName]);
+ spawn('attrib', ['+h', draftFileName], {shell: true});
} catch(e) {}
}
@@ -1974,7 +1974,7 @@ async function saveFile(fileObject, data, origStat, overwrite, defEnc)
try
{
// Add Hidden attribute:
- spawn("attrib", ["+h", bkpPath]);
+ spawn('attrib', ['+h', bkpPath], {shell: true});
} catch(e) {}
}
}
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 6e4793f3..ed50f10a 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -379,8 +379,8 @@
padding-top:0px;
}
.geEditor *:not(.geScrollable)::-webkit-scrollbar {
- width:14px;
- height:14px;
+ width:10px;
+ height:10px;
}
.geEditor ::-webkit-scrollbar-track {
background-clip:padding-box;
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 79af176c..92c6c5e2 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2098,17 +2098,18 @@ this.backgroundPageShape.init(k.container),u.style.position="absolute",k.contain
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(k.isGridEnabled()||k.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=k.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
")";var x=u=0;null!=k.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=k.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=r,k.view.backgroundPageShape.node.style.backgroundImage=m,k.view.backgroundPageShape.node.style.backgroundColor=n,k.view.backgroundPageShape.node.style.borderColor=
-k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+
-" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();
-n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),
-Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks);
-k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
-f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay=
+k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"sketch"!=Editor.currentTheme?k.container.style.backgroundColor="":k.container.style.backgroundColor=k.sketchBackgroundColor):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=k.background&&k.background!=mxConstants.NONE||Editor.isDarkMode()||"sketch"!=Editor.currentTheme?u.style.backgroundColor=
+n:u.style.backgroundColor=k.sketchBackgroundColor)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+
+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*
+this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);
+null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,
+this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks);k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=
+this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};
+mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,
+u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,
+arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),
+this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),
+r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay=
0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(O,T){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
@@ -2214,7 +2215,7 @@ a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-orig
0==this.dialogs.length)if(!a.scrollbars&&!ha&&a.isScrollWheelEvent(J))ha=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ha.x+(ba?-na:na),ha.y):a.view.setTranslate(ha.x,ha.y+(ba?na:-na));else if(ha||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ha,ha=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ha=1+Math.abs(J.deltaY)/20*(ha-1):null!=J.movementY&&"pointermove"==J.type&&(ha=1+Math.max(1,Math.abs(J.movementY))/20*(ha-1),na=-1),a.lazyZoom(ba,null,na,ha),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
-EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
+EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
@@ -2247,12 +2248,11 @@ b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);th
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);
-var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
-this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=
-f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
-e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");
-a&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
+this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2300,8 +2300,8 @@ e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0]
function(x,B,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");
g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",
!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),
-g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),
-g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,
+!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2573,15 +2573,15 @@ Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;fo
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
-Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});
-Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
+Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(a,b){"svg"==a.nodeName&&"content"==b.attrName&&(b.forceKeepAttr=!0);return a});Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
-Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
-Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.sketchBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
+Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
@@ -2603,7 +2603,7 @@ this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(thi
mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform",
"scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;
k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(a,b,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.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(a,b,f){var e=b.getAttribute("href");e!=Graph.sanitizeLink(e)&&Graph.sanitizeNode(b);if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),a);mxEvent.consume(f)}};
Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)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 g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
@@ -2651,7 +2651,7 @@ this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=nu
!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&&
mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var Y=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(Y=Q.parent.getIndex(Q),this.model.add(Q.parent,P,Y))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(Y=a.parent.getIndex(a),this.model.add(a.parent,
S,Y));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);k(m+r.x*f,B+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
@@ -2669,7 +2669,7 @@ Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlan
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)(Graph.translateDiagram&&
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=Graph.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)(Graph.translateDiagram&&
"label"==a[g].nodeName||0>mxUtils.indexOf(f,a[g].nodeName))&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+mxUtils.htmlEntities(e[g].name)+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
b+"</div>"))}}return b};Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
@@ -2960,7 +2960,7 @@ Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.widt
Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("format").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
"none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
@@ -3538,7 +3538,7 @@ var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x
null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var Y=Q[F];if("0"!=d.getCurrentCellStyle(Y).expand){var ja=d.getModel().getGeometry(Y);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(Y,ja))}null!=N&&f(Y,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&
!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,I){f(m,D,F,I,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-n=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),
+n=this.addAction("format",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return e.isFormatPanelVisible()}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),
this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=
d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};
Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
@@ -3566,10 +3566,10 @@ null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(th
g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
-g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
+new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["format"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["format"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
+["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};Menus.prototype.get=function(a){return this.menus[a]};
+Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
@@ -10672,502 +10672,502 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
-DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
+DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(f){this.sync.cleanup(b,e,f)}),e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=l?this.mergeFile(l,b,e,c):this.reloadFile(b,
-e))}catch(m){null!=e&&e(m)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),v=b.getShadowPages();if(null!=v&&0<v.length){var x=[this.ui.diffPages(null!=c?c:m,v)],E=this.ignorePatches(x);this.setShadowPages(v);if(E)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",E);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};E={};var d=this.ui.patchPages(m,x[0]),g=this.ui.getHashValueForPages(d,
-c),k=this.ui.getHashValueForPages(v,E);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",x,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(v)),q=this.compressReportData(this.getAnonymizedXmlForPages(d)),p=this.ui.hashValue(b.getCurrentEtag()),y=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,x,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(E)+"\nFrom: "+p+"\nTo: "+y+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+q,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var A=this.sync.patchRealtime(x,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==A||mxUtils.isEmptyObject(A)||x.push(A)}this.patch(x,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(I);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var C=this.getCurrentUser(),B=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,I)}}catch(M){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
-DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,v,x){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var E=0;E<e.length;E++)this.ui.anonymizePatch(e[E]);var d=mxUtils.bind(this,function(y){var A=this.compressReportData(JSON.stringify(e,null,2));y=null==y?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(y.data)),
-25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+A+(null!=y?"\n\nRemote:\n"+y:""),null,7E4)});null==c?d(null):this.getLatestVersion(mxUtils.bind(this,function(y){null!=y&&y.getCurrentEtag()==c?d(y):d(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",q=JSON.stringify(e).length,p=null;if(null!=e&&this.constructor==DriveFile&&400>q){for(E=0;E<e.length;E++)this.ui.anonymizePatch(e[E]);
-p=JSON.stringify(e);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(y){try{var A=null!=p?"Report":"Error",C=this.ui.getHashValueForPages(y.getShadowPages());EditorUi.logError("Checksum "+A+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=v?"-current_"+v:"")+(null!=x?
-"-rev_"+this.ui.hashValue(x):"")+(null!=C?"-latest_"+C:"")+(null!=y?"-latestRev_"+this.ui.hashValue(y.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(y){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),v=this.getCurrentUser(),x=null!=v?this.ui.hashValue(v.id):"unknown",E=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),g=d.lastIndexOf(".");v="xml";0<g&&(v=d.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+v+")\nUser="+x+E+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+k+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(n){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),v=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(v,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var x=this.ui.getCurrentFile();null!=x&&(x.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):
-f()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,f){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=e&&e()}),f)};
-DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
-DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,v=this.ui.editor.graph;v.container.style.visibility="hidden";var x=this.changeListenerEnabled;this.changeListenerEnabled=f;var E=v.foldingEnabled,d=v.mathEnabled,g=v.cellRenderer.redraw;v.cellRenderer.redraw=function(k){k.view.graph.isEditing(k.cell)&&(k.view.graph.scrollCellToVisible(k.cell),k.view.graph.cellEditor.resize());g.apply(this,arguments)};v.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{v.container.style.visibility="";v.model.endUpdate();v.cellRenderer.redraw=g;this.changeListenerEnabled=x;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=v.mathEnabled?
-(this.ui.editor.updateGraphComponents(),v.refresh()):(E!=v.foldingEnabled?v.view.revalidate():v.view.validate(),v.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};
-DrawioFile.prototype.save=function(b,e,f,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),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!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(v){if(null!=f)f(v);else throw v;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,f){};
-DrawioFile.prototype.saveFile=function(b,e,f,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,f){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(e){this.sync.cleanup(b,d,e)}),d):this.updateFile(b,d)};
+DrawioFile.prototype.updateFile=function(b,d,e,c){null!=e&&e()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[k]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=k?this.mergeFile(k,b,d,c):this.reloadFile(b,
+d))}catch(m){null!=d&&d(m)}}),d))};
+DrawioFile.prototype.mergeFile=function(b,d,e,c){var k=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),u=b.getShadowPages();if(null!=u&&0<u.length){var z=[this.ui.diffPages(null!=c?c:m,u)],C=this.ignorePatches(z);this.setShadowPages(u);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var A=this.ui.patchPages(m,z[0]),B=this.ui.getHashValueForPages(A,
+c),J=this.ui.getHashValueForPages(u,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",z,"backup",this.backupPatch,"checksum",B,"current",J,"valid",B==J,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=B&&B!=J){var f=this.compressReportData(this.getAnonymizedXmlForPages(u)),g=this.compressReportData(this.getAnonymizedXmlForPages(A)),l=this.ui.hashValue(b.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(e,z,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+B+"\nCurrent: "+J+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+l+"\nTo: "+q+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile",B,J,b.getCurrentRevisionId());return}if(null!=this.sync){var t=this.sync.patchRealtime(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==t||mxUtils.isEmptyObject(t)||z.push(t)}this.patch(z,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=e&&e(F);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var x=this.getCurrentUser(),E=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),E,F)}}catch(G){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),e=d.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var k=d.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
+DrawioFile.prototype.compressReportData=function(b,d,e){d=null!=d?d:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,d,e,c,k,m,u,z){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);var A=mxUtils.bind(this,function(q){var t=this.compressReportData(JSON.stringify(d,null,2));q=null==q?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(q.data)),
+25E3);this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+t+(null!=q?"\n\nRemote:\n"+q:""),null,7E4)});null==c?A(null):this.getLatestVersion(mxUtils.bind(this,function(q){null!=q&&q.getCurrentEtag()==c?A(q):A(null)}),function(){})}else{var B=this.getCurrentUser(),J=null!=B?B.id:"unknown",f=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",g=JSON.stringify(d).length,l=null;if(null!=d&&this.constructor==DriveFile&&400>g){for(C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);
+l=JSON.stringify(d);l=null!=l&&250>l.length?Graph.compress(l):null}this.getLatestVersion(mxUtils.bind(this,function(q){try{var t=null!=l?"Report":"Error",x=this.ui.getHashValueForPages(q.getShadowPages());EditorUi.logError("Checksum "+t+" in "+k+" "+f,null,this.getMode()+"."+this.getId(),"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+(null!=l?"-json_"+l:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=u?"-current_"+u:"")+(null!=z?
+"-rev_"+this.ui.hashValue(z):"")+(null!=x?"-latest_"+x:"")+(null!=q?"-latestRev_"+this.ui.hashValue(q.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+f,action:k,label:"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+"-size_"+this.getSize()})}catch(E){}}),b)}}catch(q){}};
+DrawioFile.prototype.sendErrorReport=function(b,d,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),z=null!=u?this.ui.hashValue(u.id):"unknown",C=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),B=A.lastIndexOf(".");u="xml";0<B&&(u=A.substring(B));var J=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+z+C+"\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!=d?"\n\n"+d:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+J+"\n\nShadow:\n"+k+"\n\nData:\n"+m,c)}catch(f){}};
+DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var c=this.ui.editor.graph,k=c.getSelectionCells(),m=c.getViewState(),u=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(u,m,k);null!=this.backupPatch&&this.patch([this.backupPatch]);var z=this.ui.getCurrentFile();null!=z&&(z.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):
+e()}catch(c){null!=d&&d(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,e){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=d&&d()}),e)};
+DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var e=0;e<b.length&&d;e++)d=d&&mxUtils.isEmptyObject(b[e]);return d};
+DrawioFile.prototype.patch=function(b,d,e){if(null!=b){var c=this.ui.editor.undoManager,k=c.history.slice(),m=c.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var z=this.changeListenerEnabled;this.changeListenerEnabled=e;var C=u.foldingEnabled,A=u.mathEnabled,B=u.cellRenderer.redraw;u.cellRenderer.redraw=function(J){J.view.graph.isEditing(J.cell)&&(J.view.graph.scrollCellToVisible(J.cell),J.view.graph.cellEditor.resize());B.apply(this,arguments)};u.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,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{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=B;this.changeListenerEnabled=z;e||(c.history=k,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)A!=u.mathEnabled?
+(this.ui.editor.updateGraphComponents(),u.refresh()):(C!=u.foldingEnabled?u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",e)}return b};
+DrawioFile.prototype.save=function(b,d,e,c,k,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",k,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=e)e({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=e)e(u);else throw u;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,e){};
+DrawioFile.prototype.saveFile=function(b,d,e,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(f){for(var c=0;null!=f&&c<f.length;c++){var l=f[c];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(e){for(var c=0;null!=e&&c<e.length;c++){var k=e[c];null!=k.id&&0==k.id.indexOf("extFont_")&&k.parentNode.removeChild(k)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(f){b(f)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(e){b(e)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
-DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};
-DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
+DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};
+DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>");e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length&&(e[0].style.cursor="pointer",mxEvent.addListener(e[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{e=this.getErrorMessage(b);if(null==e&&null!=this.lastSaved){var f=this.ui.timeSince(new Date(this.lastSaved));null!=f&&(e=mxResources.get("lastSaved",[f]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+
-e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+'"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
+"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var e=this.ui.timeSince(new Date(this.lastSaved));null!=e&&(d=mxResources.get("lastSaved",[e]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
+d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
0))}};
-DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();e=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(f){"IMG"!=mxEvent.getSource(f).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(e){"IMG"!=mxEvent.getSource(e).nodeName&&
b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,e,f){null==f&&(f=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,e)}),f),this.ui.showError(mxResources.get("warning")+" ("+f+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,e,f){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");e=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==f?window.location.reload():window.location.href=
-f});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-e)}};
+DrawioFile.prototype.showRefreshDialog=function(b,d,e){null==e&&(e=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),e),this.ui.showError(mxResources.get("warning")+" ("+e+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,d,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=d&&(c+=" ("+d+")");d=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():window.location.href=
+e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+d)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(v){this.handleFileError(v,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,l):this.invalidChecksum?this.showRefreshDialog(f,c,this.getErrorMessage(b)):e?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(f,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){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(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(E){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=c&&c(E);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,E);else{var v=this.getCurrentUser(),x=null!=v?v.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),x,E)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision();
-m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(v){this.autosaveCompleted();null!=f&&f(v)}),mxUtils.bind(this,function(v){null!=c&&c(v)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.handleConflictError=function(b,d){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(u){this.handleFileError(u,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,c,k):this.invalidChecksum?this.showRefreshDialog(e,c,this.getErrorMessage(b)):d?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(e,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){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(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(e){b(d,e)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,d,e,c,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=e&&e()):this.sync.fileSaved(m,d,e,c,k)}catch(C){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=c&&c(C);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,C);else{var u=this.getCurrentUser(),z=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),z,C)}}catch(A){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,d,e,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",k,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision();
+m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(u){this.autosaveCompleted();null!=e&&e(u)}),mxUtils.bind(this,function(u){null!=c&&c(u)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",k,"delay",b,"saving",this.savingFile);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=e.lastIndexOf(".");return b===(0<f?e.substring(f):"")}return b==e};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var e=b.lastIndexOf(".");b=0<e?b.substring(e):"";e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return b==d};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,l,m){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,f){this.saveAs(this.title,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var v=this.getData(),x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),E=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
-function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);this.desc.lastModified==q.lastModified?n.write(m?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var y=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(v,y,x,g);this.removeDraft()}catch(A){g(A)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;g(q)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,m?"image/png":"text/xml",m);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));x()}});m?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){E(d)}),c,this.ui.getCurrentFile()!=this?v:null,e.scale,e.border)):E(v)};
-LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
-StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,f)};
-StorageFile.insertFile=function(b,e,f,c,l){var m=mxUtils.bind(this,function(v){var x=function(){var E=new StorageFile(b,f,e);E.saveFile(e,!1,function(){c(E)},l)};v?b.confirm(mxResources.get("replaceIt",[e]),x,l):x()});StorageFile.getFileContent(b,e,function(v){m(null!=v)},function(){m(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};
-StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(l){f(null!=l?{title:e}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,e,f,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var v=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:v.length,lastModified:Date.now(),type:this.type},{title:this.title,data:v}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-v,m):null!=c&&c()}),["filesInfo","files"])}catch(x){null!=c&&c(x)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()};
-StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),m,f):m()}),f):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
-StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(new StorageFile(this.ui,f,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),v=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||v)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e};
-StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;c<e.length;c++){var l=e[c],m=localStorage.getItem(l.title);b.add({title:l.title,data:m});f.add(l)}};
-StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var m=[];if(null!=l)for(var v=0;v<l.length;v++)"."==l[v].title.charAt(0)||null!=e&&l[v].type!=e||m.push(l[v]);f(m)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
-RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,e){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,e,c,k,m){DrawioFile.call(this,b,d);this.title=e;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalFile.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
+LocalFile.prototype.saveFile=function(b,d,e,c,k){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var u=this.getData(),z=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),C=mxUtils.bind(this,function(A){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var B=mxUtils.bind(this,
+function(f){this.savingFile=!1;null!=c&&c({error:f})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[g],"conflict",this.desc.lastModified!=g.lastModified);this.desc.lastModified==g.lastModified?f.write(m?this.ui.base64ToBlob(A,"image/png"):A).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(l){try{var q=this.desc;this.savingFile=!1;this.desc=l;this.fileSaved(u,q,z,B);this.removeDraft()}catch(t){B(t)}}),B)}),B)}),B):(this.inConflictState=!0,B())}),mxUtils.bind(this,function(g){this.invalidFileHandle=!0;B(g)}))}),B)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(A,b,m?"image/png":"text/xml",m);else if(A.length<MAX_REQUEST_SIZE){var J=b.lastIndexOf(".");J=0<J?b.substring(J+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+J+"&xml="+encodeURIComponent(A)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(A)}));z()}});m?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(A){C(A)}),c,this.ui.getCurrentFile()!=this?u:null,d.scale,d.border)):C(u)};
+LocalFile.prototype.rename=function(b,d,e){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,d,e){LocalFile.call(this,b,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,d,e){DrawioFile.call(this,b,d);this.title=e};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,d,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(b,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,d,e)};
+StorageFile.insertFile=function(b,d,e,c,k){var m=mxUtils.bind(this,function(u){var z=function(){var C=new StorageFile(b,e,d);C.saveFile(d,!1,function(){c(C)},k)};u?b.confirm(mxResources.get("replaceIt",[d]),z,k):z()});StorageFile.getFileContent(b,d,function(u){m(null!=u)},function(){m(!1)})};StorageFile.getFileContent=function(b,d,e,c){b.getDatabaseItem(d,function(k){e(null!=k?k.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,e):null!=c&&c()}),"files")};
+StorageFile.getFileInfo=function(b,d,e,c){b.getDatabaseItem(d,function(k){e(k)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,function(k){e(null!=k?{title:d}:null)}):null!=c&&c()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,d,e,c){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()});this.setShadowModified(!1);var u=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:u.length,lastModified:Date.now(),type:this.type},{title:this.title,data:u}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+u,m):null!=c&&c()}),["filesInfo","files"])}catch(z){null!=c&&c(z)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),k,c):k()}),c)}else null!=e&&e()};
+StorageFile.prototype.rename=function(b,d,e){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,d)}),e)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[b]),m,e):m()}),e):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.getLatestVersion=function(b,d){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(e){b(new StorageFile(this.ui,e,this.title))}),d)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var d=[],e=0;e<localStorage.length;e++){var c=localStorage.key(e),k=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<k.length){var m=(null==b||"F"==b)&&("<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12)),u=(null==b||"L"==b)&&"<mxlibrary>"===k.substring(0,11);(m||u)&&d.push({title:c,type:m?"F":"L",size:k.length,lastModified:Date.now()})}}return d};
+StorageFile.migrate=function(b){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var e=b.transaction(["files","filesInfo"],"readwrite");b=e.objectStore("files");e=e.objectStore("filesInfo");for(var c=0;c<d.length;c++){var k=d[c],m=localStorage.getItem(k.title);b.add({title:k.title,data:m});e.add(k)}};
+StorageFile.listFiles=function(b,d,e,c){b.getDatabaseItems(function(k){var m=[];if(null!=k)for(var u=0;u<k.length;u++)"."==k[u].title.charAt(0)||null!=d&&k[u].type!=d||m.push(k[u]);e(m)},function(){null==b.database?e(StorageFile.listLocalStorageFiles(d)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,d,e,c){b.removeDatabaseItem([d,d],e,function(){null==b.database?(localStorage.removeItem(d),e()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,d,e){StorageFile.call(this,b,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,d,e){DrawioFile.call(this,b,d);this.title=e;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,d,e){RemoteFile.call(this,b,d,e.title);this.libObj=e};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,d,e){};
+RemoteLibrary.prototype.saveAs=function(b,d,e){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,d,e){StorageFile.call(this,b,d,e);b=e;d=b.lastIndexOf("/");0<=d&&(b=b.substring(d+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,d,e){return!1};UrlLibrary.prototype.saveAs=function(b,d,e){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,d,e){DrawioFile.call(this,b,d);this.desc=e||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(k,n,q,p,y,A){function C(){mxEvent.addListener(B,"click",null!=A?A:function(){q!=App.MODE_GOOGLE||b.isDriveDomain()?q==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()})):q==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()}),
-function(u){b.spinner.stop();b.handleError(u)}):(b.setMode(q,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}x++;++v>f&&(mxUtils.br(E),v=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height=
-"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,n);B.appendChild(I);if(null!=k){var M=document.createElement("img");M.setAttribute("src",k);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";B.appendChild(M)}else I.style.paddingTop=
-"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=y)for(k=0;k<y.length;k++)mxUtils.br(I),mxUtils.write(I,y[k]);if(null!=p&&null==b[p]){M.style.visibility="hidden";mxUtils.setOpacity(I,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(B);
-var S=window.setTimeout(function(){null==b[p]&&(G.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(u,z){null!=b[p]&&z.getProperty("client")==b[p]&&(window.clearTimeout(S),mxUtils.setOpacity(I,100),M.style.visibility="",G.stop(),C(),"drive"==p&&null!=d.parentNode&&d.parentNode.removeChild(d))}))}else C();E.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
-"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var v=0,x=0,E=document.createElement("div");E.style.paddingTop="2px";m.appendChild(E);var d=document.createElement("p"),g=document.createElement("p");g.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");l.appendChild(g);l.appendChild(m);v=0;"function"===typeof window.DriveClient&&
+var StorageDialog=function(b,d,e){function c(J,f,g,l,q,t){function x(){mxEvent.addListener(E,"click",null!=t?t:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()}),
+function(n){b.spinner.stop();b.handleError(n)}):(b.setMode(g,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}z++;++u>e&&(mxUtils.br(C),u=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height=
+"100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var F=document.createElement("div");F.style.textOverflow="ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,f);E.appendChild(F);if(null!=J){var G=document.createElement("img");G.setAttribute("src",J);G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="60px";G.style.height="60px";G.style.paddingBottom="6px";E.appendChild(G)}else F.style.paddingTop=
+"5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top="6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=q)for(J=0;J<q.length;J++)mxUtils.br(F),mxUtils.write(F,q[J]);if(null!=l&&null==b[l]){G.style.visibility="hidden";mxUtils.setOpacity(F,10);var y=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});y.spin(E);
+var T=window.setTimeout(function(){null==b[l]&&(y.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(n,v){null!=b[l]&&v.getProperty("client")==b[l]&&(window.clearTimeout(T),mxUtils.setOpacity(F,100),G.style.visibility="",y.stop(),x(),"drive"==l&&null!=A.parentNode&&A.parentNode.removeChild(A))}))}else x();C.appendChild(E)}e=null!=e?e:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom=
+"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var u=0,z=0,C=document.createElement("div");C.style.paddingTop="2px";m.appendChild(C);var A=document.createElement("p"),B=document.createElement("p");B.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(B,mxResources.get("saveDiagramsTo")+":");k.appendChild(B);k.appendChild(m);u=0;"function"===typeof window.DriveClient&&
c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");m=document.createElement("span");m.style.position="absolute";m.style.cursor="pointer";m.style.bottom="27px";m.style.color="gray";m.style.userSelect="none";m.style.textAlign="center";m.style.left="50%";mxUtils.setPrefixedStyle(m.style,
-"transform","translate(-50%,0)");mxUtils.write(m,mxResources.get("decideLater"));l.appendChild(m);mxEvent.addListener(m,"click",function(){b.hideDialog();var k=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=k});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(d.style.padding="7px",d.style.fontSize="9pt",d.style.marginTop="-14px",
-d.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(d))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=
-b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=
-IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):
-(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var v=document.createElement("table"),
-x=document.createElement("tbody"),E=document.createElement("tr"),d=document.createElement("td"),g=document.createElement("td");v.setAttribute("align","center");d.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);E.appendChild(d);E.appendChild(g);x.appendChild(E);v.appendChild(x);e.appendChild(v);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
-"18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(q){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){q()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)v=document.createElement("option"),mxUtils.write(v,k[f].displayName),v.value=f,n.appendChild(v),
-v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+k[f].email+">"),v.setAttribute("disabled","disabled"),n.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=k.length;n.appendChild(v);mxEvent.addListener(n,"change",function(){var q=n.value,p=k.length!=q;p&&b.drive.setUser(k[q]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(y){b.handleError(y,null,function(){b.hideDialog();
-b.showSplash()})},!0)});l.appendChild(n)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,v,x,E){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
-m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(e.length));c.appendChild(m);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border=
-"1px solid gray";g.value=mxResources.get("updatingDocument");c.appendChild(g);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var k=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=x?x:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var q=5E5>e.length?g.value:e;if(null!=l)l(q);else if(d)try{var p=b.openLink(q);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=q.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),
-f||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var y=window.open();y=null!=y?y.document:null;null!=y?(y.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),y.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!d||7500<e.length)x=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=E?E:"embed.txt","txt",e,"text/plain")}),x.className="geBtn",m.appendChild(x);if(d&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var q="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});x=document.createElement("img");x.setAttribute("src",Editor.facebookImage);x.setAttribute("width","18");x.setAttribute("height",
-"18");x.setAttribute("border","0");n.appendChild(x);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var q="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
-x=document.createElement("img"),x.setAttribute("src",Editor.tweetImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",n.appendChild(x),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>e.length&&(n=mxUtils.button("",function(){try{var q="mailto:?subject="+encodeURIComponent(E||
-b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),x=document.createElement("img"),x.className="geAdaptiveAsset",x.setAttribute("src",Editor.mailImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",n.appendChild(x),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n));
-x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(x);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?x.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",x.className="geBtn"):(m.appendChild(k),
-x.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var u=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;if(M.checked&&""!=n.value){var z="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=u&&(z+="&title="+encodeURIComponent(u));0<G.length&&(z+="&s="+G);""!=q.value&&"0"!=q.value&&(z+="&border="+q.value);""!=k.value&&(z+="&height="+k.value);z+="&pan="+(p.checked?"1":"0");z+="&zoom="+(y.checked?"1":"0");z+="&fit="+(I.checked?"1":"0");
-z+="&resize="+(B.checked?"1":"0");z+="&x0="+Number(g.value);z+="&y0="+E;l.mathEnabled&&(z+="&math=1");C.checked?z+="&edit=_blank":A.checked&&(z+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=z}else S.constructor==DriveFile||S.constructor==DropboxFile?(z="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?z+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(z+=S.getHash().substring(1),z=S.constructor==DropboxFile?z+"&type=2":z+"&type=1"),null!=
-u&&(z+="&title="+encodeURIComponent(u)),""!=k.value&&(u=parseInt(k.value)+parseInt(g.value),z+="&height="+u),d.value=z):d.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),v=l.view.scale,x=Math.floor(m.x/v-l.view.translate.x),E=Math.floor(m.y/v-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
-c.appendChild(d);mxUtils.br(c);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=x;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text");
-k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(m.height/v);c.appendChild(k);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","28");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";n.value=e||"";c.appendChild(n);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var y=document.createElement("input");
-y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";c.appendChild(I);mxUtils.write(c,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft=
-"8px";c.appendChild(M);mxUtils.write(c,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),S=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(M,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(n,"change",f);f();
-mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";e.appendChild(m);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
-function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var v="curved=1;";m.cellRenderer.installCellOverlayListeners=
-function(y,A,C){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(C.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){A.fireEvent(new mxEventObject("pointerdown","event",B,"state",y))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(C.node,"touchstart",function(B){A.fireEvent(new mxEventObject("pointerdown","event",B,"state",y))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
-!1;m.connectionHandler.createEdgeState=function(y){y=m.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,y,this.graph.getCellStyle(y))};var x=m.getDefaultParent(),E=mxUtils.bind(this,function(y){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(C,B){m.connectionHandler.reset();m.clearSelection();var I=m.getCellGeometry(y),M;k(function(){M=m.insertVertex(x,null,"Entry",I.x,I.y,80,30,"rounded=1;");E(M);m.view.refresh(M);
-m.insertEdge(x,null,"",y,M,v)},function(){m.scrollCellToVisible(M)})});A.addListener("pointerdown",function(C,B){C=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var I=mxUtils.convertPoint(m.container,mxEvent.getClientX(C),mxEvent.getClientY(C));m.connectionHandler.start(B,I.x,I.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(C);mxEvent.consume(C)});m.addCellOverlay(y,A)});m.getModel().beginUpdate();try{var d=m.insertVertex(x,null,"Start",
-0,0,80,30,"ellipse");E(d)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==f?g=new mxCircleLayout(m):(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80);if(null!=g){var k=function(y,A){m.getModel().beginUpdate();try{null!=y&&y(),g.execute(m.getDefaultParent(),d)}catch(C){throw C;}finally{y=new mxMorphing(m),y.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=A&&A()})),y.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(y,A,
-C,B,I){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);var p=mxUtils.button(mxResources.get("insert"),function(y){m.clearCellOverlays();
-var A=m.getModel().getChildren(m.getDefaultParent());y=mxEvent.isAltDown(y)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,y.x,y.y);y=b.editor.graph.view;var C=y.getBounds(A);C.x-=y.translate.x;C.y-=y.translate.y;b.editor.graph.scrollRectToVisible(C);b.editor.graph.setSelectionCells(A);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||c.appendChild(q)};this.container=c};
+"transform","translate(-50%,0)");mxUtils.write(m,mxResources.get("decideLater"));k.appendChild(m);mxEvent.addListener(m,"click",function(){b.hideDialog();var J=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=J});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(A.style.padding="7px",A.style.fontSize="9pt",A.style.marginTop="-14px",
+A.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(A))},5E3);this.container=k},SplashDialog=function(b){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var e=
+b.addLanguageMenu(d,!1,"28px");null!=e&&(e.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var k=document.createElement("div");k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";e="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=
+IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",e=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",e=mxResources.get("trello")):
+(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",e=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";var u=document.createElement("table"),
+z=document.createElement("tbody"),C=document.createElement("tr"),A=document.createElement("td"),B=document.createElement("td");u.setAttribute("align","center");A.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,e);B.style.textAlign="left";B.appendChild(c);C.appendChild(A);C.appendChild(B);z.appendChild(C);u.appendChild(z);d.appendChild(u);e=document.createElement("span");e.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0)");mxUtils.write(e,mxResources.get("changeStorage"));mxEvent.addListener(e,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});d.appendChild(e)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});k.appendChild(m);mxUtils.br(k);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
+"18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});k.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(e=function(g){m.style.marginBottom="24px";var l=document.createElement("a");l.style.display="inline-block";l.style.color="gray";l.style.cursor="pointer";l.style.marginTop="6px";mxUtils.write(l,mxResources.get("signOut"));m.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(l,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){g()})});k.appendChild(l)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var J=b.drive.getUsersList();if(0<J.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(c);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(e=0;e<J.length;e++)u=document.createElement("option"),mxUtils.write(u,J[e].displayName),u.value=e,f.appendChild(u),
+u=document.createElement("option"),u.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(u,"<"+J[e].email+">"),u.setAttribute("disabled","disabled"),f.appendChild(u);u=document.createElement("option");mxUtils.write(u,mxResources.get("addAccount"));u.value=J.length;f.appendChild(u);mxEvent.addListener(f,"change",function(){var g=f.value,l=J.length!=g;l&&b.drive.setUser(J[g]);b.drive.authorize(l,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(q){b.handleError(q,null,function(){b.hideDialog();
+b.showSplash()})},!0)});k.appendChild(f)}else e(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?e(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?e(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&e(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+null!=b.dropbox&&e(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):e(function(){b.oneDrive.logout()});d.appendChild(k);this.container=d},EmbedDialog=function(b,d,e,c,k,m,u,z,C){u=null!=u?u:"Check out the diagram I made using @drawio";c=document.createElement("div");var A=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>d.length?A?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
+m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(d.length));c.appendChild(m);var B=document.createElement("textarea");B.setAttribute("autocomplete","off");B.setAttribute("autocorrect","off");B.setAttribute("autocapitalize","off");B.setAttribute("spellcheck","false");B.style.fontFamily="monospace";B.style.wordBreak="break-all";B.style.marginTop="10px";B.style.resize="none";B.style.height="150px";B.style.width="440px";B.style.border=
+"1px solid gray";B.value=mxResources.get("updatingDocument");c.appendChild(B);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>d.length?(B.value=d,B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)):(B.setAttribute("readonly","true"),B.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var J=null;!EmbedDialog.showPreviewOption||
+mxClient.IS_CHROMEAPP&&!A||navigator.standalone||!(A||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(J=mxUtils.button(null!=z?z:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var g=5E5>d.length?B.value:d;if(null!=k)k(g);else if(A)try{var l=b.openLink(g);null!=l&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=l.location.href&&l.location.href.substring(0,8)!=g.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),
+e||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var q=window.open();q=null!=q?q.document:null;null!=q?(q.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),q.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),J.className="geBtn",m.appendChild(J));if(!A||7500<d.length)z=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=C?C:"embed.txt","txt",d,"text/plain")}),z.className="geBtn",m.appendChild(z);if(A&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(B.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});z=document.createElement("img");z.setAttribute("src",Editor.facebookImage);z.setAttribute("width","18");z.setAttribute("height",
+"18");z.setAttribute("border","0");f.appendChild(z);f.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";m.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(u)+"&url="+encodeURIComponent(B.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),
+z=document.createElement("img"),z.setAttribute("src",Editor.tweetImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",f.appendChild(z),f.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",m.appendChild(f))}!b.isOffline()&&5E5>d.length&&(f=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(C||
+b.defaultFilename)+"&body="+encodeURIComponent(B.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),z=document.createElement("img"),z.className="geAdaptiveAsset",z.setAttribute("src",Editor.mailImage),z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("border","0"),z.style.marginBottom="5px",f.appendChild(z),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",m.appendChild(f));
+z=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(z);f=mxUtils.button(mxResources.get("copy"),function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?z.className="geBtn gePrimaryBtn":(m.appendChild(f),f.className="geBtn gePrimaryBtn",z.className="geBtn"):(m.appendChild(J),
+z.className="geBtn",J.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,d){function e(){var n=null!=T&&null!=T.getTitle()?T.getTitle():this.defaultFilename;if(G.checked&&""!=f.value){var v="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(f.value));null!=n&&(v+="&title="+encodeURIComponent(n));0<y.length&&(v+="&s="+y);""!=g.value&&"0"!=g.value&&(v+="&border="+g.value);""!=J.value&&(v+="&height="+J.value);v+="&pan="+(l.checked?"1":"0");v+="&zoom="+(q.checked?"1":"0");v+="&fit="+(F.checked?"1":"0");
+v+="&resize="+(E.checked?"1":"0");v+="&x0="+Number(B.value);v+="&y0="+C;k.mathEnabled&&(v+="&math=1");x.checked?v+="&edit=_blank":t.checked&&(v+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));A.value=v}else T.constructor==DriveFile||T.constructor==DropboxFile?(v="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=f.value?v+=encodeURIComponent(mxUtils.htmlEntities(f.value))+"&type=3":(v+=T.getHash().substring(1),v=T.constructor==DropboxFile?v+"&type=2":v+"&type=1"),null!=
+n&&(v+="&title="+encodeURIComponent(n)),""!=J.value&&(n=parseInt(J.value)+parseInt(B.value),v+="&height="+n),A.value=v):A.value=""}var c=document.createElement("div"),k=b.editor.graph,m=k.getGraphBounds(),u=k.view.scale,z=Math.floor(m.x/u-k.view.translate.x),C=Math.floor(m.y/u-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","text");A.style.marginBottom="8px";A.style.marginTop="2px";A.style.width="410px";
+c.appendChild(A);mxUtils.br(c);this.init=function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","4");B.style.marginRight="16px";B.style.marginLeft="4px";B.value=z;c.appendChild(B);mxUtils.write(c,mxResources.get("height")+":");var J=document.createElement("input");J.setAttribute("type","text");
+J.setAttribute("size","4");J.style.marginLeft="4px";J.value=Math.ceil(m.height/u);c.appendChild(J);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","28");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";f.value=d||"";c.appendChild(f);
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="16px";c.appendChild(l);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");
+q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("checked","checked");E.defaultChecked=!0;E.style.marginLeft="16px";c.appendChild(E);mxUtils.write(c,mxResources.get("resize")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft="8px";c.appendChild(F);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
+"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var y=b.getBasenames().join(";"),T=b.getCurrentFile();mxEvent.addListener(l,"change",e);mxEvent.addListener(q,"change",e);mxEvent.addListener(E,"change",e);mxEvent.addListener(F,"change",e);mxEvent.addListener(t,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(G,"change",e);mxEvent.addListener(J,"change",e);mxEvent.addListener(B,"change",e);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);e();
+mxEvent.addListener(A,"click",function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)});d=document.createElement("div");d.style.paddingTop="12px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";d.appendChild(m);c.appendChild(d);this.container=c},CreateGraphDialog=function(b,d,e){var c=document.createElement("div");c.style.textAlign="right";this.init=
+function(){var k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.width="100%";k.style.height="360px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);c.appendChild(k);var m=new Graph(k);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var u="curved=1;";m.cellRenderer.installCellOverlayListeners=
+function(q,t,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(E){t.fireEvent(new mxEventObject("pointerdown","event",E,"state",q))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(E){t.fireEvent(new mxEventObject("pointerdown","event",E,"state",q))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
+!1;m.connectionHandler.createEdgeState=function(q){q=m.createEdge(null,null,null,null,null,u);return new mxCellState(this.graph.view,q,this.graph.getCellStyle(q))};var z=m.getDefaultParent(),C=mxUtils.bind(this,function(q){var t=new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(x,E){m.connectionHandler.reset();m.clearSelection();var F=m.getCellGeometry(q),G;J(function(){G=m.insertVertex(z,null,"Entry",F.x,F.y,80,30,"rounded=1;");C(G);m.view.refresh(G);
+m.insertEdge(z,null,"",q,G,u)},function(){m.scrollCellToVisible(G)})});t.addListener("pointerdown",function(x,E){x=E.getProperty("event");E=E.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var F=mxUtils.convertPoint(m.container,mxEvent.getClientX(x),mxEvent.getClientY(x));m.connectionHandler.start(E,F.x,F.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});m.addCellOverlay(q,t)});m.getModel().beginUpdate();try{var A=m.insertVertex(z,null,"Start",
+0,0,80,30,"ellipse");C(A)}finally{m.getModel().endUpdate()}if("horizontalTree"==e){var B=new mxCompactTreeLayout(m);B.edgeRouting=!1;B.levelDistance=30;u="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==e?(B=new mxCompactTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=30,u="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(B=new mxRadialTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=80):"verticalFlow"==e?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+e?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==e?B=new mxCircleLayout(m):(B=new mxFastOrganicLayout(m,!1),B.forceConstant=80);if(null!=B){var J=function(q,t){m.getModel().beginUpdate();try{null!=q&&q(),B.execute(m.getDefaultParent(),A)}catch(x){throw x;}finally{q=new mxMorphing(m),q.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=t&&t()})),q.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(q,t,
+x,E,F){f.apply(this,arguments);J()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);J()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){J()})}var g=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=k.parentNode&&(m.destroy(),k.parentNode.removeChild(k));b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);var l=mxUtils.button(mxResources.get("insert"),function(q){m.clearCellOverlays();
+var t=m.getModel().getChildren(m.getDefaultParent());q=mxEvent.isAltDown(q)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(t,!0));t=b.editor.graph.importCells(t,q.x,q.y);q=b.editor.graph.view;var x=q.getBounds(t);x.x-=q.translate.x;x.y-=q.translate.y;b.editor.graph.scrollRectToVisible(x);b.editor.graph.setSelectionCells(t);null!=k.parentNode&&(m.destroy(),k.parentNode.removeChild(k));b.hideDialog()});c.appendChild(l);l.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||c.appendChild(g)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geBackgroundImageDialogOption");var x=document.createElement("input");
-x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginBottom="8px";E.style.width="360px";E.value=m||null==f?"":f.src;var d=document.createElement("select");d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()||
-mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);d.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(v.style.display="none",x.style.display="none",d.style.display="none");var n=document.createElement("option"),q=!1,p=!1,y=function(M,G){q||null!=M&&p||(x.checked?null!=G&&G(n.selected?null:
-d.value):""==E.value||b.isOffline()?(C.value="",B.value="",null!=G&&G("")):(E.value=mxUtils.trim(E.value),b.loadImage(E.value,function(S){C.value=S.width;B.value=S.height;null!=G&&G(E.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));C.value="";B.value="";null!=G&&G(null)})))},A=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(G,S,u,z,F,J){E.value=G;y();E.focus()},function(){},function(G){return"image/"==G.type.substring(0,
-6)},function(G){for(var S=0;S<G.length;S++)G[S]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?d.focus():E.focus();mxEvent.addListener(d,"focus",function(){v.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(E,"focus",function(){x.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){E.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=c.parentNode,G=null;mxEvent.addListener(M,
-"dragleave",function(S){null!=G&&(G.parentNode.removeChild(G),G=null);S.stopPropagation();S.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(S){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(M));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(S){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<S.dataTransfer.files.length)A(S.dataTransfer.files);else if(0<=mxUtils.indexOf(S.dataTransfer.types,
-"text/uri-list")){var u=S.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(u)&&(E.value=decodeURIComponent(u),y())}S.stopPropagation();S.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(E);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var C=document.createElement("input");C.setAttribute("type","text");C.style.width="60px";C.style.marginLeft="8px";C.style.marginRight="16px";
-C.value=null==f||m?"":f.width;c.appendChild(C);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(E,"change",y);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],
-null!=M&&(E.value=M.url,y()));E.focus()};c.appendChild(x);c.appendChild(d);mxUtils.br(c);m?(x.setAttribute("checked","checked"),x.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!l&&x.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),d.appendChild(n),mxEvent.addListener(d,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){E.value="";C.value="";B.value="";v.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(M){null!=I.files&&(A(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";c.appendChild(I);g=mxUtils.button(mxResources.get("open"),function(){I.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();y(null,function(M){e(""!=M&&null!=M?new mxImage(M,C.value,B.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(q,p,y){var A=q.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var C=function(U,Q,V,W,t){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,t));var D=null;B.getModel().beginUpdate();try{D="txt"==Q?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y,
-W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:U,format:Q},null,2))}finally{B.getModel().endUpdate()}null!=D&&(B.setSelectionCell(D),B.scrollCellToVisible(D))},B=b.editor.graph,I="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-q&&"svg"==I?window.setTimeout(function(){b.spinner.stop();C(q,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(q,I,function(U,Q,V){b.spinner.stop();C(q,I,U,Q,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(q,I,function(U,Q,V){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(new mxRectangle(0,0,Q,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,Q,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:q,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var M=[],G=0,S={},u=0;u<A.length;u++){var z=mxUtils.trim(A[u]);if("primary key"==z.substring(0,11).toLowerCase()){var F=z.match(/\((.+)\)/);F&&F[1]&&(S[F[1]]=!0);A.splice(u,1)}else 0<z.toLowerCase().indexOf("primary key")&&(S[z.split(" ")[0]]=
-!0,A[u]=mxUtils.trim(z.replace(/primary key/i,"")))}for(u=0;u<A.length;u++)if(z=mxUtils.trim(A[u]),"create table"==z.substring(0,12).toLowerCase())z=mxUtils.trim(z.substring(12)),"("==z.charAt(z.length-1)&&(z=mxUtils.trim(z.substring(0,z.length-1))),p=new mxCell(z,new mxGeometry(G,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,M.push(p),z=b.editor.graph.getPreferredSizeForCell(J),null!=
-z&&(p.geometry.width=z.width+10);else if(null!=p&&")"==z.charAt(0))G+=p.geometry.width+40,p=null;else if("("!=z&&null!=p){z=z.substring(0,","==z.charAt(z.length-1)?z.length-1:z.length);F=S[z.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(F?"1":"0")+";");J.vertex=!0;var K=new mxCell(F?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(F?"fontStyle=1;":""));K.vertex=!0;J.insert(K);z=new mxCell(z,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(F?"fontStyle=5;":""));z.vertex=!0;J.insert(z);z=b.editor.graph.getPreferredSizeForCell(z);null!=z&&p.geometry.width<z.width+30&&(p.geometry.width=Math.min(320,
-Math.max(p.geometry.width,z.width+30)));p.insert(J,F?0:null);p.geometry.height+=30}0<M.length&&(B=b.editor.graph,m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),B.setSelectionCells(B.importCells(M,m.x,m.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==p){if(0<A.length){B=b.editor.graph;J=null;M=[];for(u=p=0;u<A.length;u++)";"!=A[u].charAt(0)&&(0==A[u].length?J=null:null==J?(J=new mxCell(A[u],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;"),
-J.vertex=!0,M.push(J),z=B.getPreferredSizeForCell(J),null!=z&&J.geometry.width<z.width+10&&(J.geometry.width=z.width+10),p+=J.geometry.width+40):"--"==A[u]?(z=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;"),z.vertex=!0,J.geometry.height+=z.geometry.height,J.insert(z)):0<A[u].length&&(G=new mxCell(A[u],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;"),
-G.vertex=!0,z=B.getPreferredSizeForCell(G),null!=z&&G.geometry.width<z.width&&(G.geometry.width=z.width),J.geometry.width=Math.max(J.geometry.width,G.geometry.width),J.geometry.height+=G.geometry.height,J.insert(G)));if(0<M.length){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0));B.getModel().beginUpdate();try{M=B.importCells(M,m.x,m.y);z=[];for(u=0;u<M.length;u++)z.push(M[u]),z=z.concat(M[u].children);B.fireEvent(new mxEventObject("cellsInserted","cells",z))}finally{B.getModel().endUpdate()}B.setSelectionCells(M);
-B.scrollCellToVisible(B.getSelectionCell())}}}else{J=function(U){var Q=H[U];null==Q&&(Q=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),Q.vertex=!0,H[U]=Q,M.push(Q));return Q};var H={};M=[];for(u=0;u<A.length;u++)if(";"!=A[u].charAt(0)){var N=A[u].split("->");2<=N.length&&(F=J(N[0]),K=J(N[N.length-1]),N=new mxCell(2<N.length?N[1]:"",new mxGeometry),N.edge=!0,F.insertEdge(N,!0),K.insertEdge(N,!1),M.push(N))}if(0<M.length){A=document.createElement("div");A.style.visibility="hidden";
-document.body.appendChild(A);B=new Graph(A);B.getModel().beginUpdate();try{M=B.importCells(M);for(u=0;u<M.length;u++)B.getModel().isVertex(M[u])&&(z=B.getPreferredSizeForCell(M[u]),M[u].geometry.width=Math.max(M[u].geometry.width,z.width),M[u].geometry.height=Math.max(M[u].geometry.height,z.height));u=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(B,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),M),u=!1):"circle"==p?
-(new mxCircleLayout(B)).execute(B.getDefaultParent()):(G=new mxFastOrganicLayout(B),G.disableEdgeStyle=!1,G.forceConstant=180,G.execute(B.getDefaultParent()));u&&(S=new mxParallelEdgeLayout(B),S.spacing=30,S.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();z=[];b.editor.graph.getModel().beginUpdate();try{M=B.getModel().getChildren(B.getDefaultParent()),m=mxEvent.isAltDown(y)?m:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),z=b.editor.graph.importCells(M,
-m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",z))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(z);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();A.parentNode.removeChild(A)}}}function l(){return"list"==x.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==x.value?
-"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==x.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"==x.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"==x.value||"plantUmlTxt"==x.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 m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize=
-"none";v.style.width="100%";v.style.height="354px";v.style.marginBottom="16px";var x=document.createElement("select");if("formatSql"==f||"mermaid"==f)x.style.display="none";var E=document.createElement("option");E.setAttribute("value","list");mxUtils.write(E,mxResources.get("list"));"plantUml"!=f&&x.appendChild(E);null!=f&&"fromText"!=f||E.setAttribute("selected","selected");E=document.createElement("option");E.setAttribute("value","table");mxUtils.write(E,mxResources.get("formatSql"));"formatSql"==
-f&&(x.appendChild(E),E.setAttribute("selected","selected"));E=document.createElement("option");E.setAttribute("value","mermaid");mxUtils.write(E,mxResources.get("formatSql"));"mermaid"==f&&(x.appendChild(E),E.setAttribute("selected","selected"));E=document.createElement("option");E.setAttribute("value","diagram");mxUtils.write(E,mxResources.get("diagram"));var d=document.createElement("option");d.setAttribute("value","circle");mxUtils.write(d,mxResources.get("circle"));var g=document.createElement("option");
-g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(x.appendChild(E),x.appendChild(d),x.appendChild(g),x.appendChild(k));E=document.createElement("option");E.setAttribute("value","plantUmlSvg");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&E.setAttribute("selected",
-"selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(x.appendChild(E),x.appendChild(d),x.appendChild(g));var n=l();v.value=n;e.appendChild(v);this.init=function(){v.focus()};
-Graph.fileSupport&&(v.addEventListener("dragover",function(q){q.stopPropagation();q.preventDefault()},!1),v.addEventListener("drop",function(q){q.stopPropagation();q.preventDefault();if(0<q.dataTransfer.files.length){q=q.dataTransfer.files[0];var p=new FileReader;p.onload=function(y){v.value=y.target.result};p.readAsText(q)}},!1));e.appendChild(x);mxEvent.addListener(x,"change",function(){var q=l();if(0==v.value.length||v.value==n)n=q,v.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(E=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),E.className="geBtn",e.appendChild(E));E=mxUtils.button(mxResources.get("close"),function(){v.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});E.className="geBtn";b.editor.cancelFirst&&e.appendChild(E);d=mxUtils.button(mxResources.get("insert"),function(q){b.hideDialog();c(v.value,x.value,q)});e.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p,y,A,C){function B(ka){null!=ka&&(Ga=Fa=ka?135:140);ka=!0;if(null!=ta)for(;H<ta.length&&(ka||0!=mxUtils.mod(H,30));){var da=ta[H++];da=G(da.url,da.libs,da.title,da.tooltip?da.tooltip:da.title,da.select,da.imgUrl,da.info,da.onClick,da.preview,da.noImg,da.clibs);ka&&da.click();ka=!1}}function I(){if(Z&&null!=q)f||b.hideDialog(),q(Z,aa,K.value);else if(c)f||b.hideDialog(),c(R,K.value,Y,O);else{var ka=K.value;null!=ka&&
-0<ka.length&&b.pickFolder(b.mode,function(da){b.createFile(ka,R,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,da,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(ka,da,ca,na,la,qa,ha){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");R=da;O=ca;P=qa;X=ka;Z=na;Y=ha;aa=la;X.style.backgroundColor=x;X.style.border=E}function G(ka,da,ca,na,la,qa,ha,ia,
-pa,va,za){function Ea(Ka,Ta){null==Ha?(Na=Ka,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Na)}))):Ta(Ha,Na)}function Ba(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,sa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
-Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ca?mxResources.get(ca,null,ca):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(sa,null,null,ka,ha,za)},!0,!1)}}function ua(Ka,Ta){null==ka||Ra||
-b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ia?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ia.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ia.naturalWidth+'" height="'+Ia.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Ba(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt=
-sa,Ra=!0,Ea(ka,function(Va){Ra&&b.sidebar.currentElt==sa&&Ba(Va,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Ra=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Ga+"px";sa.style.width=Fa+"px";var Ha=null,Na=ka;null!=ca?sa.setAttribute("title",mxResources.get(ca,null,ca)):null!=na&&0<na.length&&sa.setAttribute("title",na);var Ra=!1,Ia=null;if(null!=qa){sa.style.display="inline-flex";sa.style.justifyContent="center";
-sa.style.alignItems="center";la=document.createElement("img");la.setAttribute("src",qa);la.setAttribute("alt",na);la.style.maxWidth=Ga+"px";la.style.maxHeight=Fa+"px";Ia=la;var Pa=qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(la);la.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){M(sa,null,null,ka,ha,za)}),null,null);mxEvent.addListener(sa,"dblclick",function(Ka){I();
-mxEvent.consume(Ka)})}else if(!va&&null!=ka&&0<ka.length){var Qa=function(Ka){U.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";N.spin(ba);Ea(ka,function(Ta,Va){N.stop();null!=Ta&&(M(sa,Ta,da,null,null,za,Va),Ka&&I())})};la=pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";sa.style.backgroundImage="url("+la+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ca){na=document.createElement("table");
-na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";qa=document.createElement("tbody");pa=document.createElement("tr");va=document.createElement("td");va.setAttribute("align","center");va.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius=
-"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ga-34+"px";mxUtils.write(Oa,mxResources.get(ca,null,ca));va.appendChild(Oa);pa.appendChild(va);qa.appendChild(pa);na.appendChild(qa);sa.appendChild(na)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(sa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else na=document.createElement("table"),na.setAttribute("width",
-"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",qa=document.createElement("tbody"),pa=document.createElement("tr"),va=document.createElement("td"),va.setAttribute("align","center"),va.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth=
-Ga-34+"px",mxUtils.write(Oa,mxResources.get(ca,null,ca)),va.appendChild(Oa),pa.appendChild(va),qa.appendChild(pa),na.appendChild(qa),sa.appendChild(na),la&&M(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){M(sa,null,null,ka,ha)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(Ka){M(sa,null,null,ka,ha)}),mxEvent.addListener(sa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ua(Ka,Sa);mxEvent.consume(Ka)}))}ba.appendChild(sa);return sa}function S(){function ka(ua,
-sa){var Ha=mxResources.get(ua);null==Ha&&(Ha=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+sa.length+")"}function da(ua,sa,Ha){mxEvent.addListener(sa,"click",function(){Aa!=sa&&(Aa.style.backgroundColor="",Aa=sa,Aa.style.backgroundColor=v,ba.scrollTop=0,ba.innerText="",H=0,ta=Ha?Ma[ua][Ha]:ya[ua],V=null,B(!1))})}oa&&(oa=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))}));
-if(0<Ca){var ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var na in xa){var la=document.createElement("div"),qa=na;ca=xa[na];18<qa.length&&(qa=qa.substring(0,18)+"&hellip;");la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";la.setAttribute("title",
-qa+" ("+ca.length+")");mxUtils.write(la,la.getAttribute("title"));null!=d&&(la.style.padding=d);ma.appendChild(la);(function(ua,sa){mxEvent.addListener(la,"click",function(){Aa!=sa&&(Aa.style.backgroundColor="",Aa=sa,Aa.style.backgroundColor=v,ba.scrollTop=0,ba.innerText="",H=0,ta=xa[ua],V=null,B(!1))})})(na,la)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(na in ya){qa=
-Ma[na];var ha=la=document.createElement(qa?"ul":"div");ca=ya[na];var ia=ka(na,ca);if(null!=qa){var pa=document.createElement("li"),va=document.createElement("div");va.className="geTempTreeCaret";va.setAttribute("title",ia);mxUtils.write(va,ia);ha=va;pa.appendChild(va);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var za in qa){var Ea=document.createElement("li"),Ba=ka(za,qa[za]);Ea.setAttribute("title",Ba);mxUtils.write(Ea,Ba);da(na,Ea,za);ia.appendChild(Ea)}pa.appendChild(ia);
-la.className="geTempTree";la.appendChild(pa);(function(ua,sa){mxEvent.addListener(sa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,va)}else la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-la.setAttribute("title",ia),mxUtils.write(la,ia);null!=d&&(la.style.padding=d);ma.appendChild(la);null==Aa&&0<ca.length&&(Aa=la,Aa.style.backgroundColor=v,ta=ca);da(na,ha)}B(!1)}var u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;v=null!=v?v:"#ebf2f9";x=null!=x?x:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";E=null!=E?E:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var z=document.createElement("div");
-z.style.userSelect="none";z.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";f&&z.appendChild(F);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||F.appendChild(J);f&&mxUtils.write(F,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+J);K.style.marginLeft="10px";K.style.width=e||
-u?"144px":"244px";this.init=function(){f&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};f&&(F.appendChild(K),C?K.style.width=e||u?"350px":"450px":(null!=b.editor.diagramFileTypes&&(C=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),C.style.marginLeft=
-"6px",C.style.width=e||u?"80px":"180px",F.appendChild(C)),null!=b.editor.fileExtensions&&(u=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),u.style.marginTop="12px",F.appendChild(u))));F=!1;var H=0,N=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}),U=mxUtils.button(y||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");I();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";
-if(k||n){var Q=[],V=null,W=null,t=null,D=function(ka){U.setAttribute("disabled","disabled");for(var da=0;da<Q.length;da++)Q[da].className=da==ka?"geBtn gePrimaryBtn":"geBtn"};F=!0;y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";z.appendChild(y);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ea.style.display="";ba.style.left="160px";D(0);ba.scrollTop=0;ba.innerText="";H=0;V!=ta&&(ta=V,ya=W,Ca=t,ma.innerText="",S(),V=null)});
-Q.push(u);y.appendChild(u);var L=function(ka){ma.style.display="none";ea.style.display="none";ba.style.left="30px";D(ka?-1:1);null==V&&(V=ta);ba.scrollTop=0;ba.innerText="";N.spin(ba);var da=function(ca,na,la){H=0;N.stop();ta=ca;la=la||{};var qa=0,ha;for(ha in la)qa+=la[ha].length;if(na)ba.innerText=na;else if(0==ca.length&&0==qa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<qa){ma.style.display="";ba.style.left="160px";ma.innerText="";Ca=0;ya={"draw.io":ca};
-for(ha in la)ya[ha]=la[ha];S()}else B(!0)};ka?n(T.value,da):k(da)};k&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),y.appendChild(u),Q.push(u));if(n){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";y.appendChild(u);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(ka){13==ka.keyCode&&L(!0)});y.appendChild(T);u=mxUtils.button(mxResources.get("search"),
-function(){L(!0)});u.className="geBtn";y.appendChild(u)}D(0)}var O=null,P=null,R=null,X=null,Z=null,Y=null,aa=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";y=(f?72:40)+(F?30:0);ba.style.top=y+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ea=document.createElement("div");ea.style.cssText="position:absolute;left:30px;width:128px;top:"+
-y+"px;height:22px;margin-top: 6px;white-space: nowrap";var ja=document.createElement("input");ja.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ja.setAttribute("placeholder",mxResources.get("search"));ja.setAttribute("type","text");ea.appendChild(ja);var fa=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";fa.setAttribute("src",ra);fa.setAttribute("title",mxResources.get("search"));
-fa.style.position="relative";fa.style.left="-18px";fa.style.top="1px";fa.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(fa);mxEvent.addListener(fa,"click",function(){fa.getAttribute("src")==Dialog.prototype.closeImage&&(fa.setAttribute("src",ra),fa.setAttribute("title",mxResources.get("search")),ja.value="",null!=La&&(La.click(),La=null));ja.focus()});mxEvent.addListener(ja,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var da=ja.value;if(""==da)null!=La&&(La.click(),
-La=null);else{if(null==NewDialog.tagsList[g]){var ca={};for(za in ya)for(var na=ya[za],la=0;la<na.length;la++){var qa=na[la];if(null!=qa.tags)for(var ha=qa.tags.toLowerCase().split(";"),ia=0;ia<ha.length;ia++)null==ca[ha[ia]]&&(ca[ha[ia]]=[]),ca[ha[ia]].push(qa)}NewDialog.tagsList[g]=ca}var pa=da.toLowerCase().split(" ");ca=NewDialog.tagsList[g];if(0<Ca&&null==ca.__tagsList__){for(za in xa)for(na=xa[za],la=0;la<na.length;la++)for(qa=na[la],ha=qa.title.split(" "),ha.push(za),ia=0;ia<ha.length;ia++){var va=
-ha[ia].toLowerCase();null==ca[va]&&(ca[va]=[]);ca[va].push(qa)}ca.__tagsList__=!0}var za=[];na={};for(la=ha=0;la<pa.length;la++)if(0<pa[la].length){va=ca[pa[la]];var Ea={};za=[];if(null!=va)for(ia=0;ia<va.length;ia++)qa=va[ia],0==ha==(null==na[qa.url])&&(Ea[qa.url]=!0,za.push(qa));na=Ea;ha++}ba.scrollTop=0;ba.innerText="";H=0;ca=document.createElement("div");ca.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ca,mxResources.get(0==za.length?"noResultsFor":
-"resultsFor",[da]));ba.appendChild(ca);null!=Aa&&null==La&&(Aa.style.backgroundColor="",La=Aa,Aa=ca);ta=za;V=null;B(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ja,"keyup",mxUtils.bind(this,function(ka){""==ja.value?(fa.setAttribute("src",ra),fa.setAttribute("title",mxResources.get("search"))):(fa.setAttribute("src",Dialog.prototype.closeImage),fa.setAttribute("title",mxResources.get("reset")))}));y+=23;var ma=document.createElement("div");ma.style.cssText="position:absolute;left:30px;width:128px;top:"+
-y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ga=140,Fa=140,ya={},Ma={},xa={},Ca=0,oa=!0,Aa=null,La=null;ya.basic=[{title:"blankDiagram",select:!0}];var ta=ya.basic;if(!e){var Da=function(){mxUtils.get(Ja,function(ka){if(!wa){wa=!0;ka=ka.getXml().documentElement.firstChild;for(var da={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var ca=ka.getAttribute("name"),na=
-ka.getElementsByTagName("add"),la=[],qa=0;qa<na.length;qa++)la.push(encodeURIComponent(mxUtils.getTextContent(na[qa])));null!=ca&&0<la.length&&(da[ca]=la.join(";"))}else if(la=ka.getAttribute("url"),null!=la){na=ka.getAttribute("section");ca=ka.getAttribute("subsection");if(null==na&&(qa=la.indexOf("/"),na=la.substring(0,qa),null==ca)){var ha=la.indexOf("/",qa+1);-1<ha&&(ca=la.substring(qa+1,ha))}qa=ya[na];null==qa&&(qa=[],ya[na]=qa);la=ka.getAttribute("clibs");null!=da[la]&&(la=da[la]);la={url:ka.getAttribute("url"),
-libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:la,tags:ka.getAttribute("tags")};qa.push(la);null!=ca&&(qa=Ma[na],null==qa&&(qa={},Ma[na]=qa),na=qa[ca],null==na&&(na=[],qa[ca]=na),na.push(la))}ka=ka.nextSibling}N.stop();S()}})};z.appendChild(ea);z.appendChild(ma);z.appendChild(ba);var wa=!1,Ja=g;/^https?:\/\//.test(Ja)&&!b.editor.isCorsEnabledForUrl(Ja)&&(Ja=PROXY_URL+"?url="+encodeURIComponent(Ja));
-N.spin(ba);null!=A?A(function(ka,da){xa=ka;t=Ca=da;Da()},Da):Da();W=ya}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==z&&13==ka.keyCode&&I()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||l||(y=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-y.className="geBtn",A.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});y.className="geBtn";!b.editor.cancelFirst||l&&null==m||A.appendChild(y);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(da){null!=da&&0<da.length&&b.editor.loadUrl(b.editor.getProxiedUrl(da),function(ca){R=
-ca;O=null;templateRealURl=da;b.hideDialog();I()},function(ca){b.handleError(ca)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(da){b.openFiles(ka.files,!0);
-ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),p.className="geBtn",A.appendChild(p));A.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||A.appendChild(y);z.appendChild(A);this.container=z};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p,y,A){function C(F,J,K,H){function N(){mxEvent.addListener(U,"click",function(){var D=K;if(v){var L=M.value,T=L.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>T){D=null!=D?D:z.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
-(O=".drawio");0<=T&&(L=L.substring(0,T));M.value=L+O}}B(K)})}var U=document.createElement("a");U.style.overflow="hidden";var Q=document.createElement("img");Q.src=F;Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.width="60px";Q.style.height="60px";Q.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(Q);U.style.color=
-"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,J);if(null!=H&&null==b[H]){Q.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=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});W.spin(U);var t=window.setTimeout(function(){null==b[H]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(t),
-mxUtils.setOpacity(V,100),Q.style.visibility="",W.stop(),N())}))}else N();S.appendChild(U);++u==k&&(mxUtils.br(S),u=0)}function B(F){var J=M.value;if(null==F||null!=J&&0<J.length)A&&b.hideDialog(),f(J,F,M)}g="1"==urlParams.noDevice?!1:g;v=null!=v?v:!0;x=null!=x?x:!0;k=null!=k?k:4;A=null!=A?A:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var I=document.createElement("h2");mxUtils.write(I,l||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
-"24px";m.appendChild(I);mxUtils.write(m,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",e);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};m.appendChild(M);null!=y&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),
-l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,M,y)));y=null;if("1"!=urlParams.noDevice&&null!=n&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";l=document.createElement("img");var G=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+q+";base64,"+G);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=q||(y=mxUtils.button(mxResources.get("copy"),function(F){F=b.base64ToBlob(G,"image/png");F=new ClipboardItem({"image/png":F,"text/html":new Blob(['<img src="data:'+q+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([F]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
-y.style.marginTop="6px",y.className="geBtn");E&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(F){mxEvent.isPopupTrigger(F)||B("_blank")}))}mxUtils.br(m);var S=document.createElement("div");S.style.textAlign="center";var u=0;S.style.marginTop="6px";m.appendChild(S);var z=document.createElement("select");z.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),z.appendChild(n),C(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),z.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),C(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),z.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),C(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),z.appendChild(n),C(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITLAB),mxUtils.write(n,mxResources.get("gitlab")),z.appendChild(n),C(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_TRELLO),mxUtils.write(n,mxResources.get("trello")),z.appendChild(n),C(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)n=document.createElement("option"),n.setAttribute("value",App.MODE_DEVICE),mxUtils.write(n,mxResources.get("device")),z.appendChild(n),b.mode!=App.MODE_DEVICE&&x||n.setAttribute("selected","selected"),g&&C(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);x&&isLocalStorage&&"0"!=urlParams.browser&&(x=document.createElement("option"),
-x.setAttribute("value",App.MODE_BROWSER),mxUtils.write(x,mxResources.get("browser")),z.appendChild(x),b.mode==App.MODE_BROWSER&&x.setAttribute("selected","selected"),C(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));x=document.createElement("div");x.style.marginTop="26px";x.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(d)}),g.className="geBtn",x.appendChild(g));g=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
-function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&null==c&&x.appendChild(g);null==c&&(n=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),n.className="geBtn",x.appendChild(n));E&&Editor.popupsAllowed&&(E=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),E.className="geBtn",x.appendChild(E));CreateDialog.showDownloadButton&&(E=mxUtils.button(mxResources.get("download"),
-function(){B("download")}),E.className="geBtn",x.appendChild(E),null!=y&&(E.style.marginTop="6px",x.style.marginTop="6px"));null!=y&&(mxUtils.br(x),x.appendChild(y));b.editor.cancelFirst&&null==c||x.appendChild(g);mxEvent.addListener(M,"keypress",function(F){13==F.keyCode?B(App.MODE_DEVICE):27==F.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(x);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";m.appendChild(v);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});x.className="geBtn gePrimaryBtn";x.style.width=v.style.width;m.appendChild(x);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,v,x){function E(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var d=b.editor.graph,g=document.createElement("div");mxUtils.write(g,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
-"transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",f);k.setAttribute("type","text");k.setAttribute("spellcheck","false");k.setAttribute("autocorrect","off");k.setAttribute("autocomplete","off");k.setAttribute("autocapitalize","off");k.style.marginTop="6px";k.style.width=(Graph.fileSupport?460:340)-20+"px";k.style.backgroundImage="url('"+
-Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){k.value="";k.focus()});
-e.appendChild(k);e.appendChild(f);g.appendChild(e);var n=x,q,p,y=function(I,M,G,S){var u="data:"==I.substring(0,5);!b.isOffline()||u&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(z){b.spinner.stop();b.hideDialog();var F=!1===S?1:null!=M&&null!=G?Math.max(M/z.width,G/z.height):Math.min(1,Math.min(520/z.width,520/z.height));m&&(I=b.convertDataUri(I));c(I,Math.round(Number(z.width)*F),Math.round(Number(z.height)*F),n,q,p)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(I,null,null,n,q,p)):(I=b.convertDataUri(I),M=null==M?120:M,G=null==G?100:G,b.hideDialog(),c(I,M,G,n,q,p))},A=function(I,M){if(null!=I){var G=l?null:d.getModel().getGeometry(d.getSelectionCell());null!=G?y(I,G.width,G.height,M):y(I,null,null,M)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var I=g.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(G){null!=M&&(M.parentNode.removeChild(M),M=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(G){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));G.stopPropagation();G.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(G){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,
-0,0,b.maxImageSize,function(u,z,F,J,K,H,N,U){A(u,U)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var z=0;z<u.length;z++)u[z]()},!mxEvent.isControlDown(G),null,null,!0);else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var S=G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(S)&&A(decodeURIComponent(S))}G.stopPropagation();G.preventDefault()}),!1)}};x=document.createElement("div");x.style.marginTop="14px";x.style.textAlign=
-"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&x.appendChild(f);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(k.value=I.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type",
-"file");mxEvent.addListener(C,"change",function(I){null!=C.files&&(b.importFiles(C.files,0,0,b.maxImageSize,function(M,G,S,u,z,F){A(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var G=0;G<M.length;G++)M[G]()},!0),C.type="",C.type="file",C.value="")});C.style.display="none";document.body.appendChild(C);b.imgDlgFileInputElt=C}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";x.appendChild(e)}mxEvent.addListener(k,
-"keypress",function(I){13==I.keyCode&&A(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,k.value,n,function(M,G,S){n=M;q=G;p=S});b.showDialog(I.container,300,390,!0,!0)});v&&(B.className="geBtn",x.appendChild(B));mxEvent.addListener(k,"change",function(I){n=null;E()});E();v=mxUtils.button(mxResources.get("apply"),function(){A(k.value)});v.className="geBtn gePrimaryBtn";x.appendChild(v);b.editor.cancelFirst||x.appendChild(f);Graph.fileSupport&&(x.style.marginTop=
-"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),g.appendChild(v));g.appendChild(x);this.container=g},LinkDialog=function(b,e,f,c,l,m,v){function x(I,M,G){G=mxUtils.button("",G);
-G.className="geBtn";G.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",I);G.style.minWidth="42px";G.style.verticalAlign="middle";G.appendChild(M);B.appendChild(G)}var E=document.createElement("div");E.style.height="100%";mxUtils.write(E,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow=
-"clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="97%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";g.style.marginBottom="4px";var k=document.createElement("div");k.setAttribute("title",
-mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption");
-var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.margin="0 6p 0 6px";null!=v&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);v=null!=v?v:"_blank";y.setAttribute("title",v);m&&(g.style.width="340px");if(l&&
-null!=b.pages){null!=e&&Graph.isPageLink(e)?(q.setAttribute("checked","checked"),q.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);d.appendChild(g);d.appendChild(k);m&&(d.appendChild(y),mxUtils.write(d,mxResources.get("openInNewWindow")));mxUtils.br(d);d.appendChild(q);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value",
-"data:page/id,"+b.pages[m].getId()),e==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&q.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");p.appendChild(A);mxEvent.addListener(p,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}d.appendChild(p)}else g.setAttribute("value",
-e),d.appendChild(g),d.appendChild(k);E.appendChild(d);var C=mxUtils.button(f,function(){b.hideDialog();c(q.checked?"pageNotFound"!==p.value?p.value:e:g.value,LinkDialog.selectedDocs,y.checked?v:null)});C.style.verticalAlign="middle";C.className="geBtn gePrimaryBtn";this.init=function(){q.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked",
-"checked");q.checked=!0});mxEvent.addListener(g,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var I=E.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(G){null!=M&&(M.parentNode.removeChild(M),M=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(G){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));G.stopPropagation();G.preventDefault()}));
-mxEvent.addListener(I,"drop",mxUtils.bind(this,function(G){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,C.click());G.stopPropagation();G.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var M=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
-"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+I.docs[0].id);g.value=M;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){g.value=I[0].link;g.focus()}})});null!=b.oneDrive&&x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(I,M){g.value=M.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var M=I[0],G=I[1],S=I[2];I=I.slice(3,I.length).join("/");g.value="https://github.com/"+M+"/"+G+"/blob/"+S+"/"+I;g.focus()}})});null!=b.gitLab&&x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var M=
-I[0],G=I[1],S=I[2];I=I.slice(3,I.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+M+"/"+G+"/blob/"+S+"/"+I;g.focus()}})});mxEvent.addListener(g,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),c(q.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(C);b.editor.cancelFirst||B.appendChild(f);E.appendChild(B);this.container=E},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
-"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var v=document.createElement("input");v.setAttribute("type","text");v.style.marginTop="6px";v.style.width="600px";var x=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(d.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;k.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
-":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});x.className="geBtn gePrimaryBtn";if(!f){x.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(v,
-"change",function(){0<v.value.length&&0<E.test(v.value)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")});mxEvent.addListener(v,"keyup",function(){0<v.value.length&&E.test(v.value)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")})}l.appendChild(v);this.init=function(){v.focus()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";
-f.appendChild(d);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxEvent.addListener(m,"click",function(k){d.checked=!d.checked;mxEvent.consume(k)});l.appendChild(f);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));l.appendChild(m);var g=document.createElement("textarea");g.style.resize="none";g.style.width="600px";g.style.height="140px";g.style.marginTop="6px";g.setAttribute("placeholder",mxResources.get("comments"));
-l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(x)):(f.appendChild(x),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px";
-m.style.overflow="hidden";var v=document.createElement("div");v.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(v);mxEvent.disableContextMenu(m);c.appendChild(m);var x=new Graph(m);x.setTooltips(!1);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var E=0,d=null,g=0,k=x.getGlobalVariable;
-x.getGlobalVariable=function(X){return"page"==X&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=d?d.length:1:k.apply(this,arguments)};x.getLinkForCell=function(){return null};Editor.MathJaxRender&&x.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(x.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},q=new Spinner(n),p=b.getCurrentFile(),y=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(n=0;n<y.length;n++)A[y[n].getAttribute("id")]=y[n];var C=null,B=null,I=null,M=null,G=mxUtils.button("",function(){null!=I&&x.zoomIn()});G.className="geSprite geSprite-zoomin";G.setAttribute("title",mxResources.get("zoomIn"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");
-mxUtils.setOpacity(G,20);var S=mxUtils.button("",function(){null!=I&&x.zoomOut()});S.className="geSprite geSprite-zoomout";S.setAttribute("title",mxResources.get("zoomOut"));S.style.outline="none";S.style.border="none";S.style.margin="2px";S.setAttribute("disabled","disabled");mxUtils.setOpacity(S,20);var u=mxUtils.button("",function(){null!=I&&(x.maxFitScale=8,x.fit(8),x.center())});u.className="geSprite geSprite-fit";u.setAttribute("title",mxResources.get("fit"));u.style.outline="none";u.style.border=
-"none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var z=mxUtils.button("",function(){null!=I&&(x.zoomActual(),x.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var F=mxUtils.button("",function(){});F.className="geSprite geSprite-middle";F.setAttribute("title",mxResources.get("compare"));
-F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var J=m.cloneNode(!1);J.style.pointerEvent="none";m.parentNode.appendChild(J);var K=new Graph(J);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(F,function(X){X=A[d[E].getAttribute("id")];mxUtils.setOpacity(F,20);v.innerText="";null==X?mxUtils.write(v,
-mxResources.get("pageNotFound")):(H.style.display="none",m.style.display="none",J.style.display="",J.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,K.getModel()),K.view.scaleAndTranslate(x.view.scale,x.view.translate.x,x.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);v.innerText="";"none"==m.style.display&&(H.style.display="",m.style.display="",J.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var N=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),Z=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,Z,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Z)+"&format=xml"+X)).simulate(document,"_blank"))}});N.className="geBtn";N.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=M&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(Z){if(0<Z.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(Z)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(Z){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(Z){b.spinner.stop();b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)})}))});
-U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var Q=document.createElement("select");Q.setAttribute("disabled","disabled");Q.style.maxWidth="80px";Q.style.position="relative";Q.style.top="-2px";Q.style.verticalAlign="bottom";Q.style.marginRight="6px";Q.style.display="none";var V=null;mxEvent.addListener(Q,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(Q.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",U.className="geBtn gePrimaryBtn");y=document.createElement("div");
-y.style.position="absolute";y.style.top="482px";y.style.width="640px";y.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var L=null;if(null!=e&&0<e.length){m.style.cursor="move";var T=document.createElement("table");T.style.border="1px solid lightGray";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";
-var O=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(E=mxUtils.indexOf(b.pages,b.currentPage));for(n=e.length-1;0<=n;n--){var R=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var aa=function(ea){q.stop();v.innerText="";var ja=mxUtils.parseXml(ea),fa=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=fa){var ra=function(Ga){null!=Ga&&(Ga=ma(Editor.parseDiagramNode(Ga)));return Ga},ma=function(Ga){var Fa=Ga.getAttribute("background");
-if(null==Fa||""==Fa||Fa==mxConstants.NONE)Fa=x.defaultPageBackgroundColor;m.style.backgroundColor=Fa;(new mxCodec(Ga.ownerDocument)).decode(Ga,x.getModel());x.maxFitScale=1;x.fit(8);x.center();return Ga};Q.style.display="none";Q.innerText="";I=ja;M=ea;d=parseSelectFunction=null;g=0;if("mxfile"==fa.nodeName){ja=fa.getElementsByTagName("diagram");d=[];for(ea=0;ea<ja.length;ea++)d.push(ja[ea]);g=Math.min(E,d.length-1);0<d.length&&ra(d[g]);if(1<d.length)for(Q.removeAttribute("disabled"),Q.style.display=
-"",ea=0;ea<d.length;ea++)ja=document.createElement("option"),mxUtils.write(ja,d[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),ja.setAttribute("value",ea),ea==g&&ja.setAttribute("selected","selected"),Q.appendChild(ja);V=function(){try{var Ga=parseInt(Q.value);g=E=Ga;ra(d[Ga])}catch(Fa){Q.value=E,b.handleError(Fa)}}}else ma(fa);ea=X.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerText="";mxUtils.write(H,(null!=ea?ea+" ":"")+Z.toLocaleDateString()+
-" "+Z.toLocaleTimeString());H.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");S.removeAttribute("disabled");u.removeAttribute("disabled");z.removeAttribute("disabled");F.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),N.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(G,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(z,60);
-mxUtils.setOpacity(F,60)}else Q.style.display="none",Q.innerText="",H.innerText="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ba,mxResources.get("current")):Z.toDateString()===P?mxUtils.write(ba,
-Z.toLocaleTimeString()):mxUtils.write(ba,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ea){B!=X&&(q.stop(),null!=C&&(C.style.backgroundColor=""),B=X,C=Y,C.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=I=null,H.removeAttribute("title"),
-H.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=x.defaultPageBackgroundColor,v.innerText="",x.getModel().clear(),U.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),Q.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(F,20),q.spin(m),X.getXml(function(ja){if(B==X)try{aa(ja)}catch(fa){H.innerText=mxResources.get("error")+": "+fa.message}},function(ja){q.stop();Q.style.display="none";Q.innerText="";H.innerText="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(Y,"dblclick",function(ea){t.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);O.appendChild(Y)}return Y}(e[n]);null!=R&&n==e.length-1&&(L=R)}T.appendChild(O);l.appendChild(T)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l,
-mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(Q);D.appendChild(G);D.appendChild(S);D.appendChild(z);D.appendChild(u);D.appendChild(F);b.editor.cancelFirst?(y.appendChild(l),y.appendChild(N),y.appendChild(W),y.appendChild(U),y.appendChild(t)):(y.appendChild(N),y.appendChild(W),y.appendChild(U),y.appendChild(t),y.appendChild(l));c.appendChild(y);c.appendChild(D);c.appendChild(H);
-this.container=c},DraftDialog=function(b,e,f,c,l,m,v,x,E){var d=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,e);d.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(E[k.value].data);I=b.editor.extractGraphModel(B.documentElement,!0);M=0;this.init()});if(null!=E){k.style.marginLeft="4px";for(e=0;e<E.length;e++){var q=
-document.createElement("option");q.setAttribute("value",e);var p=new Date(E[e].created),y=new Date(E[e].modified);mxUtils.write(q,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),y.toDateString(),y.toLocaleDateString())+" "+y.toLocaleTimeString());k.appendChild(q)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=E[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left=
-"40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);d.appendChild(A);var C=new Graph(A);C.setEnabled(!1);C.setPanning(!0);C.panningHandler.ignoreCell=!0;C.panningHandler.useLeftButtonForPanning=!0;C.minFitScale=null;C.maxFitScale=null;C.centerZoom=!0;var B=mxUtils.parseXml(f),I=b.editor.extractGraphModel(B.documentElement,!0),M=0,G=null,S=C.getGlobalVariable;C.getGlobalVariable=function(z){return"page"==z&&null!=G&&null!=G[M]?
-G[M].getAttribute("name"):"pagenumber"==z?M+1:"pagecount"==z?null!=G?G.length:1:S.apply(this,arguments)};C.getLinkForCell=function(){return null};f=mxUtils.button("",function(){C.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){C.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut"));
-g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){C.maxFitScale=8;C.fit(8);C.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);q=mxUtils.button("",function(){C.zoomActual();C.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline=
-"none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);v=mxUtils.button(v||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});v.className="geBtn";var u=document.createElement("select");u.style.maxWidth="80px";u.style.position="relative";u.style.top="-2px";u.style.verticalAlign=
-"bottom";u.style.marginRight="6px";u.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[k.value])});m.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";y=document.createElement("div");y.className="geToolbarContainer";y.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
-function(){function z(H){if(null!=H){var N=H.getAttribute("background");if(null==N||""==N||N==mxConstants.NONE)N=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=N;(new mxCodec(H.ownerDocument)).decode(H,C.getModel());C.maxFitScale=1;C.fit(8);C.center()}return H}function F(H){null!=H&&(H=z(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(u,"change",function(H){M=parseInt(u.value);F(G[M]);mxEvent.consume(H)});if("mxfile"==I.nodeName){var J=I.getElementsByTagName("diagram");
-G=[];for(var K=0;K<J.length;K++)G.push(J[K]);0<G.length&&F(G[M]);u.innerText="";if(1<G.length)for(u.style.display="",K=0;K<G.length;K++)J=document.createElement("option"),mxUtils.write(J,G[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),J.setAttribute("value",K),K==M&&J.setAttribute("selected","selected"),u.appendChild(J);else u.style.display="none"}else z(I)};y.appendChild(u);y.appendChild(f);y.appendChild(g);y.appendChild(q);y.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";x=null!=x?mxUtils.button(mxResources.get("ignore"),x):null;null!=x&&(x.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=x&&p.appendChild(x),p.appendChild(v),p.appendChild(m)):(p.appendChild(m),p.appendChild(v),null!=x&&p.appendChild(x),p.appendChild(f));d.appendChild(p);d.appendChild(y);this.container=d},FindWindow=function(b,e,f,c,l,m){function v(V,W,t,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
-for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var T=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=T.indexOf(t)||!D&&T.substring(0,t.length)===t)||null!=V&&V.test(T))return!0}}return!1}function x(){q&&G.value?(N.removeAttribute("disabled"),U.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));G.value&&M.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function E(V,
-W,t){K.innerText="";var D=g.model.getDescendants(g.model.getRoot()),L=M.value.toLowerCase(),T=S.checked?new RegExp(L):null,O=null;y=null;k!=L&&(k=L,n=null,p=!1);var P=null==n;if(0<L.length){if(p){p=!1;for(var R,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){R=X;break}V=(R+1)%b.pages.length;n=null;do p=!1,D=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(D),g.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!E(!0,W,t)&&V!=R);n&&(n=null,t?b.editor.graph.model.execute(new SelectPage(b,
-D)):b.selectPage(D));p=!1;g=b.editor.graph;return E(!0,W,t)}for(X=0;X<D.length;X++){R=g.view.getState(D[X]);W&&null!=T&&(P=P||R==n);if(null!=R&&null!=R.cell.value&&(P||null==O)&&(g.model.isVertex(R.cell)||g.model.isEdge(R.cell))){null!=R.style&&"1"==R.style.html?(z.innerHTML=g.sanitizeHtml(g.getLabel(R.cell)),label=mxUtils.extractTextWithWhitespace([z])):label=g.getLabel(R.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;W&&m&&null!=T&&R==n&&(label=label.substr(A),
-Z=A);var Y=""==G.value,aa=Y;if(null==T&&(aa&&0<=label.indexOf(L)||!aa&&label.substring(0,L.length)===L||Y&&v(T,R.cell,L,aa))||null!=T&&(T.test(label)||Y&&v(T,R.cell,L,aa)))if(m&&(null!=T?(Y=label.match(T),null!=Y&&0<Y.length&&(y=Y[0].toLowerCase(),A=Z+Y.index+y.length)):(y=L,A=y.length)),P){O=R;break}else null==O&&(O=R)}P=P||R==n}}if(null!=O){if(X==D.length&&u.checked)return n=null,p=!0,E(!0,W,t);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?t||g.getSelectionCell()==n.cell&&
-1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&u.checked)return p=!0,E(!0,W,t);g.isEnabled()&&!t&&g.clearSelection()}q=null!=O;m&&!V&&x();return 0==L.length||null!=O}var d=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,q=!1,p=!1,y=null,A=0,C=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var I=m?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder",
-mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=I;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";B.appendChild(M);mxUtils.br(B);if(m){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=I;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";
-B.appendChild(G);mxUtils.br(B);mxEvent.addListener(G,"input",x)}var S=document.createElement("input");S.setAttribute("id","geFindWinRegExChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";B.appendChild(S);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");B.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));B.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
-"6px";I.style.top="-1px";B.appendChild(I);mxUtils.br(B);var u=document.createElement("input");u.setAttribute("id","geFindWinAllPagesChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");B.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));B.appendChild(I);var z=document.createElement("div");mxUtils.br(B);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
-"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";B.appendChild(I);var F=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";m&&(G.value="",x());k=n=null;p=!1;M.focus()});F.setAttribute("title",mxResources.get("reset"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";m||I.appendChild(F);var J=mxUtils.button(mxResources.get("find"),
-function(){try{M.style.backgroundColor=E()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";I.appendChild(J);var K=document.createElement("div");K.style.marginTop="10px";if(m){var H=function(V,W,t,D,L){if(null==L||"1"!=L.html)return D=V.toLowerCase().indexOf(W,
-D),0>D?V:V.substr(0,D)+t+V.substr(D+W.length);var T=V;W=mxUtils.htmlEntities(W);L=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)L.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return T;T=D+W.length;t=mxUtils.htmlEntities(t);V=V.substr(0,D)+t+V.substr(T);for(var P=0,R=0;R<L.length;R++){if(L[R]-P<D)V=V.substr(0,L[R])+O[R]+V.substr(L[R]);else{var X=L[R]-P<T?D+P:L[R]+(t.length-W.length);V=V.substr(0,X)+O[R]+V.substr(X)}P+=O[R].length}return V.replace(/\n/g,
-"<br>")},N=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=y&&null!=n&&G.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,H(W,y,G.value,A-y.length,g.getCurrentCellStyle(V)));M.style.backgroundColor=E(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});N.setAttribute("title",mxResources.get("replFind"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
-"ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");I.appendChild(N);mxUtils.br(I);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=y&&null!=n&&G.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,H(W,y,G.value,A-y.length,g.getCurrentCellStyle(V)));N.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
-U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");I.appendChild(U);var Q=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(G.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var t=0,D={};E(!1,!0,!0)&&100>t;){var L=n.cell,T=g.getLabel(L),O=D[L.id];if(O&&O.replAllMrk==
-C&&O.replAllPos>=A)break;D[L.id]={replAllMrk:C,replAllPos:A};g.isCellEditable(L)&&(g.model.setValue(L,H(T,y,G.value,A-y.length,g.getCurrentCellStyle(L))),t++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(K,mxResources.get("matchesRepl",[t]))}catch(P){b.handleError(P)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}C++}});Q.setAttribute("title",mxResources.get("replaceAll"));Q.style.float="none";Q.style.width="120px";
-Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");I.appendChild(Q);mxUtils.br(I);I.appendChild(F);F=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));F.setAttribute("title",mxResources.get("close"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow=
-"ellipsis";F.className="geBtn";I.appendChild(F);mxUtils.br(I);I.appendChild(K)}else F.style.width="90px",J.style.width="90px";mxEvent.addListener(M,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)d.funct();else if(k!=M.value.toLowerCase()||13==V.keyCode)try{M.style.backgroundColor=E()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70==
-V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(d.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),B,e,f,c,l,!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?M.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?u.removeAttribute("disabled"):(u.checked=!1,u.setAttribute("disabled","disabled"))):g.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,m){var v=b.editor.graph,x=document.createElement("div");x.style.textAlign="center";x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";if(m){var E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type",
-"checkbox");E.checked=v.freehand.isPerfectFreehandMode();E.style.margin="10px 5px 0px 10px";E.style.float="left";x.appendChild(E);var d=document.createElement("label");d.setAttribute("for","geFreehandBrush");d.style.float="left";d.style.marginTop="10px";x.appendChild(d);mxUtils.write(d,mxResources.get("brush"));x.appendChild(d);mxUtils.br(x);var g=document.createElement("input");g.setAttribute("type","range");g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",v.freehand.getBrushSize());
-g.style.width="90%";g.style.visibility="hidden";x.appendChild(g);mxUtils.br(x);d=function(){v.freehand.setPerfectFreehandMode(E.checked);g.style.visibility=E.checked?"visible":"hidden"};mxEvent.addListener(E,"change",d);d();mxEvent.addListener(g,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));
-k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";x.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),x,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);v.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,
-mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));var n=document.createElement("span");n.style.opacity="0.7";n.style["float"]="right";mxUtils.write(n,"X");k.appendChild(n);k.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(v.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&
-v.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,e,f,c,l){var m=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(E,d){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],q=0;q<k.length;q++){var p=mxUtils.trim(k[q]);""!=p&&0>mxUtils.indexOf(E,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?d(E.concat(n)):
-m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),x=v.div;this.window=new mxWindow(mxResources.get("tags"),x,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));b.installResizeHandler(this,
-!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var v="Unknown",x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),x.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
-e==b.dropbox?(v=mxResources.get("dropbox"),x.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),x.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),x.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),x.src=IMAGE_PATH+"/gitlab-logo.svg",x.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),x.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
-[v]));var E=document.createElement("input");E.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(E.checked)});v.insertBefore(x,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize="18px";v.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),
-l.appendChild(f),E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(d){E.checked=!E.checked;mxEvent.consume(d)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var v=b.sidebar.customEntries[m],x={title:b.getResource(v.title),entries:[]},E=0;E<v.entries.length;E++){var d=v.entries[E];x.entries.push({id:d.id,title:b.getResource(d.title),
-desc:b.getResource(d.desc),image:d.preview})}l.push(x)}for(m=0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{x={title:f[m].title,entries:[]};for(E=0;E<f[m].entries.length;E++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[E].id)&&x.entries.push(f[m].entries[E]);0<x.entries.length&&l.push(x)}f=l;if(e){m=mxUtils.bind(this,function(S){for(var u=0;u<S.length;u++)(function(z){var F=p.cloneNode(!1);F.style.fontWeight="bold";F.style.backgroundColor=Editor.isDarkMode()?
-"#505759":"#e5e5e5";F.style.padding="6px 0px 6px 20px";mxUtils.write(F,z.title);g.appendChild(F);for(var J=0;J<z.entries.length;J++)(function(K){var H=p.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",K.title+" ("+K.id+")");var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=b.sidebar.isEntryVisible(K.id);N.defaultChecked=N.checked;H.appendChild(N);
-mxUtils.write(H," "+K.title);g.appendChild(H);var U=function(Q){if(null==Q||"INPUT"!=mxEvent.getSource(Q).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=K.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,K.desc);k.appendChild(V)}null!=K.imageCallback?K.imageCallback(k):null!=K.image?k.innerHTML+='<img border="0" src="'+
-K.image+'"/>':null==K.desc&&(k.style.padding="20px",k.style.color="rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=H;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=Q&&mxEvent.consume(Q)}};mxEvent.addListener(H,"click",U);mxEvent.addListener(H,"dblclick",function(Q){N.checked=!N.checked;mxEvent.consume(Q)});q.push(function(){return N.checked?K.id:null});0==u&&0==J&&U()})(z.entries[J])})(S[u])});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";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom=
-"60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";var n=null,q=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(E);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height=
-"60px";f.style.lineHeight="52px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.position="relative";y.style.top="1px";y.checked=b.sidebar.sidebarTitles;y.defaultChecked=y.checked;f.appendChild(y);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(S){y.checked=!y.checked;mxEvent.consume(S)});var A=document.createElement("input");A.setAttribute("type","checkbox");
-if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(A),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(m,"click",function(S){mxEvent.getSource(S)!=A&&(A.checked=!A.checked,mxEvent.consume(S))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";E=mxUtils.button(mxResources.get("apply"),
-function(){b.hideDialog();for(var S=[],u=0;u<q.length;u++){var z=q[u].apply(this,arguments);null!=z&&S.push(z)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(u=mxUtils.indexOf(S,".scratchpad"),null!=b.scratchpad!=(0<=u&&0<S.splice(u,1).length)&&b.toggleScratchpad(),u=mxUtils.indexOf(S,"search"),mxSettings.settings.search=0<=u&&0<S.splice(u,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(S.join(";"),A.checked,!0);b.setSidebarTitles(y.checked,
-A.checked)});E.className="geBtn gePrimaryBtn"}else{var C=document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";E=document.createElement("tr");C.style.width="100%";e=document.createElement("td");l=document.createElement("td");v=document.createElement("td");var B=mxUtils.bind(this,function(S,u,z){var F=document.createElement("input");F.type="checkbox";C.appendChild(F);F.checked=b.sidebar.isEntryVisible(z);var J=document.createElement("span");
-mxUtils.write(J,u);u=document.createElement("div");u.style.display="block";u.appendChild(F);u.appendChild(J);mxEvent.addListener(J,"click",function(K){F.checked=!F.checked;mxEvent.consume(K)});S.appendChild(u);return function(){return F.checked?z:null}});E.appendChild(e);E.appendChild(l);E.appendChild(v);m.appendChild(E);C.appendChild(m);q=[];var I=0;for(m=0;m<f.length;m++)for(E=0;E<f[m].entries.length;E++)I++;var M=[e,l,v],G=0;for(m=0;m<f.length;m++)(function(S){for(var u=0;u<S.entries.length;u++){var z=
-S.entries[u];q.push(B(M[Math.floor(G/(I/3))],z.title,z.id));G++}})(f[m]);c.appendChild(C);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(S){A.checked=!A.checked;mxEvent.consume(S)}));
-c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){for(var S=["search"],u=0;u<q.length;u++){var z=q[u].apply(this,arguments);null!=z&&S.push(z)}b.sidebar.showEntries(0<S.length?S.join(";"):"",A.checked);b.hideDialog()});E.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(E)):
-(f.appendChild(E),f.appendChild(m));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function l(){E=!0;if(0==x.length)v.innerText=mxResources.get("noPlugins");else{v.innerText="";for(var p=0;p<x.length;p++){var y=document.createElement("span");y.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";y.appendChild(A);
-mxUtils.write(y,x[p]);v.appendChild(y);mxUtils.br(v);mxEvent.addListener(A,"click",function(C){return function(){b.confirm(mxResources.get("delete")+' "'+x[C]+'"?',function(){null!=f&&f(x[C]);x.splice(C,1);l()})}}(p))}}}var m=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var x=mxSettings.getPlugins().slice(),E=!1;m.appendChild(v);l();E=!1;var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(p){p&&0>mxUtils.indexOf(x,
-p)&&x.push(p);l()})}:function(){var p=document.createElement("div"),y=document.createElement("span");y.style.marginTop="6px";mxUtils.write(y,mxResources.get("builtinPlugins")+": ");p.appendChild(y);var A=document.createElement("select");A.style.width="150px";for(y=0;y<App.publicPlugin.length;y++){var C=document.createElement("option");mxUtils.write(C,App.publicPlugin[y]);C.value=App.publicPlugin[y];A.appendChild(C)}p.appendChild(A);mxUtils.br(p);mxUtils.br(p);y=mxUtils.button(mxResources.get("custom")+
-"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var M=0;M<I.length;M++){var G=I[M],S=App.pluginRegistry[G];null!=S&&(G=S);0<G.length&&0>mxUtils.indexOf(x,G)&&x.push(G)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});y.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[A.value];0>mxUtils.indexOf(x,
-B)&&(x.push(B),l())}),null,null,null,y);b.showDialog(p.container,360,100,!0,!0)});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){E?(mxSettings.setPlugins(x),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";
-n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(d),n.appendChild(k)):(n.appendChild(d),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var S=A.checked,u=C.checked,z=q.geometry,F=E.width,
-J=E.height,K=(300-F)/2,H=(300-J)/2;z.x<K?(z.width-=K-z.x,z.x=K):z.x+z.width>K+F&&(z.width=K+F-z.x,z.x=Math.min(z.x,K+F));z.y<H?(z.height-=H-z.y,z.y=H):z.y+z.height>H+J&&(z.height=H+J-z.y,z.y=Math.min(z.y,H+J));var N=(z.x-K)/F*100;F=100-(z.x+z.width-K)/F*100;K=(z.y-H)/J*100;z=100-(z.y+z.height-H)/J*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(F)+"% "+mxUtils.format(z)+"% "+mxUtils.format(N)+"%"+(S?" round "+n+"%":u?" round 50%":"")+")"}function m(S){null!=g&&(!0!==S&&(g.model.setGeometry(q,
-k.clone()),n=5,I.value=n),g.model.setStyle(q,p+l()),g.selectAll(),B.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),x=document.createElement("div");x.style.height="300px";x.style.width="300px";x.style.display="inline-flex";x.style.justifyContent="center";x.style.alignItems="center";x.style.position="absolute";var E=document.createElement("img");E.onload=function(){function S(){g.model.setStyle(q,p+l())}g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);
-g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var u=g.createVertexHandler;g.createVertexHandler=function(){var T=u.apply(this,arguments);T.livePreview=!1;return T};if(null!=f)try{if("inset"==f.substring(0,5)){var z=q.geometry,F=E.width,J=E.height,K=(300-F)/2,H=(300-J)/2,N=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(N[0]),Q=parseFloat(N[1]),V=parseFloat(N[2]),W=parseFloat(N[3]);isFinite(U)&&isFinite(Q)&&isFinite(V)&&
-isFinite(W)?(z.x=W/100*F+K,z.y=U/100*J+H,z.width=(100-Q)/100*F+K-z.x,z.height=(100-V)/100*J+H-z.y,"round"==N[4]?"50%"==N[5]?C.setAttribute("checked","checked"):(n=parseInt(N[5]),I.value=n,A.setAttribute("checked","checked"),B.style.visibility="visible"):y.setAttribute("checked","checked")):f=null}else f=null}catch(T){}q.style=p+(f?f:l());q.vertex=!0;g.addCell(q,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,S);g.addListener(mxEvent.CELLS_RESIZED,S);var t=g.graphHandler.mouseUp,
-D=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){t.apply(this,arguments);d.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){D.apply(this,arguments);d.style.backgroundColor=""};g.dblClick=function(){};var L=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){L.call(this,[q],[q])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";x.appendChild(E);v.appendChild(x);
-var d=document.createElement("div");d.style.width="300px";d.style.height="300px";d.style.overflow="hidden";d.style.backgroundColor="#fff9";v.appendChild(d);var g=null,k=new mxGeometry(100,100,100,100),n=5,q=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRect");y.setAttribute("name","croppingShape");y.setAttribute("checked",
-"checked");y.style.margin="5px";v.appendChild(y);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);
-var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingEllipse");C.setAttribute("name","croppingShape");C.style.margin="5px";v.appendChild(C);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(y,"change",m);mxEvent.addListener(A,"change",m);mxEvent.addListener(C,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility=
-"hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",n);I.setAttribute("title",mxResources.get("arcSize"));B.appendChild(I);v.appendChild(B);mxEvent.addListener(I,"change",function(){n=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){c(l(),q.geometry.width,q.geometry.height);b.hideDialog()});
-x.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){c(null,E.width,E.height);b.hideDialog()});M.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(e),G.appendChild(M),G.appendChild(x)):(G.appendChild(M),G.appendChild(x),G.appendChild(e));v.appendChild(G);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),
-m=document.createElement("table"),v=document.createElement("tbody"),x=document.createElement("tr"),E=document.createElement("td"),d=document.createElement("td");m.style.paddingLeft="6px";mxUtils.write(E,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");
-E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";d.appendChild(k);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width=
-"100px";n.value=null!=c?c.y:"";d.appendChild(n);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";d.appendChild(q);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");
-d=document.createElement("td");mxUtils.write(E,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c&&null!=c.offset?c.offset.y:"";d.appendChild(p);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("width")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
-y.value=null!=c?c.width:"";d.appendChild(y);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";d.appendChild(A);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");
-mxUtils.write(E,mxResources.get("rotation")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";d.appendChild(C);x.appendChild(E);x.appendChild(d);v.appendChild(x);m.appendChild(v);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();
-try{for(var I=0;I<e.length;I++){var M=f.getCellGeometry(e[I]);null!=M&&(M=M.clone(),f.isCellMovable(e[I])&&(M.relative=g.checked,0<mxUtils.trim(k.value).length&&(M.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(M.y=Number(n.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(q.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(p.value))),f.isCellResizable(e[I])&&(0<mxUtils.trim(y.value).length&&(M.width=
-Number(y.value)),0<mxUtils.trim(A.value).length&&(M.height=Number(A.value))),f.getModel().setGeometry(e[I],M));0<mxUtils.trim(C.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(C.value),[e[I]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(I){13==I.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),
-m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,e,f,c,l,m){function v(u){for(u=document.elementFromPoint(u.clientX,u.clientY);null!=u&&u.parentNode!=q;)u=u.parentNode;var z=null;if(null!=u){var F=q.firstChild;for(z=0;null!=F&&F!=u;)F=F.nextSibling,z++}return z}function x(u,z,F,J,K,H,N,U,Q){try{if(b.spinner.stop(),null==z||"image/"==z.substring(0,6))if(null==u&&null!=N||null==y[u]){var V=function(){R.innerText="";R.style.cursor="pointer";R.style.whiteSpace="nowrap";R.style.textOverflow=
-"ellipsis";mxUtils.write(R,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));R.style.color=null==X.title||0==X.title.length?"#d0d0d0":""};q.style.backgroundImage="";p.style.display="none";var W=K,t=H;if(K>b.maxImageSize||H>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,H));K*=D;H*=D}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display=
-"inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition","transform .1s ease-in-out");if(null!=u){var T=document.createElement("img");T.setAttribute("src",I.convert(u));T.style.width=W+"px";T.style.height=t+"px";T.style.margin="10px";T.style.paddingBottom=Math.floor((100-t)/2)+"px";T.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(T)}else if(null!=N){var O=b.stringToCells(Graph.decompress(N.xml));0<O.length&&
-(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var P=document.createElement("img");P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(ba){mxEvent.consume(ba)});
-(function(ba,ea,ja){mxEvent.addListener(P,"click",function(fa){y[ea]=null;for(var ra=0;ra<g.length;ra++)if(null!=g[ra].data&&g[ra].data==ea||null!=g[ra].xml&&null!=ja&&g[ra].xml==ja.xml){g.splice(ra,1);break}L.parentNode.removeChild(ba);0==g.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(fa)});mxEvent.addListener(P,"dblclick",function(fa){mxEvent.consume(fa)})})(L,u,N);L.appendChild(P);L.style.marginBottom="30px";var R=document.createElement("div");
-R.style.position="absolute";R.style.boxSizing="border-box";R.style.bottom="-18px";R.style.left="10px";R.style.right="10px";R.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";R.style.overflow="hidden";R.style.textAlign="center";var X=null;null!=u?(X={data:u,w:K,h:H,title:Q},null!=U&&(X.aspect=U),y[u]=T,g.push(X)):null!=N&&(N.aspect="fixed",g.push(N),X=N);mxEvent.addListener(R,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();L.appendChild(R);
-mxEvent.addListener(R,"mousedown",function(ba){"true"!=R.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ja){null!=ja&&(X.title=ja,V())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(ba)}else if("true"!=R.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==
-X.title||0==X.title.length)R.innerText="";R.style.textOverflow="";R.style.whiteSpace="";R.style.cursor="text";R.style.color="";R.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(R.style,"user-select","text");R.focus();document.execCommand("selectAll",!1,null);B=function(){R.removeAttribute("contentEditable");R.style.cursor="pointer";X.title=R.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(R,"click",O);mxEvent.addListener(L,"dblclick",O);q.appendChild(L);mxEvent.addListener(L,
-"dragstart",function(ba){null==u&&null!=N&&(P.style.visibility="hidden",R.style.visibility="hidden");mxClient.IS_FF&&null!=N.xml&&ba.dataTransfer.setData("Text",N.xml);A=v(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);P.style.visibility="";R.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==P.style.visibility&&(P.style.visibility="",R.style.visibility="");
-A=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(W=mxUtils.parseXml(u),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var Z=0;Z<t.length;Z++)null!=t[Z].xml?x(null,null,0,0,0,0,t[Z]):x(t[Z].data,null,0,0,t[Z].w,t[Z].h,null,"fixed",t[Z].title);K=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");
-for(Z=0;Z<Y.length;Z++){t=mxUtils.getTextContent(Y[Z]);O=b.stringToCells(Graph.decompress(t));var aa=b.editor.graph.getBoundingBoxFromGeometry(O);x(null,null,0,0,0,0,{xml:t,w:aa.width,h:aa.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function E(u){u.dataTransfer.dropEffect=null!=A?"move":"copy";u.stopPropagation();u.preventDefault()}function d(u){u.stopPropagation();u.preventDefault();M=!1;C=v(u);if(null!=A)null!=
-C&&C<q.children.length?(g.splice(C>A?C-1:C,0,g.splice(A,1)[0]),q.insertBefore(q.children[A],q.children[C])):(g.push(g.splice(A,1)[0]),q.appendChild(q.children[A]));else if(0<u.dataTransfer.files.length)b.importFiles(u.dataTransfer.files,0,0,b.maxImageSize,G(u));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")){var z=decodeURIComponent(u.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(z)||/(\.png)($|\?)/i.test(z)||/(\.gif)($|\?)/i.test(z)||/(\.svg)($|\?)/i.test(z))&&b.loadImage(z,
-function(F){x(z,null,0,0,F.width,F.height);q.scrollTop=q.scrollHeight})}u.stopPropagation();u.preventDefault()}var g=[];f=document.createElement("div");f.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";f.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",e);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";
-null==l||l.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat=
-"no-repeat";0==g.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var y={},A=null,C=null,B=null;e=function(u){"true"!=mxEvent.getSource(u).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(u))};
-mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",e);var I=new mxUrlConverter,M=!1;if(null!=c)for(e=0;e<c.length;e++)k=c[e],x(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(q,"dragleave",function(u){p.style.cursor="";for(var z=mxEvent.getSource(u);null!=z;){if(z==q||z==p){u.stopPropagation();u.preventDefault();break}z=z.parentNode}});var G=function(u){return function(z,F,J,K,H,N,U,Q,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||
-/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){x(W,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(z,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(x(W.responseText,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g,
-" ")),q.scrollTop=q.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(x(z,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",E);mxEvent.addListener(q,"drop",d);mxEvent.addListener(p,"dragover",E);mxEvent.addListener(p,"drop",d);f.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(u){b.spinner.stop();if(null!=u){var z=b.getSearch("create title mode url drive splash state clibs ui".split(" "));z+=(0==z.length?"?":"&")+"splash=0&clibs=U"+
-encodeURIComponent(u);u=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+z,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(u.container,450,240,!0);u.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),
-k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"),function(){var u=b.createLibraryDataFromImages(g),z=n.value;/(\.xml)$/i.test(z)||(z+=".xml");b.isLocalFileSave()?b.saveLocalFile(u,z,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(z)+"&format=xml&xml="+encodeURIComponent(u))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var S=
-document.createElement("input");S.setAttribute("multiple","multiple");S.setAttribute("type","file");mxEvent.addListener(S,"change",function(u){M=!1;b.importFiles(S.files,0,0,b.maxImageSize,function(z,F,J,K,H,N,U,Q,V){null!=S.files&&(G(u)(z,F,J,K,H,N,U,Q,V),S.type="",S.type="file",S.value="")});q.scrollTop=q.scrollHeight});S.style.display="none";document.body.appendChild(S);b.libDlgFileInputElt=S}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});
-k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(u,z,F){M=!1;if(null!=u){if("data:image/"==u.substring(0,11)){var J=u.indexOf(",");0<J&&(u=u.substring(0,J)+";base64,"+u.substring(J+1))}x(u,null,0,0,z,F);q.scrollTop=q.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(u,
-z,F,J){b.saveLibrary(u,z,F,J)};k=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),v=document.createElement("tbody");m.style.cellPadding="4px";var x=document.createElement("tr");
-var E=document.createElement("td");E.setAttribute("colspan","2");E.style.fontSize="10pt";mxUtils.write(E,f);x.appendChild(E);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=c-200+"px";d.style.height=l+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};E.appendChild(d);x.appendChild(E);E=document.createElement("td");f=document.createElement("div");f.style.position=
-"relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);E.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(e);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(d,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,
-20/l-f.x,20/l-f.y);x.appendChild(E);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");E.setAttribute("colspan","2");E.style.paddingTop="2px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",E.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";
-b.editor.cancelFirst&&E.appendChild(l);var q=function(p,y,A){var C=d.value,B=mxUtils.parseXml(C);C=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),B=!p.model.contains(y),!A||B||C!=n){C=Graph.compress(C);p.getModel().beginUpdate();try{if(B){var I=b.editor.graph.getFreeInsertPoint();y.geometry.x=I.x;y.geometry.y=
-I.y;p.addCell(y)}p.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+C+")",[y])}catch(M){throw M;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(y),p.scrollCellToVisible(y))}};f=mxUtils.button(mxResources.get("preview"),function(){q(g,k,!1)});f.className="geBtn";E.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){q(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(l);x.appendChild(E);v.appendChild(x);m.appendChild(v);
-this.container=m},CustomDialog=function(b,e,f,c,l,m,v,x,E,d,g){var k=document.createElement("div");k.appendChild(e);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=v&&n.appendChild(v);b.isOffline()||null==m||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),e.className="geBtn",n.appendChild(e));E=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});E.className="geBtn";x&&(E.style.display="none");b.editor.cancelFirst&&
-n.appendChild(E);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){d||b.hideDialog(null,null,this.container);if(null!=f){var q=f();if("string"===typeof q){b.showError(mxResources.get("error"),q);return}}d&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(E);if(null!=g)for(x=0;x<g.length;x++)(function(q,p,y){q=mxUtils.button(q,function(A){p(A)});null!=y&&q.setAttribute("title",y);q.className="geBtn";
-n.appendChild(q)})(g[x][0],g[x][1],g[x][2]);k.appendChild(n);this.cancelBtn=E;this.okButton=l;this.container=k},TemplatesDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p){function y(ha){oa.innerText=ha;oa.style.display="block";setTimeout(function(){oa.style.display="none"},4E3)}function A(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",D=t,t=null)}function C(ha,ia,pa,va,za,Ea,Ba){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";
-Q.querySelector(".geTempDlgRadioBtn[data-id="+va+"]").className="geTempDlgRadioBtn "+(Ba?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ia).src="/images/"+pa+"-sel.svg";Q.querySelector("."+za).src="/images/"+Ea+".svg";return!0}function B(ha,ia,pa,va){function za(sa,Ha){null==Ba?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&
-(Ba=Na.getText());Ha(Ba)}))):Ha(Ba)}function Ea(sa,Ha,Na){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(sa.ownerDocument),Ia=new mxGraphModel;Ra.decode(sa,Ia);sa=Ia.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-
-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ha,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";Q.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(Q.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}
-var Ba=null;if(La||b.sidebar.currentElt==ia)b.sidebar.hideTooltip();else{var ua=function(sa){La&&b.sidebar.currentElt==ia&&Ea(sa,mxEvent.getClientX(va),mxEvent.getClientY(va));La=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;La=!0;pa.src="/images/aui-wait.gif";ha.isExt?E(ha,ua,function(){y(mxResources.get("cantLoadPrev"));La=!1;pa.src="/images/icon-search.svg"}):za(ha.url,ua)}}function I(ha,ia,pa){if(null!=L){for(var va=L.className.split(" "),za=0;za<va.length;za++)if(-1<
-va[za].indexOf("Active")){va.splice(za,1);break}L.className=va.join(" ")}null!=ha?(L=ha,L.className+=" "+ia,T=pa,Ma.className="geTempDlgCreateBtn"):(T=L=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(ha,ia){if(null!=T){var pa=function(ua){Ba.isExternal?E(Ba,function(sa){va(sa,ua)},za):Ba.url?mxUtils.get(TEMPLATE_PATH+"/"+Ba.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?va(sa.getText(),ua):za()})):va(b.emptyDiagramXml,ua)},va=function(ua,sa){p||
-b.hideDialog(!0);e(ua,sa,Ba,ia)},za=function(){y(mxResources.get("cannotLoad"));Ea()},Ea=function(){T=Ba;Ma.className="geTempDlgCreateBtn";ia&&(xa.className="geTempDlgOpenBtn")},Ba=T;T=null;"boolean"!==typeof ia&&(ia=Ba.isExternal&&k);1==ha?d(Ba.url,Ba):ia?(xa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
-mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),pa,ha,function(ua){var sa=null!=ua&&0<ua.length;return sa&&p?(pa(ua),!1):sa},null,null,null,Ea,q?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function G(ha){Ma.innerText=mxResources.get(ba||ha?"create":"copy");ha=ha?"none":"";k&&(xa.style.display=ha);for(var ia=Q.querySelectorAll(".geTempDlgLinkToDiagram"),pa=0;pa<ia.length;pa++)ia[pa].style.display=ha}function S(ha,ia,pa,va,za){za||
-(ja.innerText="",I(),X=ha,Z=va);var Ea=null;if(pa){Ea=document.createElement("table");Ea.className="geTempDlgDiagramsListGrid";var Ba=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Ba.appendChild(ua);
-Ea.appendChild(Ba);ja.appendChild(Ea)}for(Ba=0;Ba<ha.length;Ba++){ha[Ba].isExternal=!ia;var sa=ha[Ba].url,Ha=(ua=mxUtils.htmlEntities(ia?mxResources.get(ha[Ba].title,null,ha[Ba].title):ha[Ba].title))||ha[Ba].url,Na=ha[Ba].imgUrl,Ra=ha[Ba].changedBy||"",Ia="";ha[Ba].lastModifiedOn&&(Ia=b.timeSince(new Date(ha[Ba].lastModifiedOn)),null==Ia&&(Ia=mxResources.get("lessThanAMinute")),Ia=mxResources.get("timeAgo",[Ia],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=pa?50:15;
-null!=ua&&ua.length>sa&&(ua=ua.substring(0,sa)+"&hellip;");if(pa){var Pa=document.createElement("tr");Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));za||Na.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ua;Na.appendChild(Ha);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);
-Na=document.createElement("td");Na.innerText=Ia;Pa.appendChild(Na);Ea.appendChild(Pa);null==L&&(G(ia),I(Pa,"geTempDlgDiagramsListGridActive",ha[Ba]));(function(Ka,Ta,Va){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(G(ia),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Pa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(Ka,Ta,Va,Wa)})})(ha[Ba],Pa,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ha);null==L&&
-(G(ia),I(Oa,"geTempDlgDiagramTileActive",ha[Ba]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ka,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Na?Na.replace(".drawio.xml","").replace(".drawio","").replace(".xml",
-""):"");Sa.src=Na;Ra.appendChild(Sa);Oa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));za||Oa.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Oa,"click",function(){L!=Ta&&(G(ia),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Oa,"dblclick",
-M);mxEvent.addListener(Qa,"click",function(Wa){B(Ka,Ta,Va,Wa)})})(ha[Ba],Oa,Qa);ja.appendChild(Oa)}}for(var Ua in va)ha=va[Ua],0<ha.length&&(za=document.createElement("div"),za.className="geTempDlgImportCat",za.innerText=mxResources.get(Ua,null,Ua),ja.appendChild(za),S(ha,ia,pa,null,!0))}function u(ha,ia){ya.innerText="";I();var pa=Math.floor(ya.offsetWidth/150)-1;ia=!ia&&ha.length>pa?pa:ha.length;for(var va=0;va<ia;va++){var za=ha[va];za.isCategory=!0;var Ea=document.createElement("div"),Ba=mxResources.get(za.title);
-null==Ba&&(Ba=za.title.substring(0,1).toUpperCase()+za.title.substring(1));Ea.className="geTempDlgNewDiagramCatItem";Ea.setAttribute("title",Ba);Ba=mxUtils.htmlEntities(Ba);15<Ba.length&&(Ba=Ba.substring(0,15)+"&hellip;");null==L&&(G(!0),I(Ea,"geTempDlgNewDiagramCatItemActive",za));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+"/"+za.img;ua.appendChild(sa);Ea.appendChild(ua);ua=document.createElement("div");
-ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ba;Ea.appendChild(ua);ya.appendChild(Ea);(function(Ha,Na){mxEvent.addListener(Ea,"click",function(){L!=Na&&(G(!0),I(Na,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ea,"dblclick",M)})(za,Ea)}Ea=document.createElement("div");Ea.className="geTempDlgNewDiagramCatItem";Ba=mxResources.get("showAllTemps");Ea.setAttribute("title",Ba);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize=
-"32px";Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerText=Ba;Ea.appendChild(ua);ya.appendChild(Ea);mxEvent.addListener(Ea,"click",function(){function Ha(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ba=!0;var Na=Q.querySelector(".geTemplatesList");Na.style.display="block";ma.style.width="";Ca.style.display="";Ca.value="";Y=null;Ha()});ea.style.display=ha.length<=pa?"none":""}function z(ha,ia,
-pa){function va(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1));Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function za(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){t!=Ka&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Fa.style.display="none",Ga.style.minHeight="100%"),t=Ka,t.style.fontWeight="bold",
-t.style.textDecoration="underline",ma.scrollTop=0,V&&(W=!0),fa.innerHTML=Ua,ra.style.display="none",S(Va?ia[Sa]:Ta?Ja[Sa][Ta]:ha[Sa],Va?!1:!0))})}var Ea=Q.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));Ea.appendChild(pa);for(var Ba in ia){pa=document.createElement("div");var ua=ia[Ba];ua=va(Ba,ua);pa.className="geTemplateCatLink";
-pa.setAttribute("title",ua.fullLbl);pa.innerHTML=ua.lbl;Ea.appendChild(pa);za(Ba,ua.lblOnly,pa,null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");Ea.appendChild(pa)}for(Ba in ha){var sa=Ja[Ba],Ha=pa=document.createElement(sa?"ul":"div");ua=ha[Ba];ua=va(Ba,ua);if(null!=sa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";
-Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl);Ra.innerHTML=ua.lbl;Ha=Ra;Na.appendChild(Ra);var Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var Pa in sa){var Qa=document.createElement("li"),Oa=va(Pa,sa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";za(Ba,Oa.lblOnly,Qa,Pa);Ia.appendChild(Qa)}Na.appendChild(Ia);pa.className="geTempTree";pa.appendChild(Na);
-(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka=Sa.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ka.length;Va++)Ka[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ia,Ra)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",pa.setAttribute("title",
-ua.fullLbl),pa.innerHTML=ua.lbl;Ea.appendChild(pa);za(Ba,ua.lblOnly,Ha)}}function F(){mxUtils.get(c,function(ha){if(!ta){ta=!0;ha=ha.getXml().documentElement.firstChild;for(var ia={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var pa=ha.getAttribute("name"),va=ha.getElementsByTagName("add"),za=[],Ea=0;Ea<va.length;Ea++)za.push(encodeURIComponent(mxUtils.getTextContent(va[Ea])));null!=pa&&0<za.length&&(ia[pa]=za.join(";"))}else if(za=ha.getAttribute("url"),null!=
-za){va=ha.getAttribute("section");pa=ha.getAttribute("subsection");if(null==va&&(Ea=za.indexOf("/"),va=za.substring(0,Ea),null==pa)){var Ba=za.indexOf("/",Ea+1);-1<Ba&&(pa=za.substring(Ea+1,Ba))}Ea=wa[va];null==Ea&&(ca++,Ea=[],wa[va]=Ea);za=ha.getAttribute("clibs");null!=ia[za]&&(za=ia[za]);za={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:za,tags:ha.getAttribute("tags")};Ea.push(za);null!=pa&&
-(Ea=Ja[va],null==Ea&&(Ea={},Ja[va]=Ea),va=Ea[pa],null==va&&(va=[],Ea[pa]=va),va.push(za))}ha=ha.nextSibling}z(wa,ka,na)}})}function J(ha){v&&(ma.scrollTop=0,ja.innerText="",Aa.spin(ja),W=!1,V=!0,fa.innerText=mxResources.get("recentDiag"),Y=null,v(la,function(){y(mxResources.get("cannotLoad"));la([])},ha?null:m))}function K(ha){if(""==ha)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ia={};for(Ha in wa)for(var pa=wa[Ha],va=0;va<pa.length;va++){var za=pa[va];if(null!=za.tags)for(var Ea=
-za.tags.toLowerCase().split(";"),Ba=0;Ba<Ea.length;Ba++)null==ia[Ea[Ba]]&&(ia[Ea[Ba]]=[]),ia[Ea[Ba]].push(za)}TemplatesDialog.tagsList[c]=ia}var ua=ha.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[c];if(0<na&&null==ia.__tagsList__){for(Ha in ka)for(pa=ka[Ha],va=0;va<pa.length;va++)for(za=pa[va],Ea=za.title.split(" "),Ea.push(Ha),Ba=0;Ba<Ea.length;Ba++){var sa=Ea[Ba].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(za)}ia.__tagsList__=!0}var Ha=[];pa={};for(va=Ea=0;va<ua.length;va++)if(0<
-ua[va].length){sa=ia[ua[va]];var Na={};Ha=[];if(null!=sa)for(Ba=0;Ba<sa.length;Ba++)za=sa[Ba],0==Ea==(null==pa[za.url])&&(Na[za.url]=!0,Ha.push(za));pa=Na;Ea++}0==Ha.length?fa.innerText=mxResources.get("noResultsFor",[ha]):S(Ha,!0)}}function H(ha){if(Y!=ha||P!=aa)A(),ma.scrollTop=0,ja.innerText="",fa.innerText=mxResources.get("searchResults")+' "'+ha+'"',qa=null,ba?K(ha):x&&(ha?(Aa.spin(ja),W=!1,V=!0,x(ha,la,function(){y(mxResources.get("searchFailed"));la([])},P?null:m)):J(P)),Y=ha,aa=P}function N(ha){null!=
-qa&&clearTimeout(qa);13==ha.keyCode?H(Ca.value):qa=setTimeout(function(){H(Ca.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(x?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
-mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
+var BackgroundImageDialog=function(b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var k=document.createElement("h2");mxUtils.write(k,mxResources.get("backgroundImage"));k.style.marginTop="0px";c.appendChild(k);var m=null!=e&&null!=e.originalSrc;k=!1;var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","url");u.setAttribute("type","radio");u.setAttribute("name","geBackgroundImageDialogOption");var z=document.createElement("input");
+z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value","url");z.setAttribute("type","radio");z.setAttribute("name","geBackgroundImageDialogOption");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginBottom="8px";C.style.width="360px";C.value=m||null==e?"":e.src;var A=document.createElement("select");A.style.width="360px";if(null!=b.pages)for(var B=0;B<b.pages.length;B++){var J=document.createElement("option");mxUtils.write(J,b.pages[B].getName()||
+mxResources.get("pageWithNumber",[B+1]));J.setAttribute("value","data:page/id,"+b.pages[B].getId());b.pages[B]==b.currentPage&&J.setAttribute("disabled","disabled");null!=e&&e.originalSrc==J.getAttribute("value")&&(J.setAttribute("selected","selected"),k=!0);A.appendChild(J)}m||null!=b.pages&&1!=b.pages.length||(u.style.display="none",z.style.display="none",A.style.display="none");var f=document.createElement("option"),g=!1,l=!1,q=function(G,y){g||null!=G&&l||(z.checked?null!=y&&y(f.selected?null:
+A.value):""==C.value||b.isOffline()?(x.value="",E.value="",null!=y&&y("")):(C.value=mxUtils.trim(C.value),b.loadImage(C.value,function(T){x.value=T.width;E.value=T.height;null!=y&&y(C.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";E.value="";null!=y&&y(null)})))},t=mxUtils.bind(this,function(G){b.importFiles(G,0,0,b.maxBackgroundSize,function(y,T,n,v,H,K){C.value=y;q();C.focus()},function(){},function(y){return"image/"==y.type.substring(0,
+6)},function(y){for(var T=0;T<y.length;T++)y[T]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?A.focus():C.focus();mxEvent.addListener(A,"focus",function(){u.removeAttribute("checked");z.setAttribute("checked","checked");z.checked=!0});mxEvent.addListener(C,"focus",function(){z.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});if(Graph.fileSupport){C.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=c.parentNode,y=null;mxEvent.addListener(G,
+"dragleave",function(T){null!=y&&(y.parentNode.removeChild(y),y=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(T){null==y&&(!mxClient.IS_IE||10<document.documentMode)&&(y=b.highlightElement(G));T.stopPropagation();T.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(T){null!=y&&(y.parentNode.removeChild(y),y=null);if(0<T.dataTransfer.files.length)t(T.dataTransfer.files);else if(0<=mxUtils.indexOf(T.dataTransfer.types,
+"text/uri-list")){var n=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)&&(C.value=decodeURIComponent(n),q())}T.stopPropagation();T.preventDefault()}),!1)}};c.appendChild(u);c.appendChild(C);mxUtils.br(c);B=document.createElement("span");B.style.marginLeft="30px";mxUtils.write(B,mxResources.get("width")+":");c.appendChild(B);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";
+x.value=null==e||m?"":e.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==e||m?"":e.height;c.appendChild(E);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(C,"change",q);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],
+null!=G&&(C.value=G.url,q()));C.focus()};c.appendChild(z);c.appendChild(A);mxUtils.br(c);m?(z.setAttribute("checked","checked"),z.checked=!0):(u.setAttribute("checked","checked"),u.checked=!0);!k&&z.checked&&(mxUtils.write(f,mxResources.get("pageNotFound")),f.setAttribute("disabled","disabled"),f.setAttribute("selected","selected"),f.setAttribute("value","pageNotFound"),A.appendChild(f),mxEvent.addListener(A,"change",function(){null==f.parentNode||f.selected||f.parentNode.removeChild(f)}));e=document.createElement("div");
+e.style.marginTop="30px";e.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){g=!0;b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&e.appendChild(k);B=mxUtils.button(mxResources.get("reset"),function(){C.value="";x.value="";E.value="";u.checked=!0;g=!1});mxEvent.addGestureListeners(B,function(){g=!0});B.className="geBtn";B.width="100";e.appendChild(B);if(Graph.fileSupport){var F=document.createElement("input");F.setAttribute("multiple","multiple");F.setAttribute("type",
+"file");mxEvent.addListener(F,"change",function(G){null!=F.files&&(t(F.files),F.type="",F.type="file",F.value="")});F.style.display="none";c.appendChild(F);B=mxUtils.button(mxResources.get("open"),function(){F.click()});B.className="geBtn";e.appendChild(B)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();q(null,function(G){d(""!=G&&null!=G?new mxImage(G,x.value,E.value):null,null==G)})});mxEvent.addGestureListeners(applyBtn,function(){l=!0});applyBtn.className="geBtn gePrimaryBtn";
+e.appendChild(applyBtn);b.editor.cancelFirst||e.appendChild(k);c.appendChild(e);this.container=c},ParseDialog=function(b,d,e){function c(g,l,q){var t=g.split("\n");if("plantUmlPng"==l||"plantUmlSvg"==l||"plantUmlTxt"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(Q,P,U,W,p){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(new mxRectangle(0,0,W,p));var D=null;E.getModel().beginUpdate();try{D="txt"==P?b.insertAsPreText(U,m.x,m.y):E.insertVertex(null,null,null,m.x,m.y,
+W,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),E.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:Q,format:P},null,2))}finally{E.getModel().endUpdate()}null!=D&&(E.setSelectionCell(D),E.scrollCellToVisible(D))},E=b.editor.graph,F="plantUmlTxt"==l?"txt":"plantUmlPng"==l?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+g&&"svg"==F?window.setTimeout(function(){b.spinner.stop();x(g,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(g,F,function(Q,P,U){b.spinner.stop();x(g,F,Q,P,U)},function(Q){b.handleError(Q)})}}else if("mermaid"==l)b.spinner.spin(document.body,mxResources.get("inserting"))&&(E=b.editor.graph,b.generateMermaidImage(g,F,function(Q,P,U){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(new mxRectangle(0,0,P,U));b.spinner.stop();var W=null;E.getModel().beginUpdate();try{W=E.insertVertex(null,null,null,m.x,m.y,P,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+Q+";"),E.setAttributeForCell(W,"mermaidData",JSON.stringify({data:g,config:EditorUi.defaultMermaidConfig},null,2))}finally{E.getModel().endUpdate()}null!=W&&(E.setSelectionCell(W),E.scrollCellToVisible(W))},function(Q){b.handleError(Q)}));else if("table"==l){l=null;for(var G=[],y=0,T={},n=0;n<t.length;n++){var v=mxUtils.trim(t[n]);if("primary key"==v.substring(0,11).toLowerCase()){var H=v.match(/\((.+)\)/);H&&H[1]&&(T[H[1]]=!0);t.splice(n,1)}else 0<v.toLowerCase().indexOf("primary key")&&(T[v.split(" ")[0]]=
+!0,t[n]=mxUtils.trim(v.replace(/primary key/i,"")))}for(n=0;n<t.length;n++)if(v=mxUtils.trim(t[n]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-1))),l=new mxCell(v,new mxGeometry(y,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),l.vertex=!0,G.push(l),v=b.editor.graph.getPreferredSizeForCell(K),null!=
+v&&(l.geometry.width=v.width+10);else if(null!=l&&")"==v.charAt(0))y+=l.geometry.width+40,l=null;else if("("!=v&&null!=l){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);H=T[v.split(" ")[0]];var K=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(H?"1":"0")+";");K.vertex=!0;var N=new mxCell(H?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(H?"fontStyle=1;":""));N.vertex=!0;K.insert(N);v=new mxCell(v,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(H?"fontStyle=5;":""));v.vertex=!0;K.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&l.geometry.width<v.width+30&&(l.geometry.width=Math.min(320,
+Math.max(l.geometry.width,v.width+30)));l.insert(K,H?0:null);l.geometry.height+=30}0<G.length&&(E=b.editor.graph,m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),E.setSelectionCells(E.importCells(G,m.x,m.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==l){if(0<t.length){E=b.editor.graph;K=null;G=[];for(n=l=0;n<t.length;n++)";"!=t[n].charAt(0)&&(0==t[n].length?K=null:null==K?(K=new mxCell(t[n],new mxGeometry(l,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+K.vertex=!0,G.push(K),v=E.getPreferredSizeForCell(K),null!=v&&K.geometry.width<v.width+10&&(K.geometry.width=v.width+10),l+=K.geometry.width+40):"--"==t[n]?(v=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;"),v.vertex=!0,K.geometry.height+=v.geometry.height,K.insert(v)):0<t[n].length&&(y=new mxCell(t[n],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;"),
+y.vertex=!0,v=E.getPreferredSizeForCell(y),null!=v&&y.geometry.width<v.width&&(y.geometry.width=v.width),K.geometry.width=Math.max(K.geometry.width,y.geometry.width),K.geometry.height+=y.geometry.height,K.insert(y)));if(0<G.length){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0));E.getModel().beginUpdate();try{G=E.importCells(G,m.x,m.y);v=[];for(n=0;n<G.length;n++)v.push(G[n]),v=v.concat(G[n].children);E.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{E.getModel().endUpdate()}E.setSelectionCells(G);
+E.scrollCellToVisible(E.getSelectionCell())}}}else{K=function(Q){var P=I[Q];null==P&&(P=new mxCell(Q,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),P.vertex=!0,I[Q]=P,G.push(P));return P};var I={};G=[];for(n=0;n<t.length;n++)if(";"!=t[n].charAt(0)){var M=t[n].split("->");2<=M.length&&(H=K(M[0]),N=K(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,H.insertEdge(M,!0),N.insertEdge(M,!1),G.push(M))}if(0<G.length){t=document.createElement("div");t.style.visibility="hidden";
+document.body.appendChild(t);E=new Graph(t);E.getModel().beginUpdate();try{G=E.importCells(G);for(n=0;n<G.length;n++)E.getModel().isVertex(G[n])&&(v=E.getPreferredSizeForCell(G[n]),G[n].geometry.width=Math.max(G[n].geometry.width,v.width),G[n].geometry.height=Math.max(G[n].geometry.height,v.height));n=!0;"horizontalFlow"==l||"verticalFlow"==l?((new mxHierarchicalLayout(E,"horizontalFlow"==l?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),G),n=!1):"circle"==l?
+(new mxCircleLayout(E)).execute(E.getDefaultParent()):(y=new mxFastOrganicLayout(E),y.disableEdgeStyle=!1,y.forceConstant=180,y.execute(E.getDefaultParent()));n&&(T=new mxParallelEdgeLayout(E),T.spacing=30,T.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{G=E.getModel().getChildren(E.getDefaultParent()),m=mxEvent.isAltDown(q)?m:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),v=b.editor.graph.importCells(G,
+m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();t.parentNode.removeChild(t)}}}function k(){return"list"==z.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==z.value?
+"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==z.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"==z.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"==z.value||"plantUmlTxt"==z.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 m=b.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var u=document.createElement("textarea");u.style.boxSizing="border-box";u.style.resize=
+"none";u.style.width="100%";u.style.height="354px";u.style.marginBottom="16px";var z=document.createElement("select");if("formatSql"==e||"mermaid"==e)z.style.display="none";var C=document.createElement("option");C.setAttribute("value","list");mxUtils.write(C,mxResources.get("list"));"plantUml"!=e&&z.appendChild(C);null!=e&&"fromText"!=e||C.setAttribute("selected","selected");C=document.createElement("option");C.setAttribute("value","table");mxUtils.write(C,mxResources.get("formatSql"));"formatSql"==
+e&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","mermaid");mxUtils.write(C,mxResources.get("formatSql"));"mermaid"==e&&(z.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","diagram");mxUtils.write(C,mxResources.get("diagram"));var A=document.createElement("option");A.setAttribute("value","circle");mxUtils.write(A,mxResources.get("circle"));var B=document.createElement("option");
+B.setAttribute("value","horizontalFlow");mxUtils.write(B,mxResources.get("horizontalFlow"));var J=document.createElement("option");J.setAttribute("value","verticalFlow");mxUtils.write(J,mxResources.get("verticalFlow"));"plantUml"!=e&&(z.appendChild(C),z.appendChild(A),z.appendChild(B),z.appendChild(J));C=document.createElement("option");C.setAttribute("value","plantUmlSvg");mxUtils.write(C,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==e&&C.setAttribute("selected",
+"selected");A=document.createElement("option");A.setAttribute("value","plantUmlPng");mxUtils.write(A,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");B=document.createElement("option");B.setAttribute("value","plantUmlTxt");mxUtils.write(B,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==e&&(z.appendChild(C),z.appendChild(A),z.appendChild(B));var f=k();u.value=f;d.appendChild(u);this.init=function(){u.focus()};
+Graph.fileSupport&&(u.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),u.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=g.dataTransfer.files[0];var l=new FileReader;l.onload=function(q){u.value=q.target.result};l.readAsText(g)}},!1));d.appendChild(z);mxEvent.addListener(z,"change",function(){var g=k();if(0==u.value.length||u.value==f)f=g,u.value=f});b.isOffline()||"mermaid"!=e&&"plantUml"!=e||(C=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==e?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",d.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){u.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);A=mxUtils.button(mxResources.get("insert"),function(g){b.hideDialog();c(u.value,z.value,g)});d.appendChild(A);A.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+d.appendChild(C);this.container=d},NewDialog=function(b,d,e,c,k,m,u,z,C,A,B,J,f,g,l,q,t,x){function E(ma){null!=ma&&(xa=va=ma?135:140);ma=!0;if(null!=ra)for(;I<ra.length&&(ma||0!=mxUtils.mod(I,30));){var fa=ra[I++];fa=y(fa.url,fa.libs,fa.title,fa.tooltip?fa.tooltip:fa.title,fa.select,fa.imgUrl,fa.info,fa.onClick,fa.preview,fa.noImg,fa.clibs);ma&&fa.click();ma=!1}}function F(){if(Y&&null!=g)e||b.hideDialog(),g(Y,ba,N.value);else if(c)e||b.hideDialog(),c(S,N.value,aa,O);else{var ma=N.value;null!=ma&&
+0<ma.length&&b.pickFolder(b.mode,function(fa){b.createFile(ma,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,fa,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function G(ma,fa,ca,na,la,sa,ia){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");Q.removeAttribute("disabled");S=fa;O=ca;R=sa;X=ma;Y=na;aa=ia;ba=la;X.style.backgroundColor=z;X.style.border=C}function y(ma,fa,ca,na,la,sa,ia,ja,
+pa,za,Da){function Fa(Ha,Ta){null==Oa?(Qa=Ha,Qa=/^https?:\/\//.test(Qa)&&!b.editor.isCorsEnabledForUrl(Qa)?PROXY_URL+"?url="+encodeURIComponent(Qa):TEMPLATE_PATH+"/"+Qa,mxUtils.get(Qa,mxUtils.bind(this,function(Sa){200<=Sa.getStatus()&&299>=Sa.getStatus()&&(Oa=Sa.getText());Ta(Oa,Qa)}))):Ta(Oa,Qa)}function Ea(Ha,Ta,Sa){if(null!=Ha&&mxUtils.isAncestorNode(document.body,ta)){Ha=mxUtils.parseXml(Ha);Ha=Editor.parseDiagramNode(Ha.documentElement);var Wa=new mxCodec(Ha.ownerDocument),$a=new mxGraphModel;
+Wa.decode(Ha,$a);Ha=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ta,Ha,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ca?mxResources.get(ca,null,ca):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;G(ta,null,null,ma,ia,Da)},!0,!1)}}function wa(Ha,Ta){null==ma||Va||
+b.sidebar.currentElt==ta?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ga?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ga.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ga.naturalWidth+'" height="'+Ga.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Ea(Ta,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha))):(b.sidebar.currentElt=
+ta,Va=!0,Fa(ma,function(Sa){Va&&b.sidebar.currentElt==ta&&Ea(Sa,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha));Va=!1})))}var ta=document.createElement("div");ta.className="geTemplate geAdaptiveAsset";ta.style.position="relative";ta.style.height=xa+"px";ta.style.width=va+"px";var Oa=null,Qa=ma;null!=ca?ta.setAttribute("title",mxResources.get(ca,null,ca)):null!=na&&0<na.length&&ta.setAttribute("title",na);var Va=!1,Ga=null;if(null!=sa){ta.style.display="inline-flex";ta.style.justifyContent="center";
+ta.style.alignItems="center";la=document.createElement("img");la.setAttribute("src",sa);la.setAttribute("alt",na);la.style.maxWidth=xa+"px";la.style.maxHeight=va+"px";Ga=la;var La=sa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ta.appendChild(la);la.onerror=function(){this.src!=La?this.src=La:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(Ha){G(ta,null,null,ma,ia,Da)}),null,null);mxEvent.addListener(ta,"dblclick",function(Ha){F();
+mxEvent.consume(Ha)})}else if(!za&&null!=ma&&0<ma.length){var Ma=function(Ha){Q.setAttribute("disabled","disabled");ta.style.backgroundColor="transparent";ta.style.border="1px solid transparent";M.spin(da);Fa(ma,function(Ta,Sa){M.stop();null!=Ta&&(G(ta,Ta,fa,null,null,Da,Sa),Ha&&F())})};la=pa||TEMPLATE_PATH+"/"+ma.substring(0,ma.length-4)+".png";ta.style.backgroundImage="url("+la+")";ta.style.backgroundPosition="center center";ta.style.backgroundRepeat="no-repeat";if(null!=ca){na=document.createElement("table");
+na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";sa=document.createElement("tbody");pa=document.createElement("tr");za=document.createElement("td");za.setAttribute("align","center");za.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";Pa.style.userSelect="none";Pa.style.borderRadius=
+"3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=xa-34+"px";mxUtils.write(Pa,mxResources.get(ca,null,ca));za.appendChild(Pa);pa.appendChild(za);sa.appendChild(pa);na.appendChild(sa);ta.appendChild(na)}mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(Ha){Ma()}),null,null);mxEvent.addListener(ta,"dblclick",function(Ha){Ma(!0);mxEvent.consume(Ha)})}else na=document.createElement("table"),na.setAttribute("width",
+"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",sa=document.createElement("tbody"),pa=document.createElement("tr"),za=document.createElement("td"),za.setAttribute("align","center"),za.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",Pa.style.maxWidth=
+xa-34+"px",mxUtils.write(Pa,mxResources.get(ca,null,ca)),za.appendChild(Pa),pa.appendChild(za),sa.appendChild(pa),na.appendChild(sa),ta.appendChild(na),la&&G(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(Ha){G(ta,null,null,ma,ia)}),null,null),null!=ja?mxEvent.addListener(ta,"click",ja):(mxEvent.addListener(ta,"click",function(Ha){G(ta,null,null,ma,ia)}),mxEvent.addListener(ta,"dblclick",function(Ha){F();mxEvent.consume(Ha)}));if(null!=ma){var Ra=document.createElement("img");Ra.setAttribute("src",
+Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ta.appendChild(Ra);var Ua=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ha){Ua=b.sidebar.currentElt==ta}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ha){Ua||wa(Ha,Ra);mxEvent.consume(Ha)}))}da.appendChild(ta);return ta}function T(){function ma(wa,
+ta){var Oa=mxResources.get(wa);null==Oa&&(Oa=wa.substring(0,1).toUpperCase()+wa.substring(1));18<Oa.length&&(Oa=Oa.substring(0,18)+"&hellip;");return Oa+" ("+ta.length+")"}function fa(wa,ta,Oa){mxEvent.addListener(ta,"click",function(){qa!=ta&&(qa.style.backgroundColor="",qa=ta,qa.style.backgroundColor=u,da.scrollTop=0,da.innerText="",I=0,ra=Oa?Na[wa][Oa]:ka[wa],U=null,E(!1))})}oa&&(oa=!1,mxEvent.addListener(da,"scroll",function(wa){da.scrollTop+da.clientHeight>=da.scrollHeight&&(E(),mxEvent.consume(wa))}));
+if(0<Ca){var ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,mxResources.get("custom"));ya.appendChild(ca);for(var na in Ia){var la=document.createElement("div"),sa=na;ca=Ia[na];18<sa.length&&(sa=sa.substring(0,18)+"&hellip;");la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";la.setAttribute("title",
+sa+" ("+ca.length+")");mxUtils.write(la,la.getAttribute("title"));null!=A&&(la.style.padding=A);ya.appendChild(la);(function(wa,ta){mxEvent.addListener(la,"click",function(){qa!=ta&&(qa.style.backgroundColor="",qa=ta,qa.style.backgroundColor=u,da.scrollTop=0,da.innerText="",I=0,ra=Ia[wa],U=null,E(!1))})})(na,la)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,"draw.io");ya.appendChild(ca)}for(na in ka){sa=
+Na[na];var ia=la=document.createElement(sa?"ul":"div");ca=ka[na];var ja=ma(na,ca);if(null!=sa){var pa=document.createElement("li"),za=document.createElement("div");za.className="geTempTreeCaret";za.setAttribute("title",ja);mxUtils.write(za,ja);ia=za;pa.appendChild(za);ja=document.createElement("ul");ja.className="geTempTreeNested";ja.style.visibility="hidden";for(var Da in sa){var Fa=document.createElement("li"),Ea=ma(Da,sa[Da]);Fa.setAttribute("title",Ea);mxUtils.write(Fa,Ea);fa(na,Fa,Da);ja.appendChild(Fa)}pa.appendChild(ja);
+la.className="geTempTree";la.appendChild(pa);(function(wa,ta){mxEvent.addListener(ta,"click",function(){wa.style.visibility="visible";wa.classList.toggle("geTempTreeActive");wa.classList.toggle("geTempTreeNested")&&setTimeout(function(){wa.style.visibility="hidden"},550);ta.classList.toggle("geTempTreeCaret-down")})})(ja,za)}else la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+la.setAttribute("title",ja),mxUtils.write(la,ja);null!=A&&(la.style.padding=A);ya.appendChild(la);null==qa&&0<ca.length&&(qa=la,qa.style.backgroundColor=u,ra=ca);fa(na,ia)}E(!1)}var n=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);e=null!=e?e:!0;k=null!=k?k:!1;u=null!=u?u:"#ebf2f9";z=null!=z?z:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var v=document.createElement("div");
+v.style.userSelect="none";v.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";e&&v.appendChild(H);var K=document.createElement("img");K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="40px";K.style.height="40px";K.style.marginRight="10px";K.style.paddingBottom="4px";K.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";d||n||!e||H.appendChild(K);e&&mxUtils.write(H,(n?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");K=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?K=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?K=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?K=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?K=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?K=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(K=b.trello.extension);var N=document.createElement("input");N.setAttribute("value",b.defaultFilename+K);N.style.marginLeft="10px";N.style.width=d||
+n?"144px":"244px";this.init=function(){e&&(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ma){b.sidebar.hideTooltip()}),null,null)};e&&(H.appendChild(N),x?N.style.width=d||n?"350px":"450px":(null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),x.style.marginLeft=
+"6px",x.style.width=d||n?"80px":"180px",H.appendChild(x)),null!=b.editor.fileExtensions&&(n=FilenameDialog.createTypeHint(b,N,b.editor.fileExtensions),n.style.marginTop="12px",H.appendChild(n))));H=!1;var I=0,M=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),Q=mxUtils.button(q||mxResources.get("create"),function(){Q.setAttribute("disabled","disabled");F();Q.removeAttribute("disabled")});Q.className="geBtn gePrimaryBtn";
+if(J||f){var P=[],U=null,W=null,p=null,D=function(ma){Q.setAttribute("disabled","disabled");for(var fa=0;fa<P.length;fa++)P[fa].className=fa==ma?"geBtn gePrimaryBtn":"geBtn"};H=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";v.appendChild(q);n=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ya.style.display="";Z.style.display="";da.style.left="160px";D(0);da.scrollTop=0;da.innerText="";I=0;U!=ra&&(ra=U,ka=W,Ca=p,ya.innerText="",T(),U=null)});
+P.push(n);q.appendChild(n);var L=function(ma){ya.style.display="none";Z.style.display="none";da.style.left="30px";D(ma?-1:1);null==U&&(U=ra);da.scrollTop=0;da.innerText="";M.spin(da);var fa=function(ca,na,la){I=0;M.stop();ra=ca;la=la||{};var sa=0,ia;for(ia in la)sa+=la[ia].length;if(na)da.innerText=na;else if(0==ca.length&&0==sa)da.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(da.innerText="",0<sa){ya.style.display="";da.style.left="160px";ya.innerText="";Ca=0;ka={"draw.io":ca};
+for(ia in la)ka[ia]=la[ia];T()}else E(!0)};ma?f(V.value,fa):J(fa)};J&&(n=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),q.appendChild(n),P.push(n));if(f){n=document.createElement("span");n.style.marginLeft="10px";n.innerText=mxResources.get("search")+":";q.appendChild(n);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(ma){13==ma.keyCode&&L(!0)});q.appendChild(V);n=mxUtils.button(mxResources.get("search"),
+function(){L(!0)});n.className="geBtn";q.appendChild(n)}D(0)}var O=null,R=null,S=null,X=null,Y=null,aa=null,ba=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";q=(e?72:40)+(H?30:0);da.style.top=q+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var Z=document.createElement("div");Z.style.cssText="position:absolute;left:30px;width:128px;top:"+q+
+"px;height:22px;margin-top: 6px;white-space: nowrap";var ha=document.createElement("input");ha.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ha.setAttribute("placeholder",mxResources.get("search"));ha.setAttribute("type","text");Z.appendChild(ha);var ea=document.createElement("img"),ua="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ea.setAttribute("src",ua);ea.setAttribute("title",mxResources.get("search"));
+ea.style.position="relative";ea.style.left="-18px";ea.style.top="1px";ea.style.background="url('"+b.editor.transparentImage+"')";Z.appendChild(ea);mxEvent.addListener(ea,"click",function(){ea.getAttribute("src")==Dialog.prototype.closeImage&&(ea.setAttribute("src",ua),ea.setAttribute("title",mxResources.get("search")),ha.value="",null!=Ja&&(Ja.click(),Ja=null));ha.focus()});mxEvent.addListener(ha,"keydown",mxUtils.bind(this,function(ma){if(13==ma.keyCode){var fa=ha.value;if(""==fa)null!=Ja&&(Ja.click(),
+Ja=null);else{if(null==NewDialog.tagsList[B]){var ca={};for(Da in ka)for(var na=ka[Da],la=0;la<na.length;la++){var sa=na[la];if(null!=sa.tags)for(var ia=sa.tags.toLowerCase().split(";"),ja=0;ja<ia.length;ja++)null==ca[ia[ja]]&&(ca[ia[ja]]=[]),ca[ia[ja]].push(sa)}NewDialog.tagsList[B]=ca}var pa=fa.toLowerCase().split(" ");ca=NewDialog.tagsList[B];if(0<Ca&&null==ca.__tagsList__){for(Da in Ia)for(na=Ia[Da],la=0;la<na.length;la++)for(sa=na[la],ia=sa.title.split(" "),ia.push(Da),ja=0;ja<ia.length;ja++){var za=
+ia[ja].toLowerCase();null==ca[za]&&(ca[za]=[]);ca[za].push(sa)}ca.__tagsList__=!0}var Da=[];na={};for(la=ia=0;la<pa.length;la++)if(0<pa[la].length){za=ca[pa[la]];var Fa={};Da=[];if(null!=za)for(ja=0;ja<za.length;ja++)sa=za[ja],0==ia==(null==na[sa.url])&&(Fa[sa.url]=!0,Da.push(sa));na=Fa;ia++}da.scrollTop=0;da.innerText="";I=0;ca=document.createElement("div");ca.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ca,mxResources.get(0==Da.length?"noResultsFor":
+"resultsFor",[fa]));da.appendChild(ca);null!=qa&&null==Ja&&(qa.style.backgroundColor="",Ja=qa,qa=ca);ra=Da;U=null;E(!1)}mxEvent.consume(ma)}}));mxEvent.addListener(ha,"keyup",mxUtils.bind(this,function(ma){""==ha.value?(ea.setAttribute("src",ua),ea.setAttribute("title",mxResources.get("search"))):(ea.setAttribute("src",Dialog.prototype.closeImage),ea.setAttribute("title",mxResources.get("reset")))}));q+=23;var ya=document.createElement("div");ya.style.cssText="position:absolute;left:30px;width:128px;top:"+
+q+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var xa=140,va=140,ka={},Na={},Ia={},Ca=0,oa=!0,qa=null,Ja=null;ka.basic=[{title:"blankDiagram",select:!0}];var ra=ka.basic;if(!d){var Ba=function(){mxUtils.get(Ka,function(ma){if(!Aa){Aa=!0;ma=ma.getXml().documentElement.firstChild;for(var fa={};null!=ma;){if("undefined"!==typeof ma.getAttribute)if("clibs"==ma.nodeName){for(var ca=ma.getAttribute("name"),na=
+ma.getElementsByTagName("add"),la=[],sa=0;sa<na.length;sa++)la.push(encodeURIComponent(mxUtils.getTextContent(na[sa])));null!=ca&&0<la.length&&(fa[ca]=la.join(";"))}else if(la=ma.getAttribute("url"),null!=la){na=ma.getAttribute("section");ca=ma.getAttribute("subsection");if(null==na&&(sa=la.indexOf("/"),na=la.substring(0,sa),null==ca)){var ia=la.indexOf("/",sa+1);-1<ia&&(ca=la.substring(sa+1,ia))}sa=ka[na];null==sa&&(sa=[],ka[na]=sa);la=ma.getAttribute("clibs");null!=fa[la]&&(la=fa[la]);la={url:ma.getAttribute("url"),
+libs:ma.getAttribute("libs"),title:ma.getAttribute("title"),tooltip:ma.getAttribute("name")||ma.getAttribute("url"),preview:ma.getAttribute("preview"),clibs:la,tags:ma.getAttribute("tags")};sa.push(la);null!=ca&&(sa=Na[na],null==sa&&(sa={},Na[na]=sa),na=sa[ca],null==na&&(na=[],sa[ca]=na),na.push(la))}ma=ma.nextSibling}M.stop();T()}})};v.appendChild(Z);v.appendChild(ya);v.appendChild(da);var Aa=!1,Ka=B;/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)&&(Ka=PROXY_URL+"?url="+encodeURIComponent(Ka));
+M.spin(da);null!=t?t(function(ma,fa){Ia=ma;p=Ca=fa;Ba()},Ba):Ba();W=ka}mxEvent.addListener(N,"keypress",function(ma){b.dialog.container.firstChild==v&&13==ma.keyCode&&F()});t=document.createElement("div");t.style.marginTop=d?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";d||b.isOffline()||!e||null!=c||k||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+q.className="geBtn",t.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});q.className="geBtn";!b.editor.cancelFirst||k&&null==m||t.appendChild(q);d||"1"==urlParams.embed||k||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ma=new FilenameDialog(b,"",mxResources.get("create"),function(fa){null!=fa&&0<fa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(fa),function(ca){S=
+ca;O=null;templateRealURl=fa;b.hideDialog();F()},function(ca){b.handleError(ca)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ma.container,300,80,!0,!0);ma.init()}),d.className="geBtn",t.appendChild(d));Graph.fileSupport&&l&&(l=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ma=document.createElement("input");ma.setAttribute("multiple","multiple");ma.setAttribute("type","file");mxEvent.addListener(ma,"change",function(fa){b.openFiles(ma.files,!0);
+ma.value=""});ma.style.display="none";document.body.appendChild(ma);b.newDlgFileInputElt=ma}b.newDlgFileInputElt.click()}),l.className="geBtn",t.appendChild(l));t.appendChild(Q);b.editor.cancelFirst||null!=c||k&&null==m||t.appendChild(q);v.appendChild(t);this.container=v};NewDialog.tagsList={};
+var CreateDialog=function(b,d,e,c,k,m,u,z,C,A,B,J,f,g,l,q,t){function x(H,K,N,I){function M(){mxEvent.addListener(Q,"click",function(){var D=N;if(u){var L=G.value,V=L.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>V){D=null!=D?D:v.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
+(O=".drawio");0<=V&&(L=L.substring(0,V));G.value=L+O}}E(N)})}var Q=document.createElement("a");Q.style.overflow="hidden";var P=document.createElement("img");P.src=H;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";Q.style.display="inline-block";Q.className="geBaseButton";Q.style.position="relative";Q.style.margin="4px";Q.style.padding="8px 8px 10px 8px";Q.style.whiteSpace="nowrap";Q.appendChild(P);Q.style.color=
+"gray";Q.style.fontSize="11px";var U=document.createElement("div");Q.appendChild(U);mxUtils.write(U,K);if(null!=I&&null==b[I]){P.style.visibility="hidden";mxUtils.setOpacity(U,10);var W=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});W.spin(Q);var p=window.setTimeout(function(){null==b[I]&&(W.stop(),Q.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(p),
+mxUtils.setOpacity(U,100),P.style.visibility="",W.stop(),M())}))}else M();T.appendChild(Q);++n==J&&(mxUtils.br(T),n=0)}function E(H){var K=G.value;if(null==H||null!=K&&0<K.length)t&&b.hideDialog(),e(K,H,G)}B="1"==urlParams.noDevice?!1:B;u=null!=u?u:!0;z=null!=z?z:!0;J=null!=J?J:4;t=null!=t?t:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var F=document.createElement("h2");mxUtils.write(F,k||mxResources.get("create"));F.style.marginTop="0px";F.style.marginBottom=
+"24px";m.appendChild(F);mxUtils.write(m,mxResources.get("filename")+":");var G=document.createElement("input");G.setAttribute("value",d);G.style.width="200px";G.style.marginLeft="10px";G.style.marginBottom="20px";G.style.maxWidth="70%";this.init=function(){G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)};m.appendChild(G);null!=q&&(null!=b.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),
+k.style.marginLeft="6px",k.style.width="90px",m.appendChild(k)),m.appendChild(FilenameDialog.createTypeHint(b,G,q)));q=null;if("1"!=urlParams.noDevice&&null!=f&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){G.style.width="160px";k=document.createElement("img");var y=l?f:btoa(unescape(encodeURIComponent(f)));k.setAttribute("src","data:"+g+";base64,"+y);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");m.appendChild(k);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=g||(q=mxUtils.button(mxResources.get("copy"),function(H){H=b.base64ToBlob(y,"image/png");H=new ClipboardItem({"image/png":H,"text/html":new Blob(['<img src="data:'+g+";base64,"+y+'">'],{type:"text/html"})});navigator.clipboard.write([H]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
+q.style.marginTop="6px",q.className="geBtn");C&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(H){mxEvent.isPopupTrigger(H)||E("_blank")}))}mxUtils.br(m);var T=document.createElement("div");T.style.textAlign="center";var n=0;T.style.marginTop="6px";m.appendChild(T);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),v.appendChild(f),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),v.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),v.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),v.appendChild(f),x(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),v.appendChild(f),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),v.appendChild(f),x(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),v.appendChild(f),b.mode!=App.MODE_DEVICE&&z||f.setAttribute("selected","selected"),B&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);z&&isLocalStorage&&"0"!=urlParams.browser&&(z=document.createElement("option"),
+z.setAttribute("value",App.MODE_BROWSER),mxUtils.write(z,mxResources.get("browser")),v.appendChild(z),b.mode==App.MODE_BROWSER&&z.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));z=document.createElement("div");z.style.marginTop="26px";z.style.textAlign="center";null!=A&&(B=mxUtils.button(mxResources.get("help"),function(){b.openLink(A)}),B.className="geBtn",z.appendChild(B));B=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});B.className="geBtn";b.editor.cancelFirst&&null==c&&z.appendChild(B);null==c&&(f=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),f.className="geBtn",z.appendChild(f));C&&Editor.popupsAllowed&&(C=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),C.className="geBtn",z.appendChild(C));CreateDialog.showDownloadButton&&(C=mxUtils.button(mxResources.get("download"),
+function(){E("download")}),C.className="geBtn",z.appendChild(C),null!=q&&(C.style.marginTop="6px",z.style.marginTop="6px"));null!=q&&(mxUtils.br(z),z.appendChild(q));b.editor.cancelFirst&&null==c||z.appendChild(B);mxEvent.addListener(G,"keypress",function(H){13==H.keyCode?E(App.MODE_DEVICE):27==H.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(z);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,d,e,c,k){k=null!=k?k:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var u=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&b.hideDialog();null!=c&&c()});u.className="geBtn";u.style.marginBottom="8px";u.style.width="280px";m.appendChild(u);mxUtils.br(m);var z=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&b.hideDialog();
+null!=e&&e();b.openLink(d,null,!0)});z.className="geBtn gePrimaryBtn";z.style.width=u.style.width;m.appendChild(z);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,d,e,c,k,m,u,z){function C(){0<J.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}m=null!=m?m:!0;var A=b.editor.graph,B=document.createElement("div");mxUtils.write(B,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor=
+"transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var J=document.createElement("input");J.setAttribute("value",e);J.setAttribute("type","text");J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");J.style.marginTop="6px";J.style.width=(Graph.fileSupport?460:340)-20+"px";J.style.backgroundImage="url('"+
+Dialog.prototype.clearImage+"')";J.style.backgroundRepeat="no-repeat";J.style.backgroundPosition="100% 50%";J.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display="inline-block";e.style.top="3px";e.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){J.value="";J.focus()});
+d.appendChild(J);d.appendChild(e);B.appendChild(d);var f=z,g,l,q=function(F,G,y,T){var n="data:"==F.substring(0,5);!b.isOffline()||n&&"undefined"===typeof chrome?0<F.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(F,function(v){b.spinner.stop();b.hideDialog();var H=!1===T?1:null!=G&&null!=y?Math.max(G/v.width,y/v.height):Math.min(1,Math.min(520/v.width,520/v.height));m&&(F=b.convertDataUri(F));c(F,Math.round(Number(v.width)*H),Math.round(Number(v.height)*H),f,g,l)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(F,null,null,f,g,l)):(F=b.convertDataUri(F),G=null==G?120:G,y=null==y?100:y,b.hideDialog(),c(F,G,y,f,g,l))},t=function(F,G){if(null!=F){var y=k?null:A.getModel().getGeometry(A.getSelectionCell());null!=y?q(F,y.width,y.height,G):q(F,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){J.focus();if(Graph.fileSupport){J.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var F=B.parentNode,G=null;mxEvent.addListener(F,"dragleave",function(y){null!=G&&(G.parentNode.removeChild(G),G=null);y.stopPropagation();y.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(y){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(F));y.stopPropagation();y.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(y){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<y.dataTransfer.files.length)b.importFiles(y.dataTransfer.files,
+0,0,b.maxImageSize,function(n,v,H,K,N,I,M,Q){t(n,Q)},function(){},function(n){return"image/"==n.type.substring(0,6)},function(n){for(var v=0;v<n.length;v++)n[v]()},!mxEvent.isControlDown(y),null,null,!0);else if(0<=mxUtils.indexOf(y.dataTransfer.types,"text/uri-list")){var T=y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&t(decodeURIComponent(T))}y.stopPropagation();y.preventDefault()}),!1)}};z=document.createElement("div");z.style.marginTop="14px";z.style.textAlign=
+"center";e=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});e.className="geBtn";b.editor.cancelFirst&&z.appendChild(e);ImageDialog.filePicked=function(F){F.action==google.picker.Action.PICKED&&null!=F.docs[0].thumbnails&&(F=F.docs[0].thumbnails[F.docs[0].thumbnails.length-1],null!=F&&(J.value=F.url));J.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type",
+"file");mxEvent.addListener(x,"change",function(F){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,y,T,n,v,H){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var y=0;y<G.length;y++)G[y]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}d=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});d.className="geBtn";z.appendChild(d)}mxEvent.addListener(J,
+"keypress",function(F){13==F.keyCode&&t(J.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var F=new CropImageDialog(b,J.value,f,function(G,y,T){f=G;g=y;l=T});b.showDialog(F.container,300,390,!0,!0)});u&&(E.className="geBtn",z.appendChild(E));mxEvent.addListener(J,"change",function(F){f=null;C()});C();u=mxUtils.button(mxResources.get("apply"),function(){t(J.value)});u.className="geBtn gePrimaryBtn";z.appendChild(u);b.editor.cancelFirst||z.appendChild(e);Graph.fileSupport&&(z.style.marginTop=
+"120px",B.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",B.style.backgroundPosition="center 65%",B.style.backgroundRepeat="no-repeat",u=document.createElement("div"),u.style.position="absolute",u.style.width="420px",u.style.top="58%",u.style.textAlign="center",u.style.fontSize="18px",u.style.color="#a0c3ff",mxUtils.write(u,mxResources.get("dragImagesHere")),B.appendChild(u));B.appendChild(z);this.container=B},LinkDialog=function(b,d,e,c,k,m,u){function z(F,G,y){y=mxUtils.button("",y);
+y.className="geBtn";y.setAttribute("title",G);G=document.createElement("img");G.style.height="26px";G.style.width="26px";G.setAttribute("src",F);y.style.minWidth="42px";y.style.verticalAlign="middle";y.appendChild(G);E.appendChild(y)}var C=document.createElement("div");C.style.height="100%";mxUtils.write(C,mxResources.get("editLink")+":");var A=document.createElement("div");A.className="geTitle";A.style.backgroundColor="transparent";A.style.borderColor="transparent";A.style.whiteSpace="nowrap";A.style.textOverflow=
+"clip";A.style.cursor="default";A.style.paddingRight="20px";var B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("dragUrlsHere"));B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="97%";B.style.boxSizing="border-box";B.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";B.style.backgroundRepeat="no-repeat";B.style.backgroundPosition="100% 50%";B.style.paddingRight="14px";B.style.marginBottom="4px";var J=document.createElement("div");J.setAttribute("title",
+mxResources.get("reset"));J.style.position="relative";J.style.left="-16px";J.style.width="12px";J.style.height="14px";J.style.cursor="pointer";J.style.display="inline-block";J.style.top="3px";J.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(J,"click",function(){B.value="";B.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","geLinkDialogOption");
+var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var l=document.createElement("select");l.style.width="520px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.margin="0 6p 0 6px";null!=u&&(q.setAttribute("checked","checked"),q.defaultChecked=!0);u=null!=u?u:"_blank";q.setAttribute("title",u);m&&(B.style.width="340px");if(k&&
+null!=b.pages){null!=d&&Graph.isPageLink(d)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(B.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);A.appendChild(f);A.appendChild(B);A.appendChild(J);m&&(A.appendChild(q),mxUtils.write(A,mxResources.get("openInNewWindow")));mxUtils.br(A);A.appendChild(g);k=!1;for(m=0;m<b.pages.length;m++)J=document.createElement("option"),mxUtils.write(J,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),J.setAttribute("value",
+"data:page/id,"+b.pages[m].getId()),d==J.getAttribute("value")&&(J.setAttribute("selected","selected"),k=!0),l.appendChild(J);if(!k&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");l.appendChild(t);mxEvent.addListener(l,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}A.appendChild(l)}else B.setAttribute("value",
+d),A.appendChild(B),A.appendChild(J);C.appendChild(A);var x=mxUtils.button(e,function(){b.hideDialog();c(g.checked?"pageNotFound"!==l.value?l.value:d:B.value,LinkDialog.selectedDocs,q.checked?u:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?l.focus():(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");g.setAttribute("checked",
+"checked");g.checked=!0});mxEvent.addListener(B,"focus",function(){g.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var F=C.parentNode,G=null;mxEvent.addListener(F,"dragleave",function(y){null!=G&&(G.parentNode.removeChild(G),G=null);y.stopPropagation();y.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(y){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(F));y.stopPropagation();y.preventDefault()}));
+mxEvent.addListener(F,"drop",mxUtils.bind(this,function(y){null!=G&&(G.parentNode.removeChild(G),G=null);0<=mxUtils.indexOf(y.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(y.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());y.stopPropagation();y.preventDefault()}),!1)}};var E=document.createElement("div");E.style.marginTop="18px";E.style.textAlign="center";e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+e.style.verticalAlign="middle";e.className="geBtn";E.appendChild(e);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(e.style.display="none");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.style.verticalAlign="middle";e.className="geBtn";b.editor.cancelFirst&&E.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(F){if(F.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=F.docs;var G=F.docs[0].url;"application/mxe"==F.docs[0].mimeType||null!=F.docs[0].mimeType&&
+"application/vnd.jgraph."==F.docs[0].mimeType.substring(0,23)?G="https://www.draw.io/#G"+F.docs[0].id:"application/vnd.google-apps.folder"==F.docs[0].mimeType&&(G="https://drive.google.com/#folders/"+F.docs[0].id);B.value=G;B.focus()}else LinkDialog.selectedDocs=null;B.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var F=b.drive.createLinkPicker();b.linkPicker=F.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(F){B.value=F[0].link;B.focus()}})});null!=b.oneDrive&&z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(F,G){B.value=G.value[0].webUrl;B.focus()},!0)});null!=b.gitHub&&z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(F){if(null!=F){F=F.split("/");var G=F[0],y=F[1],T=F[2];F=F.slice(3,F.length).join("/");B.value="https://github.com/"+G+"/"+y+"/blob/"+T+"/"+F;B.focus()}})});null!=b.gitLab&&z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(F){if(null!=F){F=F.split("/");var G=
+F[0],y=F[1],T=F[2];F=F.slice(3,F.length).join("/");B.value=DRAWIO_GITLAB_URL+"/"+G+"/"+y+"/blob/"+T+"/"+F;B.focus()}})});mxEvent.addListener(B,"keypress",function(F){13==F.keyCode&&(b.hideDialog(),c(g.checked?l.value:B.value,LinkDialog.selectedDocs))});E.appendChild(x);b.editor.cancelFirst||E.appendChild(e);C.appendChild(E);this.container=C},FeedbackDialog=function(b,d,e,c){var k=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
+"18px";m.style.marginBottom="18px";k.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(e?"":" ("+mxResources.get("required")+")"));k.appendChild(m);var u=document.createElement("input");u.setAttribute("type","text");u.style.marginTop="6px";u.style.width="600px";var z=mxUtils.button(mxResources.get("sendMessage"),function(){var J=B.value+(A.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;J.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(u.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+
+":\n"+J),function(f){b.spinner.stop();200<=f.getStatus()&&299>=f.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});z.className="geBtn gePrimaryBtn";if(!e){z.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\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(u,
+"change",function(){0<u.value.length&&0<C.test(u.value)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")});mxEvent.addListener(u,"keyup",function(){0<u.value.length&&C.test(u.value)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")})}k.appendChild(u);this.init=function(){u.focus()};var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;e=document.createElement("p");e.style.marginTop="14px";
+e.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(m);mxEvent.addListener(m,"click",function(J){A.checked=!A.checked;mxEvent.consume(J)});k.appendChild(e);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));k.appendChild(m);var B=document.createElement("textarea");B.style.resize="none";B.style.width="600px";B.style.height="140px";B.style.marginTop="6px";B.setAttribute("placeholder",mxResources.get("comments"));
+k.appendChild(B);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(e.appendChild(m),e.appendChild(z)):(e.appendChild(z),e.appendChild(m));k.appendChild(e);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,d,e){var c=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px";
+m.style.overflow="hidden";var u=document.createElement("div");u.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(u);mxEvent.disableContextMenu(m);c.appendChild(m);var z=new Graph(m);z.setTooltips(!1);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var C=0,A=null,B=0,J=z.getGlobalVariable;
+z.getGlobalVariable=function(X){return"page"==X&&null!=A&&null!=A[B]?A[B].getAttribute("name"):"pagenumber"==X?B+1:"pagecount"==X?null!=A?A.length:1:J.apply(this,arguments)};z.getLinkForCell=function(){return null};Editor.MathJaxRender&&z.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(z.container)}));var f={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},g=new Spinner(f),l=b.getCurrentFile(),q=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),t={};for(f=0;f<q.length;f++)t[q[f].getAttribute("id")]=q[f];var x=null,E=null,F=null,G=null,y=mxUtils.button("",function(){null!=F&&z.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");
+mxUtils.setOpacity(y,20);var T=mxUtils.button("",function(){null!=F&&z.zoomOut()});T.className="geSprite geSprite-zoomout";T.setAttribute("title",mxResources.get("zoomOut"));T.style.outline="none";T.style.border="none";T.style.margin="2px";T.setAttribute("disabled","disabled");mxUtils.setOpacity(T,20);var n=mxUtils.button("",function(){null!=F&&(z.maxFitScale=8,z.fit(8),z.center())});n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("fit"));n.style.outline="none";n.style.border=
+"none";n.style.margin="2px";n.setAttribute("disabled","disabled");mxUtils.setOpacity(n,20);var v=mxUtils.button("",function(){null!=F&&(z.zoomActual(),z.center())});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var H=mxUtils.button("",function(){});H.className="geSprite geSprite-middle";H.setAttribute("title",mxResources.get("compare"));
+H.style.outline="none";H.style.border="none";H.style.margin="2px";mxUtils.setOpacity(H,60);var K=m.cloneNode(!1);K.style.pointerEvent="none";m.parentNode.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;mxEvent.addGestureListeners(H,function(X){X=t[A[C].getAttribute("id")];mxUtils.setOpacity(H,20);u.innerText="";null==X?mxUtils.write(u,
+mxResources.get("pageNotFound")):(I.style.display="none",m.style.display="none",K.style.display="",K.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,N.getModel()),N.view.scaleAndTranslate(z.view.scale,z.view.translate.x,z.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);u.innerText="";"none"==m.style.display&&(I.style.display="",m.style.display="",K.style.display="none")});var I=document.createElement("div");I.style.position=
+"absolute";I.style.textAlign="right";I.style.color="gray";I.style.marginTop="10px";I.style.backgroundColor="transparent";I.style.top="440px";I.style.right="32px";I.style.maxWidth="380px";I.style.cursor="default";var M=mxUtils.button(mxResources.get("download"),function(){if(null!=F){var X=mxUtils.getXml(F.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,Y,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+X)).simulate(document,"_blank"))}});M.className="geBtn";M.setAttribute("disabled","disabled");var Q=mxUtils.button(mxResources.get("restore"),function(X){null!=F&&null!=G&&(mxEvent.isShiftDown(X)?null!=F&&(X=b.getPagesForNode(F.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){l.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(aa){b.handleError(aa)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=e?e(G):b.spinner.spin(document.body,mxResources.get("restoring"))&&l.save(!0,function(Y){b.spinner.stop();b.replaceFileData(G);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+Q.className="geBtn";Q.setAttribute("disabled","disabled");Q.setAttribute("title","Shift+Click for Diff");var P=document.createElement("select");P.setAttribute("disabled","disabled");P.style.maxWidth="80px";P.style.position="relative";P.style.top="-2px";P.style.verticalAlign="bottom";P.style.marginRight="6px";P.style.display="none";var U=null;mxEvent.addListener(P,"change",function(X){null!=U&&(U(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=F&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(F.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=e&&(W.style.display="none");var p=mxUtils.button(mxResources.get("show"),function(){null!=E&&b.openLink(E.getUrl(P.selectedIndex))});p.className="geBtn gePrimaryBtn";p.setAttribute("disabled","disabled");null!=e&&(p.style.display="none",Q.className="geBtn gePrimaryBtn");q=document.createElement("div");
+q.style.position="absolute";q.style.top="482px";q.style.width="640px";q.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var L=null;if(null!=d&&0<d.length){m.style.cursor="move";var V=document.createElement("table");V.style.border="1px solid lightGray";V.style.borderCollapse="collapse";V.style.borderSpacing="0px";V.style.width="100%";
+var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(f=d.length-1;0<=f;f--){var S=function(X){var Y=new Date(X.modifiedDate),aa=null;if(0<=Y.getTime()){var ba=function(Z){g.stop();u.innerText="";var ha=mxUtils.parseXml(Z),ea=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=ea){var ua=function(xa){null!=xa&&(xa=ya(Editor.parseDiagramNode(xa)));return xa},ya=function(xa){var va=xa.getAttribute("background");
+if(null==va||""==va||va==mxConstants.NONE)va=z.defaultPageBackgroundColor;m.style.backgroundColor=va;(new mxCodec(xa.ownerDocument)).decode(xa,z.getModel());z.maxFitScale=1;z.fit(8);z.center();return xa};P.style.display="none";P.innerText="";F=ha;G=Z;A=parseSelectFunction=null;B=0;if("mxfile"==ea.nodeName){ha=ea.getElementsByTagName("diagram");A=[];for(Z=0;Z<ha.length;Z++)A.push(ha[Z]);B=Math.min(C,A.length-1);0<A.length&&ua(A[B]);if(1<A.length)for(P.removeAttribute("disabled"),P.style.display="",
+Z=0;Z<A.length;Z++)ha=document.createElement("option"),mxUtils.write(ha,A[Z].getAttribute("name")||mxResources.get("pageWithNumber",[Z+1])),ha.setAttribute("value",Z),Z==B&&ha.setAttribute("selected","selected"),P.appendChild(ha);U=function(){try{var xa=parseInt(P.value);B=C=xa;ua(A[xa])}catch(va){P.value=C,b.handleError(va)}}}else ya(ea);Z=X.lastModifyingUserName;null!=Z&&20<Z.length&&(Z=Z.substring(0,20)+"...");I.innerText="";mxUtils.write(I,(null!=Z?Z+" ":"")+Y.toLocaleDateString()+" "+Y.toLocaleTimeString());
+I.setAttribute("title",aa.getAttribute("title"));y.removeAttribute("disabled");T.removeAttribute("disabled");n.removeAttribute("disabled");v.removeAttribute("disabled");H.removeAttribute("disabled");null!=l&&l.isRestricted()||(b.editor.graph.isEnabled()&&Q.removeAttribute("disabled"),M.removeAttribute("disabled"),p.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(n,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(H,60)}else P.style.display=
+"none",P.innerText="",I.innerText="",mxUtils.write(I,mxResources.get("errorLoadingFile")),mxUtils.write(u,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottom="1px solid lightGray";aa.style.fontSize="12px";aa.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";X==d[d.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===R?mxUtils.write(da,Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());aa.appendChild(da);aa.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(Z){E!=X&&(g.stop(),null!=x&&(x.style.backgroundColor=""),E=X,x=aa,x.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",G=F=null,I.removeAttribute("title"),I.innerText=mxResources.get("loading")+"...",
+m.style.backgroundColor=z.defaultPageBackgroundColor,u.innerText="",z.getModel().clear(),Q.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(T,
+20),mxUtils.setOpacity(n,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(H,20),g.spin(m),X.getXml(function(ha){if(E==X)try{ba(ha)}catch(ea){I.innerText=mxResources.get("error")+": "+ea.message}},function(ha){g.stop();P.style.display="none";P.innerText="";I.innerText="";mxUtils.write(I,mxResources.get("errorLoadingFile"));mxUtils.write(u,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Z))});mxEvent.addListener(aa,"dblclick",function(Z){p.click();window.getSelection?window.getSelection().removeAllRanges():
+document.selection&&document.selection.empty();mxEvent.consume(Z)},!1);O.appendChild(aa)}return aa}(d[f]);null!=S&&f==d.length-1&&(L=S)}V.appendChild(O);k.appendChild(V)}else null==l||null==b.drive&&l.constructor==window.DriveFile||null==b.dropbox&&l.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));this.init=function(){null!=
+L&&L.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";D.appendChild(P);D.appendChild(y);D.appendChild(T);D.appendChild(v);D.appendChild(n);D.appendChild(H);b.editor.cancelFirst?(q.appendChild(k),q.appendChild(M),q.appendChild(W),q.appendChild(Q),q.appendChild(p)):(q.appendChild(M),q.appendChild(W),q.appendChild(Q),q.appendChild(p),q.appendChild(k));c.appendChild(q);c.appendChild(D);c.appendChild(I);this.container=c},DraftDialog=function(b,d,e,c,k,
+m,u,z,C){var A=document.createElement("div"),B=document.createElement("div");B.style.marginTop="0px";B.style.whiteSpace="nowrap";B.style.overflow="auto";B.style.lineHeight="normal";mxUtils.write(B,d);A.appendChild(B);var J=document.createElement("select"),f=mxUtils.bind(this,function(){E=mxUtils.parseXml(C[J.value].data);F=b.editor.extractGraphModel(E.documentElement,!0);G=0;this.init()});if(null!=C){J.style.marginLeft="4px";for(d=0;d<C.length;d++){var g=document.createElement("option");g.setAttribute("value",
+d);var l=new Date(C[d].created),q=new Date(C[d].modified);mxUtils.write(g,l.toLocaleDateString()+" "+l.toLocaleTimeString()+" - "+(l.toDateString(),q.toDateString(),q.toLocaleDateString())+" "+q.toLocaleTimeString());J.appendChild(g)}B.appendChild(J);mxEvent.addListener(J,"change",f)}null==e&&(e=C[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=
+"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);A.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var E=mxUtils.parseXml(e),F=b.editor.extractGraphModel(E.documentElement,!0),G=0,y=null,T=x.getGlobalVariable;x.getGlobalVariable=function(v){return"page"==v&&null!=y&&null!=y[G]?y[G].getAttribute("name"):"pagenumber"==v?G+1:"pagecount"==v?
+null!=y?y.length:1:T.apply(this,arguments)};x.getLinkForCell=function(){return null};e=mxUtils.button("",function(){x.zoomIn()});e.className="geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);B=mxUtils.button("",function(){x.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin=
+"2px";mxUtils.setOpacity(B,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){x.zoomActual();x.center()});g.className="geSprite geSprite-actualsize";g.setAttribute("title",mxResources.get("actualSize"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,
+60);u=mxUtils.button(u||mxResources.get("discard"),function(){k.apply(this,[J.value,mxUtils.bind(this,function(){null!=J.parentNode&&(J.options[J.selectedIndex].parentNode.removeChild(J.options[J.selectedIndex]),0<J.options.length?(J.value=J.options[0].value,f()):b.hideDialog(!0))})])});u.className="geBtn";var n=document.createElement("select");n.style.maxWidth="80px";n.style.position="relative";n.style.top="-2px";n.style.verticalAlign="bottom";n.style.marginRight="6px";n.style.display="none";m=mxUtils.button(m||
+mxResources.get("edit"),function(){c.apply(this,[J.value])});m.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.right="40px";l.style.textAlign="right";q=document.createElement("div");q.className="geToolbarContainer";q.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function v(I){if(null!=I){var M=I.getAttribute("background");if(null==
+M||""==M||M==mxConstants.NONE)M=Editor.isDarkMode()?"transparent":"#ffffff";t.style.backgroundColor=M;(new mxCodec(I.ownerDocument)).decode(I,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return I}function H(I){null!=I&&(I=v(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(n,"change",function(I){G=parseInt(n.value);H(y[G]);mxEvent.consume(I)});if("mxfile"==F.nodeName){var K=F.getElementsByTagName("diagram");y=[];for(var N=0;N<K.length;N++)y.push(K[N]);0<y.length&&H(y[G]);n.innerText=
+"";if(1<y.length)for(n.style.display="",N=0;N<y.length;N++)K=document.createElement("option"),mxUtils.write(K,y[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),K.setAttribute("value",N),N==G&&K.setAttribute("selected","selected"),n.appendChild(K);else n.style.display="none"}else v(F)};q.appendChild(n);q.appendChild(e);q.appendChild(B);q.appendChild(g);q.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.className="geBtn";z=null!=z?mxUtils.button(mxResources.get("ignore"),
+z):null;null!=z&&(z.className="geBtn");b.editor.cancelFirst?(l.appendChild(e),null!=z&&l.appendChild(z),l.appendChild(u),l.appendChild(m)):(l.appendChild(m),l.appendChild(u),null!=z&&l.appendChild(z),l.appendChild(e));A.appendChild(l);A.appendChild(q);this.container=A},FindWindow=function(b,d,e,c,k,m){function u(U,W,p,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var V=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();if(null==U&&(D&&0<=V.indexOf(p)||!D&&V.substring(0,p.length)===p)||null!=U&&U.test(V))return!0}}return!1}function z(){g&&y.value?(M.removeAttribute("disabled"),Q.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));y.value&&G.value?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}function C(U,W,p){N.innerText="";var D=B.model.getDescendants(B.model.getRoot()),L=G.value.toLowerCase(),V=T.checked?new RegExp(L):
+null,O=null;q=null;J!=L&&(J=L,f=null,l=!1);var R=null==f;if(0<L.length){if(l){l=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;f=null;do l=!1,D=b.pages[U],B=b.createTemporaryGraph(B.getStylesheet()),b.updatePageRoot(D),B.model.setRoot(D.root),U=(U+1)%b.pages.length;while(!C(!0,W,p)&&U!=S);f&&(f=null,p?b.editor.graph.model.execute(new SelectPage(b,D)):b.selectPage(D));l=!1;B=b.editor.graph;return C(!0,W,p)}for(X=0;X<D.length;X++){S=B.view.getState(D[X]);
+W&&null!=V&&(R=R||S==f);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(B.model.isVertex(S.cell)||B.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(v.innerHTML=B.sanitizeHtml(B.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([v])):label=B.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;W&&m&&null!=V&&S==f&&(label=label.substr(t),Y=t);var aa=""==y.value,ba=aa;if(null==V&&(ba&&0<=label.indexOf(L)||!ba&&label.substring(0,L.length)===
+L||aa&&u(V,S.cell,L,ba))||null!=V&&(V.test(label)||aa&&u(V,S.cell,L,ba)))if(m&&(null!=V?(aa=label.match(V),null!=aa&&0<aa.length&&(q=aa[0].toLowerCase(),t=Y+aa.index+q.length)):(q=L,t=q.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==f}}if(null!=O){if(X==D.length&&n.checked)return f=null,l=!0,C(!0,W,p);f=O;B.scrollCellToVisible(f.cell);B.isEnabled()&&!B.isCellLocked(f.cell)?p||B.getSelectionCell()==f.cell&&1==B.getSelectionCount()||B.setSelectionCell(f.cell):B.highlightCell(f.cell)}else{if(!U&&
+n.checked)return l=!0,C(!0,W,p);B.isEnabled()&&!p&&B.clearSelection()}g=null!=O;m&&!U&&z();return 0==L.length||null!=O}var A=b.actions.get("findReplace"),B=b.editor.graph,J=null,f=null,g=!1,l=!1,q=null,t=0,x=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var F=m?"260px":"200px",G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("find"));G.setAttribute("type","text");G.style.marginTop="4px";
+G.style.marginBottom="6px";G.style.width=F;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";E.appendChild(G);mxUtils.br(E);if(m){var y=document.createElement("input");y.setAttribute("placeholder",mxResources.get("replaceWith"));y.setAttribute("type","text");y.style.marginTop="4px";y.style.marginBottom="6px";y.style.width=F;y.style.fontSize="12px";y.style.borderRadius="4px";y.style.padding="6px";E.appendChild(y);mxUtils.br(E);mxEvent.addListener(y,"input",z)}var T=document.createElement("input");
+T.setAttribute("id","geFindWinRegExChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);F=document.createElement("label");F.setAttribute("for","geFindWinRegExChck");E.appendChild(F);mxUtils.write(F,mxResources.get("regularExpression"));E.appendChild(F);F=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");F.style.position="relative";F.style.marginLeft="6px";F.style.top="-1px";E.appendChild(F);mxUtils.br(E);var n=document.createElement("input");n.setAttribute("id",
+"geFindWinAllPagesChck");n.setAttribute("type","checkbox");n.style.marginRight="4px";E.appendChild(n);F=document.createElement("label");F.setAttribute("for","geFindWinAllPagesChck");E.appendChild(F);mxUtils.write(F,mxResources.get("allPages"));E.appendChild(F);var v=document.createElement("div");mxUtils.br(E);F=document.createElement("div");F.style.left="0px";F.style.right="0px";F.style.marginTop="6px";F.style.padding="0 6px 0 6px";F.style.textAlign="center";E.appendChild(F);var H=mxUtils.button(mxResources.get("reset"),
+function(){N.innerText="";G.value="";G.style.backgroundColor="";m&&(y.value="",z());J=f=null;l=!1;G.focus()});H.setAttribute("title",mxResources.get("reset"));H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";m||F.appendChild(H);var K=mxUtils.button(mxResources.get("find"),function(){try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});
+K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";F.appendChild(K);var N=document.createElement("div");N.style.marginTop="10px";if(m){var I=function(U,W,p,D,L){if(null==L||"1"!=L.html)return D=U.toLowerCase().indexOf(W,D),0>D?U:U.substr(0,D)+p+U.substr(D+W.length);var V=U;W=mxUtils.htmlEntities(W);L=[];var O=
+-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)L.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");D=U.toLowerCase().indexOf(W,D);if(0>D)return V;V=D+W.length;p=mxUtils.htmlEntities(p);U=U.substr(0,D)+p+U.substr(V);for(var R=0,S=0;S<L.length;S++){if(L[S]-R<D)U=U.substr(0,L[S])+O[S]+U.substr(L[S]);else{var X=L[S]-R<V?D+R:L[S]+(p.length-W.length);U=U.substr(0,X)+O[S]+U.substr(X)}R+=O[S].length}return U.replace(/\n/g,"<br>")},M=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=
+q&&null!=f&&y.value){var U=f.cell,W=B.getLabel(U);B.isCellEditable(U)&&B.model.setValue(U,I(W,q,y.value,t-q.length,B.getCurrentCellStyle(U)));G.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(p){b.handleError(p)}});M.setAttribute("title",mxResources.get("replFind"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled",
+"disabled");F.appendChild(M);mxUtils.br(F);var Q=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=q&&null!=f&&y.value){var U=f.cell,W=B.getLabel(U);B.model.setValue(U,I(W,q,y.value,t-q.length,B.getCurrentCellStyle(U)));M.setAttribute("disabled","disabled");Q.setAttribute("disabled","disabled")}}catch(p){b.handleError(p)}});Q.setAttribute("title",mxResources.get("replace"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow=
+"hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");F.appendChild(Q);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";if(y.value){J=null;var U=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;B.getModel().beginUpdate();try{for(var p=0,D={};C(!1,!0,!0)&&100>p;){var L=f.cell,V=B.getLabel(L),O=D[L.id];if(O&&O.replAllMrk==x&&O.replAllPos>=t)break;D[L.id]={replAllMrk:x,replAllPos:t};B.isCellEditable(L)&&
+(B.model.setValue(L,I(V,q,y.value,t-q.length,B.getCurrentCellStyle(L))),p++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(N,mxResources.get("matchesRepl",[p]))}catch(R){b.handleError(R)}finally{B.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}x++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
+"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");F.appendChild(P);mxUtils.br(F);F.appendChild(H);H=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));H.setAttribute("title",mxResources.get("close"));H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";F.appendChild(H);mxUtils.br(F);F.appendChild(N)}else H.style.width=
+"90px",K.style.width="90px";mxEvent.addListener(G,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)A.funct();else if(J!=G.value.toLowerCase()||13==U.keyCode)try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){G.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(E,"keydown",function(U){70==U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(A.funct(),mxEvent.consume(U))});
+this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),E,d,e,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?n.removeAttribute("disabled"):
+(n.checked=!1,n.setAttribute("disabled","disabled"))):B.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,d,e,c,k,m){var u=b.editor.graph,z=document.createElement("div");z.style.textAlign="center";z.style.userSelect="none";z.style.overflow="hidden";z.style.height="100%";if(m){var C=document.createElement("input");C.setAttribute("id","geFreehandBrush");C.setAttribute("type","checkbox");C.checked=u.freehand.isPerfectFreehandMode();C.style.margin="10px 5px 0px 10px";C.style.float=
+"left";z.appendChild(C);var A=document.createElement("label");A.setAttribute("for","geFreehandBrush");A.style.float="left";A.style.marginTop="10px";z.appendChild(A);mxUtils.write(A,mxResources.get("brush"));z.appendChild(A);mxUtils.br(z);var B=document.createElement("input");B.setAttribute("type","range");B.setAttribute("min","2");B.setAttribute("max","30");B.setAttribute("value",u.freehand.getBrushSize());B.style.width="90%";B.style.visibility="hidden";z.appendChild(B);mxUtils.br(z);A=function(){u.freehand.setPerfectFreehandMode(C.checked);
+B.style.visibility=C.checked?"visible":"hidden"};mxEvent.addListener(C,"change",A);A();mxEvent.addListener(B,"change",function(){u.freehand.setBrushSize(parseInt(this.value))})}var J=mxUtils.button(mxResources.get("startDrawing"),function(){u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing()});J.setAttribute("title",mxResources.get("startDrawing"));J.style.marginTop=m?"5px":"10px";J.style.width="90%";J.style.boxSizing="border-box";J.style.overflow="hidden";J.style.textOverflow=
+"ellipsis";J.style.textAlign="center";J.className="geBtn gePrimaryBtn";z.appendChild(J);this.window=new mxWindow(mxResources.get("freehand"),z,d,e,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);u.addListener("freehandStateChanged",mxUtils.bind(this,function(){J.innerText="";mxUtils.write(J,mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing"));var f=document.createElement("span");f.style.opacity="0.7";
+f.style["float"]="right";mxUtils.write(f,"X");J.appendChild(f);J.setAttribute("title",mxResources.get(u.freehand.isDrawing()?"stopDrawing":"startDrawing"));J.className="geBtn"+(u.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){u.freehand.isDrawing()&&u.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,d,e,c,k){var m=b.editor.graph,
+u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,A){if(m.isEnabled()){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();if(null!=J&&0<J.length){J=J.split(" ");for(var f=[],g=0;g<J.length;g++){var l=mxUtils.trim(J[g]);""!=l&&0>mxUtils.indexOf(C,l)&&f.push(l)}0<f.length&&(m.isSelectionEmpty()?A(C.concat(f)):m.addTagsForCells(m.getSelectionCells(),f))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
+")");b.showDialog(B.container,300,80,!0,!0);B.init()}}),z=u.div;this.window=new mxWindow(mxResources.get("tags"),z,d,e,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){u.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,d,e,c){var k=document.createElement("div");k.style.textAlign=
+"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var u="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";d==b.drive?(u=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?(u=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
+d==b.oneDrive?(u=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(u=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(u=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg",z.style.width="32px"):d==b.trello&&(u=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[u]));var C=document.createElement("input");C.setAttribute("type",
+"checkbox");u=mxUtils.button(mxResources.get("authorize"),function(){c(C.checked)});u.insertBefore(z,u.firstChild);u.style.marginTop="6px";u.className="geBigButton";u.style.fontSize="18px";u.style.padding="14px";k.appendChild(m);k.appendChild(b);k.appendChild(u);e&&(e=document.createElement("p"),e.style.marginTop="20px",e.appendChild(C),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),e.appendChild(m),k.appendChild(e),C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(m,
+"click",function(A){C.checked=!C.checked;mxEvent.consume(A)}));this.container=k},MoreShapesDialog=function(b,d,e){e=null!=e?e:b.sidebar.entries;var c=document.createElement("div"),k=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var u=b.sidebar.customEntries[m],z={title:b.getResource(u.title),entries:[]},C=0;C<u.entries.length;C++){var A=u.entries[C];z.entries.push({id:A.id,title:b.getResource(A.title),desc:b.getResource(A.desc),image:A.preview})}k.push(z)}for(m=
+0;m<e.length;m++)if(null==b.sidebar.enabledLibraries)k.push(e[m]);else{z={title:e[m].title,entries:[]};for(C=0;C<e[m].entries.length;C++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,e[m].entries[C].id)&&z.entries.push(e[m].entries[C]);0<z.entries.length&&k.push(z)}e=k;if(d){m=mxUtils.bind(this,function(T){for(var n=0;n<T.length;n++)(function(v){var H=l.cloneNode(!1);H.style.fontWeight="bold";H.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";H.style.padding="6px 0px 6px 20px";mxUtils.write(H,
+v.title);B.appendChild(H);for(var K=0;K<v.entries.length;K++)(function(N){var I=l.cloneNode(!1);I.style.cursor="pointer";I.style.padding="4px 0px 4px 20px";I.style.whiteSpace="nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.setAttribute("title",N.title+" ("+N.id+")");var M=document.createElement("input");M.setAttribute("type","checkbox");M.checked=b.sidebar.isEntryVisible(N.id);M.defaultChecked=M.checked;I.appendChild(M);mxUtils.write(I," "+N.title);B.appendChild(I);var Q=function(P){if(null==
+P||"INPUT"!=mxEvent.getSource(P).nodeName){J.style.textAlign="center";J.style.padding="0px";J.style.color="";J.innerText="";if(null!=N.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,N.desc);J.appendChild(U)}null!=N.imageCallback?N.imageCallback(J):null!=N.image?J.innerHTML+='<img border="0" src="'+N.image+'"/>':null==N.desc&&(J.style.padding="20px",J.style.color=
+"rgb(179, 179, 179)",mxUtils.write(J,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor="");f=I;f.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",Q);mxEvent.addListener(I,"dblclick",function(P){M.checked=!M.checked;mxEvent.consume(P)});g.push(function(){return M.checked?N.id:null});0==n&&0==K&&Q()})(v.entries[K])})(T[n])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));
+C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var B=document.createElement("div"),J=document.createElement("div");B.style.position="absolute";B.style.top="40px";B.style.left="0px";B.style.width="202px";B.style.bottom="60px";B.style.overflow="auto";J.style.position="absolute";J.style.left="202px";J.style.right="0px";J.style.top="40px";J.style.bottom="60px";J.style.overflow="auto";J.style.borderLeft="1px solid rgb(211, 211, 211)";
+J.style.textAlign="center";var f=null,g=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";m(e);c.style.padding="30px";c.appendChild(C);c.appendChild(B);c.appendChild(J);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";var q=document.createElement("input");
+q.setAttribute("type","checkbox");q.style.position="relative";q.style.top="1px";q.checked=b.sidebar.sidebarTitles;q.defaultChecked=q.checked;e.appendChild(q);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";e.appendChild(m);mxEvent.addListener(m,"click",function(T){q.checked=!q.checked;mxEvent.consume(T)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),
+m.style.paddingRight="20px",m.appendChild(t),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(m,"click",function(T){mxEvent.getSource(T)!=t&&(t.checked=!t.checked,mxEvent.consume(T))}),e.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var T=[],n=0;n<g.length;n++){var v=
+g[n].apply(this,arguments);null!=v&&T.push(v)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(n=mxUtils.indexOf(T,".scratchpad"),null!=b.scratchpad!=(0<=n&&0<T.splice(n,1).length)&&b.toggleScratchpad(),n=mxUtils.indexOf(T,"search"),mxSettings.settings.search=0<=n&&0<T.splice(n,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(T.join(";"),t.checked,!0);b.setSidebarTitles(q.checked,t.checked)});C.className="geBtn gePrimaryBtn"}else{var x=
+document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";C=document.createElement("tr");x.style.width="100%";d=document.createElement("td");k=document.createElement("td");u=document.createElement("td");var E=mxUtils.bind(this,function(T,n,v){var H=document.createElement("input");H.type="checkbox";x.appendChild(H);H.checked=b.sidebar.isEntryVisible(v);var K=document.createElement("span");mxUtils.write(K,n);n=document.createElement("div");n.style.display=
+"block";n.appendChild(H);n.appendChild(K);mxEvent.addListener(K,"click",function(N){H.checked=!H.checked;mxEvent.consume(N)});T.appendChild(n);return function(){return H.checked?v:null}});C.appendChild(d);C.appendChild(k);C.appendChild(u);m.appendChild(C);x.appendChild(m);g=[];var F=0;for(m=0;m<e.length;m++)for(C=0;C<e[m].entries.length;C++)F++;var G=[d,k,u],y=0;for(m=0;m<e.length;m++)(function(T){for(var n=0;n<T.entries.length;n++){var v=T.entries[n];g.push(E(G[Math.floor(y/(F/3))],v.title,v.id));
+y++}})(e[m]);c.appendChild(x);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,e.appendChild(t),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),e.appendChild(m),mxEvent.addListener(m,"click",function(T){t.checked=!t.checked;mxEvent.consume(T)}));c.appendChild(e);m=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var T=["search"],n=0;n<g.length;n++){var v=g[n].apply(this,arguments);null!=v&&T.push(v)}b.sidebar.showEntries(0<T.length?T.join(";"):"",t.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}b.editor.cancelFirst?(e.appendChild(m),e.appendChild(C)):(e.appendChild(C),e.appendChild(m));c.appendChild(e);this.container=
+c},PluginsDialog=function(b,d,e,c){function k(){C=!0;if(0==z.length)u.innerText=mxResources.get("noPlugins");else{u.innerText="";for(var l=0;l<z.length;l++){var q=document.createElement("span");q.style.whiteSpace="nowrap";var t=document.createElement("span");t.className="geSprite geSprite-delete";t.style.position="relative";t.style.cursor="pointer";t.style.top="5px";t.style.marginRight="4px";t.style.display="inline-block";q.appendChild(t);mxUtils.write(q,z[l]);u.appendChild(q);mxUtils.br(u);mxEvent.addListener(t,
+"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+z[x]+'"?',function(){null!=e&&e(z[x]);z.splice(x,1);k()})}}(l))}}}var m=document.createElement("div"),u=document.createElement("div");u.style.height="180px";u.style.overflow="auto";var z=mxSettings.getPlugins().slice(),C=!1;m.appendChild(u);k();C=!1;var A=mxUtils.button(mxResources.get("add"),null!=d?function(){d(function(l){l&&0>mxUtils.indexOf(z,l)&&z.push(l);k()})}:function(){var l=document.createElement("div"),q=document.createElement("span");
+q.style.marginTop="6px";mxUtils.write(q,mxResources.get("builtinPlugins")+": ");l.appendChild(q);var t=document.createElement("select");t.style.width="150px";for(q=0;q<App.publicPlugin.length;q++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[q]);x.value=App.publicPlugin[q];t.appendChild(x)}l.appendChild(t);mxUtils.br(l);mxUtils.br(l);q=mxUtils.button(mxResources.get("custom")+"...",function(){var E=new FilenameDialog(b,"",mxResources.get("add"),function(F){b.hideDialog();
+if(null!=F&&0<F.length){F=F.split(";");for(var G=0;G<F.length;G++){var y=F[G],T=App.pluginRegistry[y];null!=T&&(y=T);0<y.length&&0>mxUtils.indexOf(z,y)&&z.push(y)}k()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(E.container,300,80,!0,!0);E.init()});q.className="geBtn";l=new CustomDialog(b,l,mxUtils.bind(this,function(){var E=App.pluginRegistry[t.value];0>mxUtils.indexOf(z,E)&&(z.push(E),k())}),null,null,null,q);b.showDialog(l.container,360,100,!0,!0)});A.className=
+"geBtn";var B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";var J=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(z),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});J.className="geBtn gePrimaryBtn";var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";var g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
+g.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(g.style.display="none");f.appendChild(g);b.editor.cancelFirst?(c||f.appendChild(B),f.appendChild(A),f.appendChild(J)):(f.appendChild(A),f.appendChild(J),c||f.appendChild(B));m.appendChild(f);this.container=m},CropImageDialog=function(b,d,e,c){function k(){var T=t.checked,n=x.checked,v=g.geometry,H=C.width,K=C.height,N=(300-H)/2,I=(300-K)/2;v.x<N?(v.width-=N-v.x,v.x=N):v.x+v.width>N+H&&(v.width=N+H-v.x,v.x=Math.min(v.x,N+H));v.y<I?(v.height-=
+I-v.y,v.y=I):v.y+v.height>I+K&&(v.height=I+K-v.y,v.y=Math.min(v.y,I+K));var M=(v.x-N)/H*100;H=100-(v.x+v.width-N)/H*100;N=(v.y-I)/K*100;v=100-(v.y+v.height-I)/K*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(H)+"% "+mxUtils.format(v)+"% "+mxUtils.format(M)+"%"+(T?" round "+f+"%":n?" round 50%":"")+")"}function m(T){null!=B&&(!0!==T&&(B.model.setGeometry(g,J.clone()),f=5,F.value=f),B.model.setStyle(g,l+k()),B.selectAll(),E.style.visibility=t.checked?"visible":"hidden")}var u=document.createElement("div"),
+z=document.createElement("div");z.style.height="300px";z.style.width="300px";z.style.display="inline-flex";z.style.justifyContent="center";z.style.alignItems="center";z.style.position="absolute";var C=document.createElement("img");C.onload=function(){function T(){B.model.setStyle(g,l+k())}B=new Graph(A);B.autoExtend=!1;B.autoScroll=!1;B.setGridEnabled(!1);B.setEnabled(!0);B.setPanning(!1);B.setConnectable(!1);B.getRubberband().setEnabled(!1);B.graphHandler.allowLivePreview=!1;var n=B.createVertexHandler;
+B.createVertexHandler=function(){var V=n.apply(this,arguments);V.livePreview=!1;return V};if(null!=e)try{if("inset"==e.substring(0,5)){var v=g.geometry,H=C.width,K=C.height,N=(300-H)/2,I=(300-K)/2,M=e.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(M[0]),P=parseFloat(M[1]),U=parseFloat(M[2]),W=parseFloat(M[3]);isFinite(Q)&&isFinite(P)&&isFinite(U)&&isFinite(W)?(v.x=W/100*H+N,v.y=Q/100*K+I,v.width=(100-P)/100*H+N-v.x,v.height=(100-U)/100*K+I-v.y,"round"==M[4]?"50%"==M[5]?x.setAttribute("checked",
+"checked"):(f=parseInt(M[5]),F.value=f,t.setAttribute("checked","checked"),E.style.visibility="visible"):q.setAttribute("checked","checked")):e=null}else e=null}catch(V){}g.style=l+(e?e:k());g.vertex=!0;B.addCell(g,null,null,null,null);B.selectAll();B.addListener(mxEvent.CELLS_MOVED,T);B.addListener(mxEvent.CELLS_RESIZED,T);var p=B.graphHandler.mouseUp,D=B.graphHandler.mouseDown;B.graphHandler.mouseUp=function(){p.apply(this,arguments);A.style.backgroundColor="#fff9"};B.graphHandler.mouseDown=function(){D.apply(this,
+arguments);A.style.backgroundColor=""};B.dblClick=function(){};var L=B.getSelectionModel().changeSelection;B.getSelectionModel().changeSelection=function(){L.call(this,[g],[g])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",d);C.style.maxWidth="300px";C.style.maxHeight="300px";z.appendChild(C);u.appendChild(z);var A=document.createElement("div");A.style.width="300px";A.style.height="300px";A.style.overflow="hidden";A.style.backgroundColor="#fff9";u.appendChild(A);
+var B=null,J=new mxGeometry(100,100,100,100),f=5,g=new mxCell("",J.clone(),""),l="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+d.replace(";base64","")+";clipPath=",q=document.createElement("input");q.setAttribute("type","radio");q.setAttribute("id","croppingRect");q.setAttribute("name","croppingShape");q.setAttribute("checked","checked");q.style.margin="5px";u.appendChild(q);d=document.createElement("label");d.setAttribute("for","croppingRect");mxUtils.write(d,mxResources.get("rectangle"));
+u.appendChild(d);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";u.appendChild(t);d=document.createElement("label");d.setAttribute("for","croppingRounded");mxUtils.write(d,mxResources.get("rounded"));u.appendChild(d);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";
+u.appendChild(x);d=document.createElement("label");d.setAttribute("for","croppingEllipse");mxUtils.write(d,mxResources.get("ellipse"));u.appendChild(d);mxEvent.addListener(q,"change",m);mxEvent.addListener(t,"change",m);mxEvent.addListener(x,"change",m);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min","1");F.setAttribute("max","49");F.setAttribute("value",f);F.setAttribute("title",
+mxResources.get("arcSize"));E.appendChild(F);u.appendChild(E);mxEvent.addListener(F,"change",function(){f=this.value;m(!0)});d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){c(k(),g.geometry.width,g.geometry.height);b.hideDialog()});z.className="geBtn gePrimaryBtn";var G=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});G.className="geBtn";var y=document.createElement("div");
+y.style.marginTop="10px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(G),y.appendChild(z)):(y.appendChild(G),y.appendChild(z),y.appendChild(d));u.appendChild(y);this.container=u},EditGeometryDialog=function(b,d){var e=b.editor.graph,c=1==d.length?e.getCellGeometry(d[0]):null,k=document.createElement("div"),m=document.createElement("table"),u=document.createElement("tbody"),z=document.createElement("tr"),C=document.createElement("td"),A=document.createElement("td");
+m.style.paddingLeft="6px";mxUtils.write(C,mxResources.get("relative")+":");var B=document.createElement("input");B.setAttribute("type","checkbox");null!=c&&c.relative&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);this.init=function(){B.focus()};A.appendChild(B);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("left")+":");var J=document.createElement("input");
+J.setAttribute("type","text");J.style.width="100px";J.value=null!=c?c.x:"";A.appendChild(J);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=c?c.y:"";A.appendChild(f);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");
+A=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";A.appendChild(g);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";
+l.value=null!=c&&null!=c.offset?c.offset.y:"";A.appendChild(l);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";A.appendChild(q);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=
+document.createElement("td");mxUtils.write(C,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";A.appendChild(t);z.appendChild(C);z.appendChild(A);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=
+1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";A.appendChild(x);z.appendChild(C);z.appendChild(A);u.appendChild(z);m.appendChild(u);k.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();e.getModel().beginUpdate();try{for(var F=0;F<d.length;F++){var G=e.getCellGeometry(d[F]);null!=G&&(G=G.clone(),e.isCellMovable(d[F])&&(G.relative=B.checked,
+0<mxUtils.trim(J.value).length&&(G.x=Number(J.value)),0<mxUtils.trim(f.value).length&&(G.y=Number(f.value)),0<mxUtils.trim(g.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.x=Number(g.value)),0<mxUtils.trim(l.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.y=Number(l.value))),e.isCellResizable(d[F])&&(0<mxUtils.trim(q.value).length&&(G.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(G.height=Number(t.value))),e.getModel().setGeometry(d[F],G));0<mxUtils.trim(x.value).length&&
+e.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[F]])}}finally{e.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(F){13==F.keyCode&&E.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(E)):(m.appendChild(E),m.appendChild(c));k.appendChild(m);this.container=k},LibraryDialog=function(b,d,e,c,k,m){function u(n){for(n=document.elementFromPoint(n.clientX,
+n.clientY);null!=n&&n.parentNode!=g;)n=n.parentNode;var v=null;if(null!=n){var H=g.firstChild;for(v=0;null!=H&&H!=n;)H=H.nextSibling,v++}return v}function z(n,v,H,K,N,I,M,Q,P){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==n&&null!=M||null==q[n]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
+X.title.length?"#d0d0d0":""};g.style.backgroundImage="";l.style.display="none";var W=N,p=I;if(N>b.maxImageSize||I>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,N)),b.maxImageSize/Math.max(1,I));N*=D;I*=D}W>p?(p=Math.round(100*p/W),W=100):(W=Math.round(100*W/p),p=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
+"transform .1s ease-in-out");if(null!=n){var V=document.createElement("img");V.setAttribute("src",F.convert(n));V.style.width=W+"px";V.style.height=p+"px";V.style.margin="10px";V.style.paddingBottom=Math.floor((100-p)/2)+"px";V.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(V)}else if(null!=M){var O=b.stringToCells(Graph.decompress(M.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var R=document.createElement("img");
+R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(da){mxEvent.consume(da)});(function(da,Z,ha){mxEvent.addListener(R,"click",function(ea){q[Z]=null;for(var ua=0;ua<B.length;ua++)if(null!=B[ua].data&&B[ua].data==Z||null!=B[ua].xml&&
+null!=ha&&B[ua].xml==ha.xml){B.splice(ua,1);break}L.parentNode.removeChild(da);0==B.length&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.display="");mxEvent.consume(ea)});mxEvent.addListener(R,"dblclick",function(ea){mxEvent.consume(ea)})})(L,n,M);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=n?(X={data:n,w:N,h:I,title:P},null!=Q&&(X.aspect=Q),q[n]=V,B.push(X)):null!=M&&(M.aspect="fixed",B.push(M),X=M);mxEvent.addListener(S,"keydown",function(da){13==da.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(da))});U();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(da){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(da)});O=function(da){if(mxClient.IS_IOS||
+mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Z=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ha){null!=ha&&(X.title=ha,U())},mxResources.get("enterValue"));b.showDialog(Z.container,300,80,!0,!0);Z.init();mxEvent.consume(da)}else if("true"!=S.getAttribute("contentEditable")){null!=E&&(E(),E=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);E=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;U()};mxEvent.consume(da)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);g.appendChild(L);mxEvent.addListener(L,"dragstart",function(da){null==n&&null!=M&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=M.xml&&da.dataTransfer.setData("Text",
+M.xml);t=u(da);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(da){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");t=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{N=
+!1;try{if(W=mxUtils.parseXml(n),"mxlibrary"==W.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=p&&0<p.length)for(var Y=0;Y<p.length;Y++)null!=p[Y].xml?z(null,null,0,0,0,0,p[Y]):z(p[Y].data,null,0,0,p[Y].w,p[Y].h,null,"fixed",p[Y].title);N=!0}else if("mxfile"==W.documentElement.nodeName){var aa=W.documentElement.getElementsByTagName("diagram");for(Y=0;Y<aa.length;Y++){p=mxUtils.getTextContent(aa[Y]);O=b.stringToCells(Graph.decompress(p));var ba=b.editor.graph.getBoundingBoxFromGeometry(O);
+z(null,null,0,0,0,0,{xml:p,w:ba.width,h:ba.height})}N=!0}}catch(da){}N||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function C(n){n.dataTransfer.dropEffect=null!=t?"move":"copy";n.stopPropagation();n.preventDefault()}function A(n){n.stopPropagation();n.preventDefault();G=!1;x=u(n);if(null!=t)null!=x&&x<g.children.length?(B.splice(x>t?x-1:x,0,B.splice(t,1)[0]),g.insertBefore(g.children[t],g.children[x])):(B.push(B.splice(t,1)[0]),g.appendChild(g.children[t]));
+else if(0<n.dataTransfer.files.length)b.importFiles(n.dataTransfer.files,0,0,b.maxImageSize,y(n));else if(0<=mxUtils.indexOf(n.dataTransfer.types,"text/uri-list")){var v=decodeURIComponent(n.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(v)||/(\.png)($|\?)/i.test(v)||/(\.gif)($|\?)/i.test(v)||/(\.svg)($|\?)/i.test(v))&&b.loadImage(v,function(H){z(v,null,0,0,H.width,H.height);g.scrollTop=g.scrollHeight})}n.stopPropagation();n.preventDefault()}var B=[];e=document.createElement("div");
+e.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="40px";e.appendChild(J);mxUtils.write(J,mxResources.get("filename")+":");null==d&&(d=b.defaultLibraryName+".xml");var f=document.createElement("input");f.setAttribute("value",d);f.style.marginRight="20px";f.style.marginLeft="10px";f.style.width="500px";null==k||k.isRenamable()||f.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())f.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};J.appendChild(f);var g=document.createElement("div");g.style.borderWidth="1px 0px 1px 0px";g.style.borderColor="#d3d3d3";g.style.borderStyle="solid";g.style.marginTop="6px";g.style.overflow="auto";g.style.height="340px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";0==B.length&&Graph.fileSupport&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var l=document.createElement("div");
+l.style.position="absolute";l.style.width="640px";l.style.top="260px";l.style.textAlign="center";l.style.fontSize="22px";l.style.color="#a0c3ff";mxUtils.write(l,mxResources.get("dragImagesHere"));e.appendChild(l);var q={},t=null,x=null,E=null;d=function(n){"true"!=mxEvent.getSource(n).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(n))};mxEvent.addListener(g,"mousedown",d);mxEvent.addListener(g,"pointerdown",d);mxEvent.addListener(g,"touchstart",d);var F=new mxUrlConverter,G=
+!1;if(null!=c)for(d=0;d<c.length;d++)J=c[d],z(J.data,null,0,0,J.w,J.h,J,J.aspect,J.title);mxEvent.addListener(g,"dragleave",function(n){l.style.cursor="";for(var v=mxEvent.getSource(n);null!=v;){if(v==g||v==l){n.stopPropagation();n.preventDefault();break}v=v.parentNode}});var y=function(n){return function(v,H,K,N,I,M,Q,P,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(W){z(W,H,K,N,I,M,Q,"fixed",mxEvent.isAltDown(n)?
+null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(v,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(z(W.responseText,H,K,N,I,M,Q,"fixed",mxEvent.isAltDown(n)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(z(v,H,K,N,I,M,Q,"fixed",mxEvent.isAltDown(n)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",C);mxEvent.addListener(g,"drop",A);mxEvent.addListener(l,"dragover",C);mxEvent.addListener(l,"drop",A);e.appendChild(g);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&
+c.appendChild(d);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(J=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(n){b.spinner.stop();if(null!=n){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(n);n=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(n.container,450,240,!0);n.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),J.className="geBtn",c.appendChild(J));J=mxUtils.button(mxResources.get("export"),
+function(){var n=b.createLibraryDataFromImages(B),v=f.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(n,v,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(n))).simulate(document,"_blank")});J.setAttribute("id","btnDownload");J.className="geBtn";c.appendChild(J);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");
+T.setAttribute("type","file");mxEvent.addListener(T,"change",function(n){G=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(v,H,K,N,I,M,Q,P,U){null!=T.files&&(y(n)(v,H,K,N,I,M,Q,P,U),T.type="",T.type="file",T.value="")});g.scrollTop=g.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}J=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});J.setAttribute("id","btnAddImage");J.className="geBtn";c.appendChild(J)}J=
+mxUtils.button(mxResources.get("addImages"),function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(n,v,H){G=!1;if(null!=n){if("data:image/"==n.substring(0,11)){var K=n.indexOf(",");0<K&&(n=n.substring(0,K)+";base64,"+n.substring(K+1))}z(n,null,0,0,v,H);g.scrollTop=g.scrollHeight}})});J.setAttribute("id","btnAddImageUrl");J.className="geBtn";c.appendChild(J);this.saveBtnClickHandler=function(n,v,H,K){b.saveLibrary(n,v,H,K)};J=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=E&&(E(),E=null);this.saveBtnClickHandler(f.value,B,k,m)}));J.setAttribute("id","btnSave");J.className="geBtn gePrimaryBtn";c.appendChild(J);b.editor.cancelFirst||c.appendChild(d);e.appendChild(c);this.container=e},EditShapeDialog=function(b,d,e,c,k){c=null!=c?c:300;k=null!=k?k:120;var m=document.createElement("table"),u=document.createElement("tbody");m.style.cellPadding="4px";var z=document.createElement("tr");var C=document.createElement("td");C.setAttribute("colspan",
+"2");C.style.fontSize="10pt";mxUtils.write(C,e);z.appendChild(C);u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");var A=document.createElement("textarea");A.style.outline="none";A.style.resize="none";A.style.width=c-200+"px";A.style.height=k+"px";this.textarea=A;this.init=function(){A.focus();A.scrollTop=0};C.appendChild(A);z.appendChild(C);C=document.createElement("td");e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.top=
+"6px";e.style.width="200px";e.style.height=k+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);C.appendChild(e);var B=new Graph(e);B.setEnabled(!1);var J=b.editor.graph.cloneCell(d);B.addCells([J]);e=B.view.getState(J);var f="";null!=e.shape&&null!=e.shape.stencil&&(f=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(A,f||"");e=B.getGraphBounds();k=Math.min(160/e.width,(k-40)/e.height);B.view.scaleAndTranslate(k,20/k-e.x,20/k-e.y);z.appendChild(C);
+u.appendChild(z);z=document.createElement("tr");C=document.createElement("td");C.setAttribute("colspan","2");C.style.paddingTop="2px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");b.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),k.className="geBtn",C.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&C.appendChild(k);
+var g=function(l,q,t){var x=A.value,E=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),E=!l.model.contains(q),!t||E||x!=f){x=Graph.compress(x);l.getModel().beginUpdate();try{if(E){var F=b.editor.graph.getFreeInsertPoint();q.geometry.x=F.x;q.geometry.y=F.y;l.addCell(q)}l.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+x+")",[q])}catch(G){throw G;}finally{l.getModel().endUpdate()}E&&(l.setSelectionCell(q),l.scrollCellToVisible(q))}};e=mxUtils.button(mxResources.get("preview"),function(){g(B,J,!1)});e.className="geBtn";C.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";C.appendChild(e);b.editor.cancelFirst||C.appendChild(k);z.appendChild(C);u.appendChild(z);m.appendChild(u);this.container=m},CustomDialog=function(b,d,e,c,k,m,
+u,z,C,A,B){var J=document.createElement("div");J.appendChild(d);var f=document.createElement("div");f.style.marginTop="30px";f.style.textAlign="center";null!=u&&f.appendChild(u);b.isOffline()||null==m||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),d.className="geBtn",f.appendChild(d));C=mxUtils.button(C||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});C.className="geBtn";z&&(C.style.display="none");b.editor.cancelFirst&&f.appendChild(C);k=mxUtils.button(k||
+mxResources.get("ok"),mxUtils.bind(this,function(){A||b.hideDialog(null,null,this.container);if(null!=e){var g=e();if("string"===typeof g){b.showError(mxResources.get("error"),g);return}}A&&b.hideDialog(null,null,this.container)}));f.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||f.appendChild(C);if(null!=B)for(z=0;z<B.length;z++)(function(g,l,q){g=mxUtils.button(g,function(t){l(t)});null!=q&&g.setAttribute("title",q);g.className="geBtn";f.appendChild(g)})(B[z][0],B[z][1],B[z][2]);
+J.appendChild(f);this.cancelBtn=C;this.okButton=k;this.container=J},TemplatesDialog=function(b,d,e,c,k,m,u,z,C,A,B,J,f,g,l){function q(ia){oa.innerText=ia;oa.style.display="block";setTimeout(function(){oa.style.display="none"},4E3)}function t(){null!=p&&(p.style.fontWeight="normal",p.style.textDecoration="none",D=p,p=null)}function x(ia,ja,pa,za,Da,Fa,Ea){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";P.querySelector(".geTempDlgRadioBtn[data-id="+
+za+"]").className="geTempDlgRadioBtn "+(Ea?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");P.querySelector("."+ja).src="/images/"+pa+"-sel.svg";P.querySelector("."+Da).src="/images/"+Fa+".svg";return!0}function E(ia,ja,pa,za){function Da(ta,Oa){null==Ea?(ta=/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)?PROXY_URL+"?url="+encodeURIComponent(ta):TEMPLATE_PATH+"/"+ta,mxUtils.get(ta,mxUtils.bind(this,function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Ea=Qa.getText());Oa(Ea)}))):Oa(Ea)}
+function Fa(ta,Oa,Qa){if(null!=ta&&mxUtils.isAncestorNode(document.body,ja)&&(ta=mxUtils.parseXml(ta),ta=Editor.extractGraphModel(ta.documentElement,!0),null!=ta)){"mxfile"==ta.nodeName&&(ta=Editor.parseDiagramNode(ta.getElementsByTagName("diagram")[0]));var Va=new mxCodec(ta.ownerDocument),Ga=new mxGraphModel;Va.decode(ta,Ga);ta=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(ja,ta,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Oa,Qa),!0,null,!0);var La=document.createElement("div");La.className="geTempDlgDialogMask";P.appendChild(La);var Ma=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){La&&(P.removeChild(La),La=null,Ma.apply(this,arguments),b.sidebar.hideTooltip=Ma)};mxEvent.addListener(La,"click",function(){b.sidebar.hideTooltip()})}}var Ea=null;if(Ja||b.sidebar.currentElt==
+ja)b.sidebar.hideTooltip();else{var wa=function(ta){Ja&&b.sidebar.currentElt==ja&&Fa(ta,mxEvent.getClientX(za),mxEvent.getClientY(za));Ja=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ja;Ja=!0;pa.src="/images/aui-wait.gif";ia.isExt?C(ia,wa,function(){q(mxResources.get("cantLoadPrev"));Ja=!1;pa.src="/images/icon-search.svg"}):Da(ia.url,wa)}}function F(ia,ja,pa){if(null!=L){for(var za=L.className.split(" "),Da=0;Da<za.length;Da++)if(-1<za[Da].indexOf("Active")){za.splice(Da,
+1);break}L.className=za.join(" ")}null!=ia?(L=ia,L.className+=" "+ja,V=pa,Na.className="geTempDlgCreateBtn"):(V=L=null,Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function G(ia,ja){if(null!=V){var pa=function(wa){Ea.isExternal?C(Ea,function(ta){za(ta,wa)},Da):Ea.url?mxUtils.get(TEMPLATE_PATH+"/"+Ea.url,mxUtils.bind(this,function(ta){200<=ta.getStatus()&&299>=ta.getStatus()?za(ta.getText(),wa):Da()})):za(b.emptyDiagramXml,wa)},za=function(wa,ta){l||b.hideDialog(!0);d(wa,ta,Ea,ja)},Da=function(){q(mxResources.get("cannotLoad"));
+Fa()},Fa=function(){V=Ea;Na.className="geTempDlgCreateBtn";ja&&(Ia.className="geTempDlgOpenBtn")},Ea=V;V=null;"boolean"!==typeof ja&&(ja=Ea.isExternal&&J);1==ia?A(Ea.url,Ea):ja?(Ia.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),pa,ia,function(wa){var ta=null!=wa&&0<wa.length;return ta&&l?(pa(wa),!1):ta},null,null,null,Fa,g?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function y(ia){Na.innerText=mxResources.get(da||ia?"create":"copy");ia=ia?"none":"";J&&(Ia.style.display=ia);for(var ja=P.querySelectorAll(".geTempDlgLinkToDiagram"),pa=0;pa<ja.length;pa++)ja[pa].style.display=ia}function T(ia,ja,pa,za,Da){Da||(ha.innerText="",F(),X=ia,Y=za);var Fa=null;if(pa){Fa=document.createElement("table");
+Fa.className="geTempDlgDiagramsListGrid";var Ea=document.createElement("tr"),wa=document.createElement("th");wa.style.width="50%";wa.innerText=mxResources.get("diagram");Ea.appendChild(wa);wa=document.createElement("th");wa.style.width="25%";wa.innerText=mxResources.get("changedBy");Ea.appendChild(wa);wa=document.createElement("th");wa.style.width="25%";wa.innerText=mxResources.get("lastModifiedOn");Ea.appendChild(wa);Fa.appendChild(Ea);ha.appendChild(Fa)}for(Ea=0;Ea<ia.length;Ea++){ia[Ea].isExternal=
+!ja;var ta=ia[Ea].url,Oa=(wa=mxUtils.htmlEntities(ja?mxResources.get(ia[Ea].title,null,ia[Ea].title):ia[Ea].title))||ia[Ea].url,Qa=ia[Ea].imgUrl,Va=ia[Ea].changedBy||"",Ga="";ia[Ea].lastModifiedOn&&(Ga=b.timeSince(new Date(ia[Ea].lastModifiedOn)),null==Ga&&(Ga=mxResources.get("lessThanAMinute")),Ga=mxResources.get("timeAgo",[Ga],"{1} ago"));Qa||(Qa=TEMPLATE_PATH+"/"+ta.substring(0,ta.length-4)+".png");ta=pa?50:15;null!=wa&&wa.length>ta&&(wa=wa.substring(0,ta)+"&hellip;");if(pa){var La=document.createElement("tr");
+Qa=document.createElement("td");var Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramListPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Da||Qa.appendChild(Ma);Oa=document.createElement("span");Oa.className="geTempDlgDiagramTitle";Oa.innerHTML=wa;Qa.appendChild(Oa);La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ga;La.appendChild(Qa);Fa.appendChild(La);
+null==L&&(y(ja),F(La,"geTempDlgDiagramsListGridActive",ia[Ea]));(function(Ha,Ta,Sa){mxEvent.addListener(La,"click",function(){L!=Ta&&(y(ja),F(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(La,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ha,Ta,Sa,Wa)})})(ia[Ea],La,Ma)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",Oa);null==L&&(y(ja),F(Pa,"geTempDlgDiagramTileActive",ia[Ea]));Va=document.createElement("div");Va.className=
+"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Pa.appendChild(Va);Va=document.createElement("div");
+Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=wa?wa:"";Pa.appendChild(Va);Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Da||Pa.appendChild(Ma);(function(Ha,Ta,Sa){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(y(ja),F(Ta,"geTempDlgDiagramTileActive",Ha))});mxEvent.addListener(Pa,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ha,Ta,Sa,Wa)})})(ia[Ea],Pa,Ma);ha.appendChild(Pa)}}for(var Ua in za)ia=
+za[Ua],0<ia.length&&(Da=document.createElement("div"),Da.className="geTempDlgImportCat",Da.innerText=mxResources.get(Ua,null,Ua),ha.appendChild(Da),T(ia,ja,pa,null,!0))}function n(ia,ja){ka.innerText="";F();var pa=Math.floor(ka.offsetWidth/150)-1;ja=!ja&&ia.length>pa?pa:ia.length;for(var za=0;za<ja;za++){var Da=ia[za];Da.isCategory=!0;var Fa=document.createElement("div"),Ea=mxResources.get(Da.title);null==Ea&&(Ea=Da.title.substring(0,1).toUpperCase()+Da.title.substring(1));Fa.className="geTempDlgNewDiagramCatItem";
+Fa.setAttribute("title",Ea);Ea=mxUtils.htmlEntities(Ea);15<Ea.length&&(Ea=Ea.substring(0,15)+"&hellip;");null==L&&(y(!0),F(Fa,"geTempDlgNewDiagramCatItemActive",Da));var wa=document.createElement("div");wa.className="geTempDlgNewDiagramCatItemImg";var ta=document.createElement("img");ta.src=NEW_DIAGRAM_CATS_PATH+"/"+Da.img;wa.appendChild(ta);Fa.appendChild(wa);wa=document.createElement("div");wa.className="geTempDlgNewDiagramCatItemLbl";wa.innerHTML=Ea;Fa.appendChild(wa);ka.appendChild(Fa);(function(Oa,
+Qa){mxEvent.addListener(Fa,"click",function(){L!=Qa&&(y(!0),F(Qa,"geTempDlgNewDiagramCatItemActive",Oa))});mxEvent.addListener(Fa,"dblclick",G)})(Da,Fa)}Fa=document.createElement("div");Fa.className="geTempDlgNewDiagramCatItem";Ea=mxResources.get("showAllTemps");Fa.setAttribute("title",Ea);wa=document.createElement("div");wa.className="geTempDlgNewDiagramCatItemImg";wa.innerText="...";wa.style.fontSize="32px";Fa.appendChild(wa);wa=document.createElement("div");wa.className="geTempDlgNewDiagramCatItemLbl";
+wa.innerText=Ea;Fa.appendChild(wa);ka.appendChild(Fa);mxEvent.addListener(Fa,"click",function(){function Oa(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Oa,200)}da=!0;var Qa=P.querySelector(".geTemplatesList");Qa.style.display="block";ya.style.width="";Ca.style.display="";Ca.value="";aa=null;Oa()});Z.style.display=ia.length<=pa?"none":""}function v(ia,ja,pa){function za(Ra,Ua){var Ha=mxResources.get(Ra);null==Ha&&(Ha=Ra.substring(0,1).toUpperCase()+Ra.substring(1));
+Ra=Ha+" ("+Ua.length+")";var Ta=Ha=mxUtils.htmlEntities(Ha);15<Ha.length&&(Ha=Ha.substring(0,15)+"&hellip;");return{lbl:Ha+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Da(Ra,Ua,Ha,Ta,Sa){mxEvent.addListener(Ha,"click",function(){p!=Ha&&(null!=p?(p.style.fontWeight="normal",p.style.textDecoration="none"):(va.style.display="none",xa.style.minHeight="100%"),p=Ha,p.style.fontWeight="bold",p.style.textDecoration="underline",ya.scrollTop=0,U&&(W=!0),ea.innerHTML=Ua,ua.style.display="none",T(Sa?ja[Ra]:
+Ta?Ka[Ra][Ta]:ia[Ra],Sa?!1:!0))})}var Fa=P.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));Fa.appendChild(pa);for(var Ea in ja){pa=document.createElement("div");var wa=ja[Ea];wa=za(Ea,wa);pa.className="geTemplateCatLink";pa.setAttribute("title",wa.fullLbl);pa.innerHTML=wa.lbl;Fa.appendChild(pa);Da(Ea,wa.lblOnly,pa,
+null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");Fa.appendChild(pa)}for(Ea in ia){var ta=Ka[Ea],Oa=pa=document.createElement(ta?"ul":"div");wa=ia[Ea];wa=za(Ea,wa);if(null!=ta){var Qa=document.createElement("li"),Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",wa.fullLbl);
+Va.innerHTML=wa.lbl;Oa=Va;Qa.appendChild(Va);var Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var La in ta){var Ma=document.createElement("li"),Pa=za(La,ta[La]);Ma.setAttribute("title",Pa.fullLbl);Ma.innerHTML=Pa.lbl;Ma.className="geTemplateCatLink";Ma.style.padding="0";Ma.style.margin="0";Da(Ea,Pa.lblOnly,Ma,La);Ga.appendChild(Ma)}Qa.appendChild(Ga);pa.className="geTempTree";pa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ha=
+Ra.querySelectorAll("li"),Ta=0;Ta<Ha.length;Ta++)Ha[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ha.length;Sa++)Ha[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ga,Va)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",pa.setAttribute("title",wa.fullLbl),pa.innerHTML=wa.lbl;Fa.appendChild(pa);Da(Ea,wa.lblOnly,
+Oa)}}function H(){mxUtils.get(c,function(ia){if(!ra){ra=!0;ia=ia.getXml().documentElement.firstChild;for(var ja={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var pa=ia.getAttribute("name"),za=ia.getElementsByTagName("add"),Da=[],Fa=0;Fa<za.length;Fa++)Da.push(encodeURIComponent(mxUtils.getTextContent(za[Fa])));null!=pa&&0<Da.length&&(ja[pa]=Da.join(";"))}else if(Da=ia.getAttribute("url"),null!=Da){za=ia.getAttribute("section");pa=ia.getAttribute("subsection");
+if(null==za&&(Fa=Da.indexOf("/"),za=Da.substring(0,Fa),null==pa)){var Ea=Da.indexOf("/",Fa+1);-1<Ea&&(pa=Da.substring(Fa+1,Ea))}Fa=Aa[za];null==Fa&&(ca++,Fa=[],Aa[za]=Fa);Da=ia.getAttribute("clibs");null!=ja[Da]&&(Da=ja[Da]);Da={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:Da,tags:ia.getAttribute("tags")};Fa.push(Da);null!=pa&&(Fa=Ka[za],null==Fa&&(Fa={},Ka[za]=Fa),za=Fa[pa],null==za&&(za=[],
+Fa[pa]=za),za.push(Da))}ia=ia.nextSibling}v(Aa,ma,na)}})}function K(ia){u&&(ya.scrollTop=0,ha.innerText="",qa.spin(ha),W=!1,U=!0,ea.innerText=mxResources.get("recentDiag"),aa=null,u(la,function(){q(mxResources.get("cannotLoad"));la([])},ia?null:m))}function N(ia){if(""==ia)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ja={};for(Oa in Aa)for(var pa=Aa[Oa],za=0;za<pa.length;za++){var Da=pa[za];if(null!=Da.tags)for(var Fa=Da.tags.toLowerCase().split(";"),Ea=0;Ea<Fa.length;Ea++)null==
+ja[Fa[Ea]]&&(ja[Fa[Ea]]=[]),ja[Fa[Ea]].push(Da)}TemplatesDialog.tagsList[c]=ja}var wa=ia.toLowerCase().split(" ");ja=TemplatesDialog.tagsList[c];if(0<na&&null==ja.__tagsList__){for(Oa in ma)for(pa=ma[Oa],za=0;za<pa.length;za++)for(Da=pa[za],Fa=Da.title.split(" "),Fa.push(Oa),Ea=0;Ea<Fa.length;Ea++){var ta=Fa[Ea].toLowerCase();null==ja[ta]&&(ja[ta]=[]);ja[ta].push(Da)}ja.__tagsList__=!0}var Oa=[];pa={};for(za=Fa=0;za<wa.length;za++)if(0<wa[za].length){ta=ja[wa[za]];var Qa={};Oa=[];if(null!=ta)for(Ea=
+0;Ea<ta.length;Ea++)Da=ta[Ea],0==Fa==(null==pa[Da.url])&&(Qa[Da.url]=!0,Oa.push(Da));pa=Qa;Fa++}0==Oa.length?ea.innerText=mxResources.get("noResultsFor",[ia]):T(Oa,!0)}}function I(ia){if(aa!=ia||R!=ba)t(),ya.scrollTop=0,ha.innerText="",ea.innerText=mxResources.get("searchResults")+' "'+ia+'"',sa=null,da?N(ia):z&&(ia?(qa.spin(ha),W=!1,U=!0,z(ia,la,function(){q(mxResources.get("searchFailed"));la([])},R?null:m)):K(R)),aa=ia,ba=R}function M(ia){null!=sa&&clearTimeout(sa);13==ia.keyCode?I(Ca.value):sa=
+setTimeout(function(){I(Ca.value)},1E3)}var Q='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(z?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(n?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(k?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",Q=document.createElement("div");Q.innerHTML=U;Q.className=
-"geTemplateDlg";this.container=Q;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,t=null,D=null,L=null,T=null,O=!1,P=!0,R=!1,X=[],Z=null,Y,aa,ba=!1,ea=Q.querySelector(".geTempDlgShowAllBtn"),ja=Q.querySelector(".geTempDlgDiagramsTiles"),fa=Q.querySelector(".geTempDlgDiagramsListTitle"),ra=Q.querySelector(".geTempDlgDiagramsListBtns"),ma=Q.querySelector(".geTempDlgContent"),Ga=Q.querySelector(".geTempDlgDiagramsList"),Fa=Q.querySelector(".geTempDlgNewDiagramCat"),
-ya=Q.querySelector(".geTempDlgNewDiagramCatList"),Ma=Q.querySelector(".geTempDlgCreateBtn"),xa=Q.querySelector(".geTempDlgOpenBtn"),Ca=Q.querySelector(".geTempDlgSearchBox"),oa=Q.querySelector(".geTempDlgErrMsg"),Aa=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(Q.querySelector(".geTempDlgBack"),"click",function(){A();ba=!1;Q.querySelector(".geTemplatesList").style.display="none";ma.style.width=
-"100%";Fa.style.display="";Ga.style.minHeight="calc(100% - 280px)";Ca.style.display=x?"":"none";Ca.value="";Y=null;J(P)});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){C(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==Y?J(P):H(Y))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){C(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
-"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==Y?J(P):H(Y))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){C(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(R=!0,S(X,!1,R,Z))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){C(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(R=!1,S(X,!1,R,Z))});var La=!1;mxEvent.addListener(ea,
-"click",function(){O?(Fa.style.height="280px",ya.style.height="190px",ea.innerText=mxResources.get("showMore"),u(da)):(Fa.style.height="440px",ya.style.height="355px",ea.innerText=mxResources.get("showLess"),u(da,!0));O=!O});var ta=!1,Da=!1,wa={},Ja={},ka={},da=[],ca=1,na=0;null!=g?g(function(ha,ia){ka=ha;na=ia;F()},F):F();mxUtils.get(l,function(ha){if(!Da){Da=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==typeof ha.getAttribute&&null!=ha.getAttribute("title")&&da.push({img:ha.getAttribute("img"),
-libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;u(da)}});var la=function(ha,ia,pa){ra.style.display="";Aa.stop();V=!1;if(W)W=!1;else if(ia)ja.innerText=ia;else{pa=pa||{};ia=0;for(var va in pa)ia+=pa[va].length;0==ha.length&&0==ia?ja.innerText=mxResources.get("noDiagrams"):S(ha,!1,R,0==ia?null:pa)}};J(P);var qa=null;mxEvent.addListener(Ca,"keyup",N);mxEvent.addListener(Ca,"search",N);mxEvent.addListener(Ca,"input",N);mxEvent.addListener(Ma,
-"click",function(ha){M(!1,!1)});k&&mxEvent.addListener(xa,"click",function(ha){M(!1,!0)});n&&mxEvent.addListener(Q.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){M(!0)});mxEvent.addListener(Q.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var v="Unknown",x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),x.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
-(v=mxResources.get("dropbox"),x.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),x.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),x.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),x.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),x.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
-f=mxUtils.button(f,c);f.insertBefore(x,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(I){this.style.border="";13==I.keyCode&&B.click()}var v=document.createElement("table"),x=document.createElement("tbody");v.style.marginTop="8px";var E=document.createElement("tr");var d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
-"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(k);E.appendChild(d);
-x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(d);var n=document.createElement("input");"s"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(n);E.appendChild(d);x.appendChild(E);E=document.createElement("tr");
-d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");d.appendChild(q);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts",
-null,"Google Fonts"));d.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(k));E.appendChild(d);x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");
-E.appendChild(d);var p=document.createElement("input");"g"==c&&p.setAttribute("value",e);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(p);E.appendChild(d);x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var y=document.createElement("input");y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value",
-"webfonts");y.setAttribute("type","radio");y.setAttribute("name","current-fontdialog");y.setAttribute("id","fontdialog-webfonts");d.appendChild(y);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(k);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft=
-"15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(d);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):n.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(A);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";
-d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");E.appendChild(d);var C=document.createElement("input");C.setAttribute("value",f||"");C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(C);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);this.init=function(){var I=n;"g"==c?I=p:"w"==c&&Editor.enableWebFonts&&(I=A);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-I.select():document.execCommand("selectAll",!1,null)};E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);
-var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var I=n.value;var M="s"}else if(q.checked){I=p.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");M="g"}else y.checked&&(I=A.value,G=C.value,M="w");var S=G;var u=M,z=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(v.querySelector(".dlg_fontName_"+u).style.border="1px solid red",S=!1):"w"!=u||z.test(S)?S=!0:(v.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",S=!1);S&&(l(I,G,M),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(A,"keypress",m);mxEvent.addListener(C,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(A,"focus",function(){y.setAttribute("checked","checked");y.checked=
-!0});mxEvent.addListener(C,"focus",function(){y.setAttribute("checked","checked");y.checked=!0});d.appendChild(B);b.editor.cancelFirst||d.appendChild(e);E.appendChild(d);x.appendChild(E);v.appendChild(x);this.container=v};
-function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));e.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));e.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
-e.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||f.appendChild(m);v.setAttribute("disabled","disabled");this.okBtn=v;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,e,f,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var l=new Graph(b);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!1);l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var m=e.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=null!=c?c:"#ffffff";b.style.backgroundColor=m;c=new mxCodec(e.ownerDocument);b=l.getModel();c.decode(e,b);e=b.getChildCount(b.root);
-c=null==f;for(m=0;m<e;m++){var v=b.getChildAt(b.root,m);b.setVisible(v,c||f==v.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};
-AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],f);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var v=0;v<m.length;v++)this.createLayerItem(m[v],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
-AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
-(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var v=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(v=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var x=document.createElement("td");
-x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";mxUtils.write(x,mxResources.get("zoom")+":");l.appendChild(x);var E=document.createElement("input");E.setAttribute("value",100*m+"%");E.style.marginLeft="4px";E.style.width="180px";x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(E);l.appendChild(x);f.appendChild(l);l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";
-mxUtils.write(x,mxResources.get("borderWidth")+":");l.appendChild(x);var d=document.createElement("input");d.setAttribute("value",v);d.style.marginLeft="4px";d.style.width="180px";x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(d);l.appendChild(x);f.appendChild(l);this.init=function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(E.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(d.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";mxUtils.write(x,mxResources.get("compressed")+":");l.appendChild(x);var k=document.createElement("input");k.setAttribute("type","checkbox");
-g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(k);l.appendChild(x);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";
-x.style.width="120px";mxUtils.write(x,mxResources.get("realtimeCollaboration")+":");l.appendChild(x);var n=document.createElement("input");n.setAttribute("type","checkbox");var q=c.isRealtimeEnabled();if(q="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=q&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this,
-function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(n);x.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(x);f.appendChild(l)}this.init=null!=this.init?this.init:
-function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&x.appendChild(v);x.appendChild(m);b.editor.cancelFirst||x.appendChild(v);l.appendChild(x);f.appendChild(l);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(K,H){K=new mxCell("",new mxGeometry(K,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return k.addCell(K)}function v(K){K=k.getSelectionCells();k.deleteCells(K)}function x(){var K=parseInt(u.value)||0;K=0>K?0:100<K?100:K;
-u.value=K;var H=parseInt(F.value)||0;H=0>H?0:100<H?100:H;F.value=H;var N=parseInt(z.value)||0,U=parseInt(J.value)||0;K=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(K/100,H/100),!1,null,N,U));H=k.getSelectionCell();if(null!=H){N=H.geometry.clone();U=k.view.scale;var Q=k.view.translate;N.x=(K.x-3*U)/U-Q.x;N.y=(K.y-3*U)/U-Q.y;k.model.setGeometry(H,N)}}function E(K){var H=0,N=0,U=n.geometry,Q=mxUtils.format((K.geometry.x+3-U.x)/U.width);K=mxUtils.format((K.geometry.y+3-U.y)/U.height);
-0>Q?(H=Q*U.width,Q=0):1<Q&&(H=(Q-1)*U.width,Q=1);0>K?(N=K*U.height,K=0):1<K&&(N=(K-1)*U.height,K=1);return{x:Q,y:K,dx:parseInt(H),dy:parseInt(N)}}function d(){if(1==k.getSelectionCount()){var K=k.getSelectionCell();K=E(K);u.value=100*K.x;F.value=100*K.y;z.value=K.dx;J.value=K.dy;S.style.visibility=""}else S.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box";
-mxEvent.disableContextMenu(g);c.appendChild(g);var k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!0);k.setConnectable(!1);k.setTooltips(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;k.maxFitScale=2;g=e.geometry;var n=new mxCell(e.value,new mxGeometry(0,0,g.width,g.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");n.vertex=!0;k.addCell(n);k.dblClick=function(K,H){if(null!=H&&H!=n)k.setSelectionCell(H);else{H=
-mxUtils.convertPoint(k.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=k.view.scale;var N=k.view.translate;k.setSelectionCell(m((H.x-3*K)/K-N.x,(H.y-3*K)/K-N.y))}};l=new mxKeyHandler(k);l.bindKey(46,v);l.bindKey(8,v);k.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==n)};k.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var q=k.isCellSelectable;k.isCellSelectable=function(K){return K==n?!1:
-q.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var y=0;null!=g&&y<g.length;y++){var A=k.getConnectionPoint(p,g[y]);m(A.x-3,A.y-3)}k.fit(8);k.center();y=mxUtils.button("",function(){k.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(y,60);A=mxUtils.button("",function(){k.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var C=mxUtils.button("",function(){k.fit(8);k.center()});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.position=
-"relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,
-60);var I=mxUtils.button("",v);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);g=document.createElement("div");g.appendChild(y);g.appendChild(A);g.appendChild(B);g.appendChild(C);g.appendChild(I);c.appendChild(g);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min",
-"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";g.appendChild(M);var G=document.createElement("select");G.style.position="relative";G.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(y=0;y<A.length;y++)C=A[y],B=document.createElement("option"),mxUtils.write(B,mxResources.get(C)),B.value=C,G.appendChild(B);g.appendChild(G);y=mxUtils.button(mxResources.get("add"),function(){var K=
-parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var H=G.value,N=n.geometry,U=[],Q=0;Q<K;Q++){switch(H){case "left":var V=N.x;var W=N.y+(Q+1)*N.height/(K+1);break;case "right":V=N.x+N.width;W=N.y+(Q+1)*N.height/(K+1);break;case "top":V=N.x+(Q+1)*N.width/(K+1);W=N.y;break;case "bottom":V=N.x+(Q+1)*N.width/(K+1),W=N.y+N.height}U.push(m(V-3,W-3))}k.setSelectionCells(U)});y.style.position="relative";y.style.marginLeft="8px";y.style.top=mxClient.IS_FF?"0px":"-4px";g.appendChild(y);var S=document.createElement("div");
-S.style.margin="4px 0px 8px 0px";S.style.whiteSpace="nowrap";S.style.height="24px";g=document.createElement("span");mxUtils.write(g,mxResources.get("dx"));S.appendChild(g);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";S.appendChild(u);mxUtils.write(S,"%");var z=document.createElement("input");z.setAttribute("type","number");z.style.width="45px";z.style.margin="0 4px 0 4px";
-S.appendChild(z);mxUtils.write(S,"pt");g=document.createElement("span");mxUtils.write(g,mxResources.get("dy"));g.style.marginLeft="12px";S.appendChild(g);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";S.appendChild(F);mxUtils.write(S,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";S.appendChild(J);
-mxUtils.write(S,"pt");c.appendChild(S);d();k.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<k.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);d()});k.addListener(mxEvent.CELLS_MOVED,d);mxEvent.addListener(u,"change",x);mxEvent.addListener(F,"change",x);mxEvent.addListener(z,"change",x);mxEvent.addListener(J,"change",x);g=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});g.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){var K=
-k.model.cells,H=[],N=[],U;for(U in K){var Q=K[U];Q.cp&&N.push(E(Q))}N.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(K=0;K<N.length;K++)0<K&&N[K].x==N[K-1].x&&N[K].y==N[K-1].y&&N[K].dx==N[K-1].dx&&N[K].dy==N[K-1].dy||H.push("["+N[K].x+","+N[K].y+",0,"+N[K].dx+","+N[K].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});y.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[e]);f();b.hideDialog()});A.className="geBtn";C=document.createElement("div");C.style.marginTop="10px";C.style.textAlign="right";b.editor.cancelFirst?(C.appendChild(g),C.appendChild(A),C.appendChild(y)):(C.appendChild(A),C.appendChild(y),C.appendChild(g));c.appendChild(C)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
-{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
-graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
-edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
-fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
-edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+(f?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(J?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",P=document.createElement("div");P.innerHTML=Q;P.className=
+"geTemplateDlg";this.container=P;c=null!=c?c:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,W=!1,p=null,D=null,L=null,V=null,O=!1,R=!0,S=!1,X=[],Y=null,aa,ba,da=!1,Z=P.querySelector(".geTempDlgShowAllBtn"),ha=P.querySelector(".geTempDlgDiagramsTiles"),ea=P.querySelector(".geTempDlgDiagramsListTitle"),ua=P.querySelector(".geTempDlgDiagramsListBtns"),ya=P.querySelector(".geTempDlgContent"),xa=P.querySelector(".geTempDlgDiagramsList"),va=P.querySelector(".geTempDlgNewDiagramCat"),
+ka=P.querySelector(".geTempDlgNewDiagramCatList"),Na=P.querySelector(".geTempDlgCreateBtn"),Ia=P.querySelector(".geTempDlgOpenBtn"),Ca=P.querySelector(".geTempDlgSearchBox"),oa=P.querySelector(".geTempDlgErrMsg"),qa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(P.querySelector(".geTempDlgBack"),"click",function(){t();da=!1;P.querySelector(".geTemplatesList").style.display="none";ya.style.width=
+"100%";va.style.display="";xa.style.minHeight="calc(100% - 280px)";Ca.style.display=z?"":"none";Ca.value="";aa=null;K(R)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){x(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==aa?K(R):I(aa))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){x(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==aa?K(R):I(aa))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){x(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,T(X,!1,S,Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){x(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,T(X,!1,S,Y))});
+var Ja=!1;mxEvent.addListener(Z,"click",function(){O?(va.style.height="280px",ka.style.height="190px",Z.innerText=mxResources.get("showMore"),n(fa)):(va.style.height="440px",ka.style.height="355px",Z.innerText=mxResources.get("showLess"),n(fa,!0));O=!O});var ra=!1,Ba=!1,Aa={},Ka={},ma={},fa=[],ca=1,na=0;null!=B?B(function(ia,ja){ma=ia;na=ja;H()},H):H();mxUtils.get(k,function(ia){if(!Ba){Ba=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==typeof ia.getAttribute&&null!=ia.getAttribute("title")&&
+fa.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;n(fa)}});var la=function(ia,ja,pa){ua.style.display="";qa.stop();U=!1;if(W)W=!1;else if(ja)ha.innerText=ja;else{pa=pa||{};ja=0;for(var za in pa)ja+=pa[za].length;0==ia.length&&0==ja?ha.innerText=mxResources.get("noDiagrams"):T(ia,!1,S,0==ja?null:pa)}};K(R);var sa=null;mxEvent.addListener(Ca,"keyup",M);mxEvent.addListener(Ca,"search",M);mxEvent.addListener(Ca,
+"input",M);mxEvent.addListener(Na,"click",function(ia){G(!1,!1)});J&&mxEvent.addListener(Ia,"click",function(ia){G(!1,!0)});f&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){G(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=e&&e();l||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,d,e,c){var k=document.createElement("div");k.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var u="Unknown",z=document.createElement("img");z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.marginRight="10px";d==b.drive?(u=mxResources.get("googleDrive"),z.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?
+(u=mxResources.get("dropbox"),z.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==b.oneDrive?(u=mxResources.get("oneDrive"),z.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(u=mxResources.get("github"),z.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(u=mxResources.get("gitlab"),z.src=IMAGE_PATH+"/gitlab-logo.svg"):d==b.trello&&(u=mxResources.get("trello"),z.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[u],"You are now authorized in {1}"));
+e=mxUtils.button(e,c);e.insertBefore(z,e.firstChild);e.style.marginTop="6px";e.className="geBigButton";e.style.fontSize="18px";e.style.padding="14px";k.appendChild(m);k.appendChild(b);k.appendChild(e);this.container=k},FontDialog=function(b,d,e,c,k){function m(F){this.style.border="";13==F.keyCode&&E.click()}var u=document.createElement("table"),z=document.createElement("tbody");u.style.marginTop="8px";var C=document.createElement("tr");var A=document.createElement("td");A.colSpan=2;A.style.whiteSpace=
+"nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","sysfonts");B.setAttribute("type","radio");B.setAttribute("name","current-fontdialog");B.setAttribute("id","fontdialog-sysfonts");A.appendChild(B);var J=document.createElement("label");J.setAttribute("for","fontdialog-sysfonts");mxUtils.write(J,mxResources.get("sysFonts",null,"System Fonts"));A.appendChild(J);C.appendChild(A);
+z.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var f=document.createElement("input");"s"==c&&f.setAttribute("value",d);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";A=document.createElement("td");A.appendChild(f);C.appendChild(A);z.appendChild(C);C=document.createElement("tr");
+A=document.createElement("td");A.colSpan=2;A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");A.appendChild(g);J=document.createElement("label");J.setAttribute("for","fontdialog-googlefonts");mxUtils.write(J,mxResources.get("googleFonts",
+null,"Google Fonts"));A.appendChild(J);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(J=b.menus.createHelpLink("https://fonts.google.com/"),J.getElementsByTagName("img")[0].setAttribute("valign","middle"),A.appendChild(J));C.appendChild(A);z.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");
+C.appendChild(A);var l=document.createElement("input");"g"==c&&l.setAttribute("value",d);l.style.marginLeft="4px";l.style.width="250px";l.className="dlg_fontName_g";A=document.createElement("td");A.appendChild(l);C.appendChild(A);z.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.colSpan=2;A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.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");A.appendChild(q);J=document.createElement("label");J.setAttribute("for","fontdialog-webfonts");mxUtils.write(J,mxResources.get("webfonts",null,"Web Fonts"));A.appendChild(J);C.appendChild(A);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft=
+"15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var t=document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",d):f.setAttribute("value",d));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";A=document.createElement("td");A.appendChild(t);C.appendChild(A);Editor.enableWebFonts&&z.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";
+A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontUrl",null,"Font URL")+":");C.appendChild(A);var x=document.createElement("input");x.setAttribute("value",e||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";A=document.createElement("td");A.appendChild(x);C.appendChild(A);Editor.enableWebFonts&&z.appendChild(C);this.init=function(){var F=f;"g"==c?F=l:"w"==c&&Editor.enableWebFonts&&(F=t);F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+F.select():document.execCommand("selectAll",!1,null)};C=document.createElement("tr");A=document.createElement("td");A.colSpan=2;A.style.paddingTop="20px";A.style.whiteSpace="nowrap";A.setAttribute("align","right");b.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",A.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();k()});d.className="geBtn";b.editor.cancelFirst&&A.appendChild(d);
+var E=mxUtils.button(mxResources.get("apply"),function(){if(B.checked){var F=f.value;var G="s"}else if(g.checked){F=l.value;var y=Editor.GOOGLE_FONTS+encodeURIComponent(F).replace(/%20/g,"+");G="g"}else q.checked&&(F=t.value,y=x.value,G="w");var T=y;var n=G,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==F||0==F.length?(u.querySelector(".dlg_fontName_"+n).style.border="1px solid red",T=!1):"w"!=n||v.test(T)?T=!0:(u.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",T=!1);T&&(k(F,y,G),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",m);mxEvent.addListener(l,"keypress",m);mxEvent.addListener(t,"keypress",m);mxEvent.addListener(x,"keypress",m);mxEvent.addListener(f,"focus",function(){B.setAttribute("checked","checked");B.checked=!0});mxEvent.addListener(l,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=
+!0});mxEvent.addListener(x,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});A.appendChild(E);b.editor.cancelFirst||A.appendChild(d);C.appendChild(A);z.appendChild(C);u.appendChild(z);this.container=u};
+function AspectDialog(b,d,e,c,k){this.aspect={pageId:d||(b.pages?b.pages[0].getId():null),layerIds:e||[]};d=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));d.appendChild(m);e=document.createElement("div");e.className="geAspectDlgList";d.appendChild(e);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));d.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
+d.appendChild(m);this.pagesContainer=e;this.layersContainer=m;this.ui=b;e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k()});m.className="geBtn";b.editor.cancelFirst&&e.appendChild(m);var u=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));e.appendChild(u);u.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||e.appendChild(m);u.setAttribute("disabled","disabled");this.okBtn=u;d.appendChild(e);this.container=d}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var d=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(d.getId(),d.getName(),d.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,d,e,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var k=new Graph(b);k.setTooltips(!1);k.setEnabled(!1);k.setPanning(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;d="mxGraphModel"==d.nodeName?d:Editor.parseDiagramNode(d);if(null!=d){var m=d.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=null!=c?c:"#ffffff";b.style.backgroundColor=m;c=new mxCodec(d.ownerDocument);b=k.getModel();c.decode(d,b);d=b.getChildCount(b.root);
+c=null==e;for(m=0;m<d;m++){var u=b.getChildAt(b.root,m);b.setVisible(u,c||e==u.id)}k.maxFitScale=1;k.fit(0);k.center()}return k};
+AspectDialog.prototype.createPageItem=function(b,d,e){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(c);var k=this.createViewer(c.childNodes[0],e);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=k.model;m=m.getChildCells(m.getRoot());for(var u=0;u<m.length;u++)this.createLayerItem(m[u],b,k,e)});mxEvent.addListener(c,"click",d);this.aspect.pageId==b&&d()};
+AspectDialog.prototype.createLayerItem=function(b,d,e,c){d=e.convertValueToString(b)||mxResources.get("background")||"Background";var k=document.createElement("div");k.setAttribute("data-layer-id",b.id);k.className="geAspectDlgListItem";k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(k);this.createViewer(k.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=k.className.indexOf("geAspectDlgListItemSelected")?
+(k.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(k.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(k,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
+var FilePropertiesDialog=function(b){var d=document.createElement("table"),e=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";var c=b.getCurrentFile();var k=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(k)){m=1;var u=0;k=b.fileNode;null!=k&&(k.hasAttribute("scale")&&(m=parseFloat(k.getAttribute("scale"))),k.hasAttribute("border")&&(u=parseInt(k.getAttribute("border"))));k=document.createElement("tr");var z=document.createElement("td");
+z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtils.write(z,mxResources.get("zoom")+":");k.appendChild(z);var C=document.createElement("input");C.setAttribute("value",100*m+"%");C.style.marginLeft="4px";C.style.width="180px";z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(C);k.appendChild(z);e.appendChild(k);k=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";
+mxUtils.write(z,mxResources.get("borderWidth")+":");k.appendChild(z);var A=document.createElement("input");A.setAttribute("value",u);A.style.marginLeft="4px";A.style.width="180px";z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(A);k.appendChild(z);e.appendChild(k);this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(C.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(A.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(k)&&!/(\.svg)$/i.test(k)){var B=null!=c?c.isCompressed():Editor.compressXml;k=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";z.style.width="120px";mxUtils.write(z,mxResources.get("compressed")+":");k.appendChild(z);var J=document.createElement("input");J.setAttribute("type","checkbox");
+B&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(J);k.appendChild(z);e.appendChild(k);this.init=function(){J.focus()};m=function(){null!=b.fileNode&&B!=J.checked&&(b.fileNode.setAttribute("compressed",J.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){k=document.createElement("tr");z=document.createElement("td");z.style.whiteSpace="nowrap";z.style.fontSize="10pt";
+z.style.width="120px";mxUtils.write(z,mxResources.get("realtimeCollaboration")+":");k.appendChild(z);var f=document.createElement("input");f.setAttribute("type","checkbox");var g=c.isRealtimeEnabled();if(g="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))f.setAttribute("checked","checked"),f.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();f.checked!=g&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(f.checked,mxUtils.bind(this,
+function(l){b.spinner.stop()}),mxUtils.bind(this,function(l){b.spinner.stop();b.showError(mxResources.get("error"),null!=l&&null!=l.error?l.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){f.focus()};z=document.createElement("td");z.style.whiteSpace="nowrap";z.appendChild(f);z.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));k.appendChild(z);e.appendChild(k)}this.init=null!=this.init?this.init:
+function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";k=document.createElement("tr");z=document.createElement("td");z.colSpan=2;z.style.paddingTop="20px";z.style.whiteSpace="nowrap";z.setAttribute("align","center");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&z.appendChild(u);z.appendChild(m);b.editor.cancelFirst||z.appendChild(u);k.appendChild(z);e.appendChild(k);d.appendChild(e);this.container=
+d},ConnectionPointsDialog=function(b,d){function e(){null!=k&&k.destroy()}var c=document.createElement("div");c.style.userSelect="none";var k=null;this.init=function(){function m(N,I){N=new mxCell("",new mxGeometry(N,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");N.vertex=!0;N.cp=!0;return J.addCell(N)}function u(N){N=J.getSelectionCells();J.deleteCells(N)}function z(){var N=parseInt(n.value)||0;N=0>N?0:100<N?100:N;
+n.value=N;var I=parseInt(H.value)||0;I=0>I?0:100<I?100:I;H.value=I;var M=parseInt(v.value)||0,Q=parseInt(K.value)||0;N=J.getConnectionPoint(l,new mxConnectionConstraint(new mxPoint(N/100,I/100),!1,null,M,Q));I=J.getSelectionCell();if(null!=I){M=I.geometry.clone();Q=J.view.scale;var P=J.view.translate;M.x=(N.x-3*Q)/Q-P.x;M.y=(N.y-3*Q)/Q-P.y;J.model.setGeometry(I,M)}}function C(N){var I=0,M=0,Q=f.geometry,P=mxUtils.format((N.geometry.x+3-Q.x)/Q.width);N=mxUtils.format((N.geometry.y+3-Q.y)/Q.height);
+0>P?(I=P*Q.width,P=0):1<P&&(I=(P-1)*Q.width,P=1);0>N?(M=N*Q.height,N=0):1<N&&(M=(N-1)*Q.height,N=1);return{x:P,y:N,dx:parseInt(I),dy:parseInt(M)}}function A(){if(1==J.getSelectionCount()){var N=J.getSelectionCell();N=C(N);n.value=100*N.x;H.value=100*N.y;v.value=N.dx;K.value=N.dy;T.style.visibility=""}else T.style.visibility="hidden"}var B=document.createElement("div");B.style.width="350px";B.style.height="350px";B.style.overflow="hidden";B.style.border="1px solid lightGray";B.style.boxSizing="border-box";
+mxEvent.disableContextMenu(B);c.appendChild(B);var J=new Graph(B);J.autoExtend=!1;J.autoScroll=!1;J.setGridEnabled(!1);J.setEnabled(!0);J.setPanning(!0);J.setConnectable(!1);J.setTooltips(!1);J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;J.maxFitScale=2;B=d.geometry;var f=new mxCell(d.value,new mxGeometry(0,0,B.width,B.height),d.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");f.vertex=!0;J.addCell(f);J.dblClick=function(N,I){if(null!=I&&I!=f)J.setSelectionCell(I);else{I=
+mxUtils.convertPoint(J.container,mxEvent.getClientX(N),mxEvent.getClientY(N));mxEvent.consume(N);N=J.view.scale;var M=J.view.translate;J.setSelectionCell(m((I.x-3*N)/N-M.x,(I.y-3*N)/N-M.y))}};k=new mxKeyHandler(J);k.bindKey(46,u);k.bindKey(8,u);J.getRubberband().isForceRubberbandEvent=function(N){return 0==N.evt.button&&(null==N.getCell()||N.getCell()==f)};J.panningHandler.isForcePanningEvent=function(N){return 2==N.evt.button};var g=J.isCellSelectable;J.isCellSelectable=function(N){return N==f?!1:
+g.apply(this,arguments)};J.getLinkForCell=function(){return null};var l=J.view.getState(f);B=J.getAllConnectionConstraints(l);for(var q=0;null!=B&&q<B.length;q++){var t=J.getConnectionPoint(l,B[q]);m(t.x-3,t.y-3)}J.fit(8);J.center();q=mxUtils.button("",function(){J.zoomIn()});q.className="geSprite geSprite-zoomin";q.setAttribute("title",mxResources.get("zoomIn"));q.style.position="relative";q.style.outline="none";q.style.border="none";q.style.margin="2px";q.style.cursor="pointer";q.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(q,60);t=mxUtils.button("",function(){J.zoomOut()});t.className="geSprite geSprite-zoomout";t.setAttribute("title",mxResources.get("zoomOut"));t.style.position="relative";t.style.outline="none";t.style.border="none";t.style.margin="2px";t.style.cursor="pointer";t.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(t,60);var x=mxUtils.button("",function(){J.fit(8);J.center()});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.position=
+"relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,60);var E=mxUtils.button("",function(){J.zoomActual();J.center()});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,
+60);var F=mxUtils.button("",u);F.className="geSprite geSprite-delete";F.setAttribute("title",mxResources.get("delete"));F.style.position="relative";F.style.outline="none";F.style.border="none";F.style.margin="2px";F.style.float="right";F.style.cursor="pointer";mxUtils.setOpacity(F,10);B=document.createElement("div");B.appendChild(q);B.appendChild(t);B.appendChild(E);B.appendChild(x);B.appendChild(F);c.appendChild(B);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min",
+"1");G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.top=mxClient.IS_FF?"0px":"-4px";G.style.margin="0 4px 0 4px";B.appendChild(G);var y=document.createElement("select");y.style.position="relative";y.style.top=mxClient.IS_FF?"0px":"-4px";t=["left","right","top","bottom"];for(q=0;q<t.length;q++)x=t[q],E=document.createElement("option"),mxUtils.write(E,mxResources.get(x)),E.value=x,y.appendChild(E);B.appendChild(y);q=mxUtils.button(mxResources.get("add"),function(){var N=
+parseInt(G.value);N=1>N?1:100<N?100:N;G.value=N;for(var I=y.value,M=f.geometry,Q=[],P=0;P<N;P++){switch(I){case "left":var U=M.x;var W=M.y+(P+1)*M.height/(N+1);break;case "right":U=M.x+M.width;W=M.y+(P+1)*M.height/(N+1);break;case "top":U=M.x+(P+1)*M.width/(N+1);W=M.y;break;case "bottom":U=M.x+(P+1)*M.width/(N+1),W=M.y+M.height}Q.push(m(U-3,W-3))}J.setSelectionCells(Q)});q.style.position="relative";q.style.marginLeft="8px";q.style.top=mxClient.IS_FF?"0px":"-4px";B.appendChild(q);var T=document.createElement("div");
+T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";B=document.createElement("span");mxUtils.write(B,mxResources.get("dx"));T.appendChild(B);var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";T.appendChild(n);mxUtils.write(T,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";
+T.appendChild(v);mxUtils.write(T,"pt");B=document.createElement("span");mxUtils.write(B,mxResources.get("dy"));B.style.marginLeft="12px";T.appendChild(B);var H=document.createElement("input");H.setAttribute("type","number");H.setAttribute("min","0");H.setAttribute("max","100");H.style.width="45px";H.style.margin="0 4px 0 4px";T.appendChild(H);mxUtils.write(T,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px";T.appendChild(K);
+mxUtils.write(T,"pt");c.appendChild(T);A();J.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<J.getSelectionCount()?mxUtils.setOpacity(F,60):mxUtils.setOpacity(F,10);A()});J.addListener(mxEvent.CELLS_MOVED,A);mxEvent.addListener(n,"change",z);mxEvent.addListener(H,"change",z);mxEvent.addListener(v,"change",z);mxEvent.addListener(K,"change",z);B=mxUtils.button(mxResources.get("cancel"),function(){e();b.hideDialog()});B.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){var N=
+J.model.cells,I=[],M=[],Q;for(Q in N){var P=N[Q];P.cp&&M.push(C(P))}M.sort(function(U,W){return U.x!=W.x?U.x-W.x:U.y!=W.y?U.y-W.y:U.dx!=W.dx?U.dx-W.dx:U.dy-W.dy});for(N=0;N<M.length;N++)0<N&&M[N].x==M[N-1].x&&M[N].y==M[N-1].y&&M[N].dx==M[N-1].dx&&M[N].dy==M[N-1].dy||I.push("["+M[N].x+","+M[N].y+",0,"+M[N].dx+","+M[N].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[d]);e();b.hideDialog()});q.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[d]);e();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(B),x.appendChild(t),x.appendChild(q)):(x.appendChild(t),x.appendChild(q),x.appendChild(B));c.appendChild(x)};this.destroy=e;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
+fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
+{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
+gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
+gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
+{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -11187,109 +11187,109 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,D){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,
-D){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==
-mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(p){p.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(p,D){return"1"!=mxUtils.getValue(p.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(p,
+D){return"1"==mxUtils.getValue(p.style,"comic","0")||"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(p,D){return"1"==
+mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")&&0<p.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(p,D){return"1"==mxUtils.getValue(p.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(p){return"orthogonalEdgeStyle"==mxUtils.getValue(p.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&
-0==t.edges.length&&D.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},
-isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast","0")},isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(p,D){D=D.editorUi.editor.graph;return 1==p.vertices.length&&
+0==p.edges.length&&D.isTableCell(p.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(p,D){D=D.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&D.isTableCell(p.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(p,D){p=D.editorUi.editor.graph.getCellStyle(1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null);return"1"==mxUtils.getValue(p,"resizeLastRow","0")},
+isVisible:function(p,D){D=D.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&D.isTable(p.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(p,D){p=D.editorUi.editor.graph.getCellStyle(1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null);return"1"==mxUtils.getValue(p,"resizeLast","0")},isVisible:function(p,D){D=D.editorUi.editor.graph;return 1==p.vertices.length&&0==p.edges.length&&D.isTable(p.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,D){return D.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,D){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(p,D){return D.editorUi.editor.graph.isCellConnectable(0<p.vertices.length&&0==p.edges.length?p.vertices[0]:null)},isVisible:function(p,D){return 0<p.vertices.length&&0==p.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,D){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=t&&(D.isSwimlane(t)||0<D.model.getChildCount(t))},
-isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,D){var L=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=t.style.collapsible||!D.isContainer(L)&&"1"==t.style.collapsible)},isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length&&!D.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(t,D){D=D.editorUi.editor.graph.model;return 0<t.vertices.length?D.isVertex(D.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,D){t=0<t.vertices.length?D.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(p,D){return 1==p.vertices.length&&0==p.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(p,D){p=1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null;D=D.editorUi.editor.graph;return null!=p&&(D.isSwimlane(p)||0<D.model.getChildCount(p))},
+isVisible:function(p,D){return 1==p.vertices.length&&0==p.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(p,D){var L=1==p.vertices.length&&0==p.edges.length?p.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=p.style.collapsible||!D.isContainer(L)&&"1"==p.style.collapsible)},isVisible:function(p,D){return 1==p.vertices.length&&0==p.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(p,D){return 1==p.vertices.length&&0==p.edges.length&&!D.editorUi.editor.graph.isSwimlane(p.vertices[0])&&null==mxUtils.getValue(p.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(p,D){D=D.editorUi.editor.graph.model;return 0<p.vertices.length?D.isVertex(D.getParent(p.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(p,D){p=0<p.vertices.length?D.editorUi.editor.graph.getCellGeometry(p.vertices[0]):null;return null!=p&&!p.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,D){var L=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,D){return 0<t.vertices.length&&
-D.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(t){var D=rough.canvas({getContext:function(){return t}});D.draw=function(L){var T=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var P=T[O];switch(P.type){case "path":null!=L.stroke&&this._drawToContext(t,P,L);break;case "fillPath":this._drawToContext(t,P,L);break;case "fillSketch":this.fillSketch(t,P,L)}}};D.fillSketch=function(L,T,O){var P=t.state.strokeColor,R=t.state.strokeWidth,X=t.state.strokeAlpha,Z=t.state.dashed,Y=O.fillWeight;
-0>Y&&(Y=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(Y);t.setDashed(!1);this._drawToContext(L,T,O);t.setDashed(Z);t.setStrokeWidth(R);t.setStrokeColor(P);t.setStrokeAlpha(X)};D._drawToContext=function(L,T,O){L.begin();for(var P=0;P<T.ops.length;P++){var R=T.ops[P],X=R.data;switch(R.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===T.type&&
-O.filled?L.fill():L.stroke()};return D};(function(){function t(P,R,X){this.canvas=P;this.rc=R;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(P,R){var X=1;if(null!=this.shape.state){var Z=this.shape.state.cell.id;if(null!=Z)for(var Y=0;Y<Z.length;Y++)X=(X<<5)-X+Z.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};Z=this.rc.getDefaultOptions();X.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
-mxConstants.NONE;P=null;(X.filled=R)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",Z.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Z.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Z.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",
-Z.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",Z.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Z.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Z.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==R?-1:R;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-R);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=X.fill&&(null!=P||null!=R&&X.fill==R)?"solid":Z.fillStyle);X.fillStyle=R;return X};t.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(P,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-P,R),this.lastX=P,this.lastY=R)};t.prototype.moveTo=function(P,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,R),this.lastX=P,this.lastY=R,this.firstX=P,this.firstY=R)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(P,R,X,Z){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,R,X,Z),this.lastX=X,this.lastY=Z)};
-t.prototype.curveTo=function(P,R,X,Z,Y,aa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,R,X,Z,Y,aa),this.lastX=Y,this.lastY=aa)};t.prototype.arcTo=function(P,R,X,Z,Y,aa,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,P,R,X,Z,Y,aa,ba);if(null!=ea)for(var ja=0;ja<ea.length;ja+=6)this.curveTo(ea[ja],ea[ja+1],ea[ja+2],ea[ja+3],ea[ja+4],ea[ja+5]);this.lastX=aa;this.lastY=ba}};
-t.prototype.rect=function(P,R,X,Z){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,R,X,Z,this.getStyle(!0,!0)))};t.prototype.ellipse=function(P,R,X,Z){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+X/2,R+Z/2,X,Z,this.getStyle(!0,!0)))};t.prototype.roundrect=function(P,R,X,Z,Y,aa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):
-(this.begin(),this.moveTo(P+Y,R),this.lineTo(P+X-Y,R),this.quadTo(P+X,R,P+X,R+aa),this.lineTo(P+X,R+Z-aa),this.quadTo(P+X,R+Z,P+X-Y,R+Z),this.lineTo(P+Y,R+Z),this.quadTo(P,R+Z,P,R+Z-aa),this.lineTo(P,R+aa),this.quadTo(P,R,P+Y,R))};t.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in P)this.nextShape.options[R]=P[R];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;
-P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
-!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
-this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new t(P,Editor.createRoughCanvas(P),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(P):
-this.createRoughCanvas(P)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,R,X,Z,Y){null!=P.handJiggle&&P.handJiggle.passThrough||L.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var R=P.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==t&&!this.outline){P.save();var Z=this.fill,Y=this.stroke;this.stroke=
-this.fill=null;var aa=this.configurePointerEvents,ba=P.setStrokeColor;P.setStrokeColor=function(){};var ea=P.setFillColor;P.setFillColor=function(){};X||null==Z||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;T.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ea;P.setStrokeColor=ba;this.configurePointerEvents=aa;this.stroke=Y;this.fill=Z;P.restore();X&&null!=Z&&(P.addTolerance=function(){})}T.apply(this,arguments);P.addTolerance=R};var O=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(P,R,X,Z,Y,aa){null!=P.handJiggle&&P.handJiggle.constructor==t?(P.handJiggle.passThrough=!0,O.apply(this,arguments),P.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};
-Editor.extractGraphModel=function(t,D,L){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var P=0;P<T.length;P++)if("mxgraph"==T[P].getAttribute("class")){O.push(T[P]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,L),0<
-T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||D||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&
-(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,L)));null==t||"mxGraphModel"==t.nodeName||D&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,D){var L=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<L.length?(t=Graph.decompress(L,null,D),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));
-return T};Editor.getDiagramNodeXml=function(t){var D=mxUtils.getTextContent(t),L=null;0<D.length?L=Graph.decompress(D):null!=t.firstChild&&(L=mxUtils.getXml(t.firstChild));return L};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var D=t.indexOf("EmbeddedFile");if(-1<D){var L=t.indexOf("stream",D)+9;if(0<t.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D=t.indexOf("endstream",
-L-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var T=0,O=0,P=[],R=null;O<t.length;){var X=t.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var Z=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Z>O){L=t.substring(O,Z);break}}10==X&&("endobj"==D?R=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(R=[],P[D.split(" ")[0]]=R):null!=R&&R.push(D),D="")}null==L&&(L=
-Editor.extractGraphModelFromXref(P));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(t){var D=t.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=t[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(t=t[D[1]],null!=t&&(t=t.join("\n"),L=t.substring(1,t.length-1))))));return L};Editor.extractParserError=function(t,D){var L=null;t=null!=
-t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(L=D||mxResources.get("invalidChars"),D=t[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(t,D){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=D))};Editor.configure=function(t){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(t.css));var L=document.getElementsByTagName("script")[0];L.parentNode.insertBefore(D,L)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
-null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(D=parseFloat(t.zoomFactor),!isNaN(D)&&1<D?Graph.prototype.zoomFactor=D:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(D=parseInt(t.gridSteps),!isNaN(D)&&0<D?mxGraphView.prototype.gridSteps=D:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=t.pageFormat&&(D=parseInt(t.pageFormat.width),L=parseInt(t.pageFormat.height),!isNaN(D)&&0<D&&!isNaN(L)&&0<L?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,D,L),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(D=parseInt(t.sidebarTitleSize),!isNaN(D)&&0<D?Sidebar.prototype.sidebarTitleSize=D:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=t.autosaveDelay&&(D=parseInt(t.autosaveDelay),!isNaN(D)&&0<D?DrawioFile.prototype.autosaveDelay=D:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};
-Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(t));D.parentNode.insertBefore(L,D);t=t.split("url(");for(L=1;L<t.length;L++){var T=t[L].indexOf(")");T=Editor.trimCssUrl(t[L].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);
-O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=t?t:Editor.GUID_LENGTH;for(var D=[],L=0;L<t;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var D=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[t],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==t.nodeName){D=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(T=new mxCodec(L.ownerDocument),T.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=L){var T=new mxCodec(L.ownerDocument);T.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");D=t.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(D=t.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,D){t=null!=t?t:!0;var L=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=T&&L.setAttribute("backgroundImage",JSON.stringify(T));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
-0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",T.join("|")));return L};Editor.prototype.isDataSvg=function(t){try{var D=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L=mxUtils.parseXml(D).documentElement;return"mxfile"==
-L.nodeName||"mxGraphModel"==L.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,D,L){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;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=
-Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
-Editor.onMathJaxDone()}catch(P){MathJax.typesetClear([O]),null!=P.retry?P.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+P.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
-Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(P,R){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",t);D[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(t){if(0<t.length){var D="",L=[""],T=0,O=!0,P;t=$jscomp.makeIterator(t);for(P=t.next();!P.done;P=t.next())P=P.value,'"'===P?(O&&P===D&&(L[T]+=P),O=!O):","===P&&O?P=L[++T]="":L[T]+=P,D=P;return L}return[]};Editor.prototype.getProxiedUrl=
-function(t){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(t)){var D=/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t);D=/\.png$/i.test(t)||/\.pdf$/i.test(t)||D;var L="t="+(new Date).getTime();t=PROXY_URL+"?url="+encodeURIComponent(t)+"&"+L+(D?"&base64=1":"")}return t};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==
-window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var D=t.convert,L=this;t.convert=function(T){if(null!=
-T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,t.baseUrl.length)==t.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=
-function(t,D){try{var L=!0,T=window.setTimeout(mxUtils.bind(this,function(){L=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(P){window.clearTimeout(T);L&&D(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(T);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(L)try{var P=document.createElement("canvas"),R=P.getContext("2d");
-P.height=O.height;P.width=O.width;R.drawImage(O,0,0);D(P.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);L&&D(Editor.svgBrokenImage.src)};O.src=t}}catch(P){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,D,L,T){null==T&&(T=this.createImageUrlConverter());var O=0,P=L||{};L=mxUtils.bind(this,function(R,X){R=t.getElementsByTagName(R);for(var Z=0;Z<R.length;Z++)mxUtils.bind(this,function(Y){try{if(null!=Y){var aa=T.convert(Y.getAttribute(X));
-if(null!=aa&&"data:"!=aa.substring(0,5)){var ba=P[aa];null==ba?(O++,this.convertImageToDataUri(aa,function(ea){null!=ea&&(P[aa]=ea,Y.setAttribute(X,ea));O--;0==O&&D(t)})):Y.setAttribute(X,ba)}else null!=aa&&Y.setAttribute(X,aa)}}catch(ea){}})(R[Z])});L("image","xlink:href");L("img","src");0==O&&D(t)};Editor.base64Encode=function(t){for(var D="",L=0,T=t.length,O,P,R;L<T;){O=t.charCodeAt(L++)&255;if(L==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);D+="==";break}P=t.charCodeAt(L++);if(L==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);D+="=";break}R=t.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(R&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return D};Editor.prototype.loadUrl=function(t,D,L,T,O,P,R,X){try{var Z=!R&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&
-299>=aa.getStatus()){if(null!=D){var ba=aa.getText();if(Z){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();ba=Array(aa.length);for(var ea=0;ea<aa.length;ea++)ba[ea]=String.fromCharCode(aa[ea]);ba=ba.join("")}P=null!=P?P:"data:image/png;base64,";ba=P+Editor.base64Encode(ba)}D(ba)}}else null!=L&&(0==aa.getStatus()?L({message:mxResources.get("accessDenied")},aa):404==aa.getStatus()?
-L({code:aa.getStatus()},aa):L({message:mxResources.get("error")+" "+aa.getStatus()},aa))}),function(aa){null!=L&&L({message:mxResources.get("error")+" "+aa.getStatus()})},Z,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(aa){null!=L&&L(aa)}};Editor.prototype.absoluteCssFonts=function(t){var D=null;if(null!=t){var L=t.split("url(");if(0<L.length){D=[L[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");
-var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var P=1;P<L.length;P++)if(T=L[P].indexOf(")"),0<T){var R=Editor.trimCssUrl(L[P].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=O?O+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":t)+R);D.push('url("'+R+'"'+L[P].substring(T))}else D.push(L[P])}else D=[t]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(t,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+
-encodeURIComponent(D));L(t,D)};Editor.prototype.embedCssFonts=function(t,D){var L=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var Z=[L[0]],Y=1;Y<L.length;Y++){var aa=L[Y].indexOf(")");Z.push('url("');Z.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,aa))]);Z.push('"'+L[Y].substring(aa))}D(Z.join(""))}});if(0<L.length){for(t=1;t<L.length;t++){var P=L[t].indexOf(")"),R=null,X=L[t].indexOf("format(",P);0<X&&(R=Editor.trimCssUrl(L[t].substring(X+
-7,L[t].indexOf(")",X))));mxUtils.bind(this,function(Z){if(null==this.cachedFonts[Z]){this.cachedFonts[Z]=Z;T++;var Y="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(Z))Y="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(Z))Y="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(Z))Y="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(Z))Y="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(Z))Y="application/vnd.ms-fontobject";
-else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(Z))Y="application/font-sfnt";this.mapFontUrl(Y,Z,mxUtils.bind(this,function(aa,ba){this.loadUrl(ba,mxUtils.bind(this,function(ea){this.cachedFonts[Z]=ea;T--;O()}),mxUtils.bind(this,function(ea){T--;O()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[t].substring(0,P)),R)}O()}else D(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=
-D;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(t[D]=Graph.fontMapping[D]);return t};Editor.prototype.embedExtFonts=function(t){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(L.join(""),t)}),P=0;P<D.length;P++)mxUtils.bind(this,function(R,X){Graph.isCssFontUrl(X)?
-null==this.cachedGoogleFonts[X]?(T++,this.loadUrl(X,mxUtils.bind(this,function(Z){this.cachedGoogleFonts[X]=Z;L.push(Z+"\n");T--;O()}),mxUtils.bind(this,function(Z){T--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+R+'";src: url("'+X+'")}\n')})(D[P].name,D[P].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var D=document.getElementsByTagName("style"),L=0;L<D.length;L++){var T=
-mxUtils.getTextContent(D[L]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=t.getElementsByTagName("defs"),T=t.ownerDocument;0==L.length?(L=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(L,t.firstChild):t.appendChild(L)):L=L[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,
-"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,D);L.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,D,L){var T=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(T/t,T/D))};Editor.prototype.exportToCanvas=function(t,D,L,T,O,P,R,X,Z,Y,aa,ba,ea,ja,fa,ra,ma,Ga){try{P=null!=P?P:!0;R=null!=R?R:!0;ba=null!=ba?ba:this.graph;ea=null!=ea?ea:0;var Fa=
-Z?null:ba.background;Fa==mxConstants.NONE&&(Fa=null);null==Fa&&(Fa=T);null==Fa&&0==Z&&(Fa=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ea,ja,null,R,null,null,null,Y,null,ra,ma,Ga),mxUtils.bind(this,function(ya){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Ca=function(){mxClient.IS_SF?window.setTimeout(function(){ta.drawImage(Ma,0,0);t(oa,ya)},0):(ta.drawImage(Ma,0,0),t(oa,ya))},oa=document.createElement("canvas"),Aa=parseInt(ya.getAttribute("width")),
-La=parseInt(ya.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=P?Math.min(1,Math.min(3*D/(4*La),D/Aa)):D/Aa);X=this.getMaxCanvasScale(Aa,La,X);Aa=Math.ceil(X*Aa);La=Math.ceil(X*La);oa.setAttribute("width",Aa);oa.setAttribute("height",La);var ta=oa.getContext("2d");null!=Fa&&(ta.beginPath(),ta.rect(0,0,Aa,La),ta.fillStyle=Fa,ta.fill());1!=X&&ta.scale(X,X);if(fa){var Da=ba.view,wa=Da.scale;Da.scale=1;var Ja=btoa(unescape(encodeURIComponent(Da.createSvgGrid(Da.gridColor))));Da.scale=wa;Ja="data:image/svg+xml;base64,"+
-Ja;var ka=ba.gridSize*Da.gridSteps*X,da=ba.getGraphBounds(),ca=Da.translate.x*wa,na=Da.translate.y*wa,la=ca+(da.x-ca)/wa-ea,qa=na+(da.y-na)/wa-ea,ha=new Image;ha.onload=function(){try{for(var ia=-Math.round(ka-mxUtils.mod((ca-la)*X,ka)),pa=-Math.round(ka-mxUtils.mod((na-qa)*X,ka));ia<Aa;ia+=ka)for(var va=pa;va<La;va+=ka)ta.drawImage(ha,ia/X,va/X);Ca()}catch(za){null!=O&&O(za)}};ha.onerror=function(ia){null!=O&&O(ia)};ha.src=Ja}else Ca()}catch(ia){null!=O&&O(ia)}});Ma.onerror=function(Ca){null!=O&&
-O(Ca)};Y&&this.graph.addSvgShadow(ya);this.graph.mathEnabled&&this.addMathCss(ya);var xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ya,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(ya))}catch(Ca){null!=O&&O(Ca)}});this.embedExtFonts(mxUtils.bind(this,function(Ca){try{null!=Ca&&this.addFontCss(ya,Ca),this.loadFonts(xa)}catch(oa){null!=O&&O(oa)}}))}catch(Ca){null!=O&&O(Ca)}}),L,aa)}catch(ya){null!=O&&O(ya)}};Editor.crcTable=[];for(var l=0;256>
-l;l++)for(var m=l,v=0;8>v;v++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(t,D,L,T){for(var O=0;O<T;O++)t=Editor.crcTable[(t^D.charCodeAt(L+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var D=-1,L=0;L<t.length;L++)D=D>>>8^Editor.crcTable[(D^t.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(t,D,L,T,O){function P(aa,ba){var ea=Z;Z+=ba;return aa.substring(ea,Z)}function R(aa){aa=P(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<
-8)+(aa.charCodeAt(1)<<16)+(aa.charCodeAt(0)<<24)}function X(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>8&255,aa&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var Z=0;if(P(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(P(t,4),"IHDR"!=P(t,4))null!=O&&O();else{P(t,17);O=t.substring(0,Z);do{var Y=R(t);if("IDAT"==P(t,4)){O=t.substring(0,Z-8);"pHYs"==D&&"dpi"==L?(L=Math.round(T/.0254),L=X(L)+X(L)+String.fromCharCode(1)):
-L=L+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);T=Editor.updateCRC(T,L,0,L.length);O+=X(L.length)+D+L+X(T^4294967295);O+=t.substring(Z-8,t.length);break}O+=t.substring(Z-8,Z-4+Y);P(t,Y);P(t,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var x=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(t,D){x.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(t,D){var L=null;null!=t.editor.graph.getModel().getParent(D)?L=D.getId():null!=t.currentPage&&(L=t.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var d=
-Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(t){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var P=new ChangePageSetup(D);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=O;L.model.execute(P)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
-D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=n.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(R){D.editor.setAutosave(R);D.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return L.mathEnabled},function(R){D.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=function(){R(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var P=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";O.appendChild(P)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(p,D){var L=mxUtils.getValue(p.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(p.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(p.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(p.style,mxConstants.STYLE_OPACITY,100)||null!=p.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(p,D){return 0<p.vertices.length&&
+D.editorUi.editor.graph.isContainer(p.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(p){var D=rough.canvas({getContext:function(){return p}});D.draw=function(L){var V=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<V.length;O++){var R=V[O];switch(R.type){case "path":null!=L.stroke&&this._drawToContext(p,R,L);break;case "fillPath":this._drawToContext(p,R,L);break;case "fillSketch":this.fillSketch(p,R,L)}}};D.fillSketch=function(L,V,O){var R=p.state.strokeColor,S=p.state.strokeWidth,X=p.state.strokeAlpha,Y=p.state.dashed,aa=O.fillWeight;
+0>aa&&(aa=O.strokeWidth/2);p.setStrokeAlpha(p.state.fillAlpha);p.setStrokeColor(O.fill||"");p.setStrokeWidth(aa);p.setDashed(!1);this._drawToContext(L,V,O);p.setDashed(Y);p.setStrokeWidth(S);p.setStrokeColor(R);p.setStrokeAlpha(X)};D._drawToContext=function(L,V,O){L.begin();for(var R=0;R<V.ops.length;R++){var S=V.ops[R],X=S.data;switch(S.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===
+V.type&&O.filled?L.fill():L.stroke()};return D};(function(){function p(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,p.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,p.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,p.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,p.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,p.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,p.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,p.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,p.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+p.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,p.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,p.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,p.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,p.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,p.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}p.prototype.moveOp="M";p.prototype.lineOp="L";p.prototype.quadOp="Q";p.prototype.curveOp="C";p.prototype.closeOp="Z";p.prototype.getStyle=function(R,S){var X=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var aa=0;aa<Y.length;aa++)X=(X<<5)-X+Y.charCodeAt(aa)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};Y=this.rc.getDefaultOptions();X.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;R=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+Y.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
+S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=R||null!=S&&X.fill==S)?"solid":Y.fillStyle);X.fillStyle=S;return X};p.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};p.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};p.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};p.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+R,S),this.lastX=R,this.lastY=S)};p.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};p.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};p.prototype.quadTo=function(R,S,X,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,S,X,Y),this.lastX=X,this.lastY=Y)};
+p.prototype.curveTo=function(R,S,X,Y,aa,ba){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,Y,aa,ba),this.lastX=aa,this.lastY=ba)};p.prototype.arcTo=function(R,S,X,Y,aa,ba,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,Y,aa,ba,da);if(null!=Z)for(var ha=0;ha<Z.length;ha+=6)this.curveTo(Z[ha],Z[ha+1],Z[ha+2],Z[ha+3],Z[ha+4],Z[ha+5]);this.lastX=ba;this.lastY=da}};p.prototype.rect=
+function(R,S,X,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,Y,this.getStyle(!0,!0)))};p.prototype.ellipse=function(R,S,X,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+Y/2,X,Y,this.getStyle(!0,!0)))};p.prototype.roundrect=function(R,S,X,Y,aa,ba){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(R+
+aa,S),this.lineTo(R+X-aa,S),this.quadTo(R+X,S,R+X,S+ba),this.lineTo(R+X,S+Y-ba),this.quadTo(R+X,S+Y,R+X-aa,S+Y),this.lineTo(R+aa,S+Y),this.quadTo(R,S+Y,R,S+Y-ba),this.lineTo(R,S+ba),this.quadTo(R,S,R+aa,S))};p.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];R.stroke!=mxConstants.NONE&&null!=R.stroke||delete this.nextShape.options.stroke;
+R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};p.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};p.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};p.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};p.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new p(R,Editor.createRoughCanvas(R),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(R):
+this.createRoughCanvas(R)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,Y,aa){null!=R.handJiggle&&R.handJiggle.passThrough||L.apply(this,arguments)};var V=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==p&&!this.outline){R.save();var Y=this.fill,aa=this.stroke;this.stroke=
+this.fill=null;var ba=this.configurePointerEvents,da=R.setStrokeColor;R.setStrokeColor=function(){};var Z=R.setFillColor;R.setFillColor=function(){};X||null==Y||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;V.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=Z;R.setStrokeColor=da;this.configurePointerEvents=ba;this.stroke=aa;this.fill=Y;R.restore();X&&null!=Y&&(R.addTolerance=function(){})}V.apply(this,arguments);R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(R,S,X,Y,aa,ba){null!=R.handJiggle&&R.handJiggle.constructor==p?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(p){return null==p||0==p.length||"undefined"===typeof pako?p:Graph.arrayBufferToString(pako.deflateRaw(p))};Editor.fastDecompress=function(p){return null==p||0==p.length||"undefined"===typeof pako?p:pako.inflateRaw(Graph.stringToArrayBuffer(atob(p)),{to:"string"})};
+Editor.extractGraphModel=function(p,D,L){if(null!=p&&"undefined"!==typeof pako){var V=p.ownerDocument.getElementsByTagName("div"),O=[];if(null!=V&&0<V.length)for(var R=0;R<V.length;R++)if("mxgraph"==V[R].getAttribute("class")){O.push(V[R]);break}0<O.length&&(V=O[0].getAttribute("data-mxgraph"),null!=V?(O=JSON.parse(V),null!=O&&null!=O.xml&&(p=mxUtils.parseXml(O.xml),p=p.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(V=mxUtils.getTextContent(O[0]),V=Graph.decompress(V,null,L),0<
+V.length&&(p=mxUtils.parseXml(V),p=p.documentElement))))}if(null!=p&&"svg"==p.nodeName)if(V=p.getAttribute("content"),null!=V&&"<"!=V.charAt(0)&&"%"!=V.charAt(0)&&(V=unescape(window.atob?atob(V):Base64.decode(cont,V))),null!=V&&"%"==V.charAt(0)&&(V=decodeURIComponent(V)),null!=V&&0<V.length)p=mxUtils.parseXml(V).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==p||D||(O=null,"diagram"==p.nodeName?O=p:"mxfile"==p.nodeName&&(V=p.getElementsByTagName("diagram"),0<V.length&&
+(O=V[Math.max(0,Math.min(V.length-1,urlParams.page||0))])),null!=O&&(p=Editor.parseDiagramNode(O,L)));null==p||"mxGraphModel"==p.nodeName||D&&"mxfile"==p.nodeName||(p=null);return p};Editor.parseDiagramNode=function(p,D){var L=mxUtils.trim(mxUtils.getTextContent(p)),V=null;0<L.length?(p=Graph.decompress(L,null,D),null!=p&&0<p.length&&(V=mxUtils.parseXml(p).documentElement)):(p=mxUtils.getChildNodes(p),0<p.length&&(V=mxUtils.createXmlDocument(),V.appendChild(V.importNode(p[0],!0)),V=V.documentElement));
+return V};Editor.getDiagramNodeXml=function(p){var D=mxUtils.getTextContent(p),L=null;0<D.length?L=Graph.decompress(D):null!=p.firstChild&&(L=mxUtils.getXml(p.firstChild));return L};Editor.extractGraphModelFromPdf=function(p){p=p.substring(p.indexOf(",")+1);p=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p,!0);if("%PDF-1.7"==p.substring(0,8)){var D=p.indexOf("EmbeddedFile");if(-1<D){var L=p.indexOf("stream",D)+9;if(0<p.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D=p.indexOf("endstream",
+L-1),pako.inflateRaw(Graph.stringToArrayBuffer(p.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var V=0,O=0,R=[],S=null;O<p.length;){var X=p.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(V)?V++:V=0;if(19==V){var Y=p.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Y>O){L=p.substring(O,Y);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],R[D.split(" ")[0]]=S):null!=S&&S.push(D),D="")}null==L&&(L=
+Editor.extractGraphModelFromXref(R));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(p){var D=p.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=p[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(p=p[D[1]],null!=p&&(p=p.join("\n"),L=p.substring(1,p.length-1))))));return L};Editor.extractParserError=function(p,D){var L=null;p=null!=
+p?p.getElementsByTagName("parsererror"):null;null!=p&&0<p.length&&(L=D||mxResources.get("invalidChars"),D=p[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(p,D){null!=p&&(p=null!=p.error?p.error:p,null==p.retry&&(p.retry=D))};Editor.configure=function(p){if(null!=p){Editor.config=p;Editor.configVersion=p.version;Menus.prototype.defaultFonts=p.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+p.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=p.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=p.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=p.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=p.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=p.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+p.debug&&(urlParams.test="1");null!=p.templateFile&&(EditorUi.templateFile=p.templateFile);null!=p.styles&&(Array.isArray(p.styles)?Editor.styles=p.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=p.globalVars&&(Editor.globalVars=p.globalVars);null!=p.compressXml&&(Editor.compressXml=p.compressXml);null!=p.includeDiagram&&(Editor.defaultIncludeDiagram=p.includeDiagram);null!=p.simpleLabels&&(Editor.simpleLabels=p.simpleLabels);null!=p.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+p.oneDriveInlinePicker);null!=p.darkColor&&(Editor.darkColor=p.darkColor);null!=p.lightColor&&(Editor.lightColor=p.lightColor);null!=p.settingsName&&(Editor.configurationKey="."+p.settingsName+"-configuration",Editor.settingsKey="."+p.settingsName+"-config",mxSettings.key=Editor.settingsKey);p.customFonts&&(Menus.prototype.defaultFonts=p.customFonts.concat(Menus.prototype.defaultFonts));p.customPresetColors&&(ColorDialog.prototype.presetColors=p.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=p.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=p.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=p.css){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(p.css));var L=document.getElementsByTagName("script")[0];L.parentNode.insertBefore(D,L)}null!=p.libraries&&(Sidebar.prototype.customEntries=p.libraries);null!=p.enabledLibraries&&(Array.isArray(p.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+p.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=p.defaultLibraries&&(Sidebar.prototype.defaultEntries=p.defaultLibraries);null!=p.defaultCustomLibraries&&(Editor.defaultCustomLibraries=p.defaultCustomLibraries);null!=p.enableCustomLibraries&&(Editor.enableCustomLibraries=p.enableCustomLibraries);null!=p.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=p.defaultVertexStyle);null!=p.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=p.defaultEdgeStyle);
+null!=p.defaultPageVisible&&(Graph.prototype.defaultPageVisible=p.defaultPageVisible);null!=p.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=p.defaultGridEnabled);null!=p.zoomWheel&&(Graph.zoomWheel=p.zoomWheel);null!=p.zoomFactor&&(D=parseFloat(p.zoomFactor),!isNaN(D)&&1<D?Graph.prototype.zoomFactor=D:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=p.gridSteps&&(D=parseInt(p.gridSteps),!isNaN(D)&&0<D?mxGraphView.prototype.gridSteps=D:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=p.pageFormat&&(D=parseInt(p.pageFormat.width),L=parseInt(p.pageFormat.height),!isNaN(D)&&0<D&&!isNaN(L)&&0<L?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,D,L),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));p.thumbWidth&&(Sidebar.prototype.thumbWidth=p.thumbWidth);p.thumbHeight&&(Sidebar.prototype.thumbHeight=p.thumbHeight);p.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+p.emptyLibraryXml);p.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=p.emptyDiagramXml);p.sidebarWidth&&(EditorUi.prototype.hsplitPosition=p.sidebarWidth);p.sidebarTitles&&(Sidebar.prototype.sidebarTitles=p.sidebarTitles);p.sidebarTitleSize&&(D=parseInt(p.sidebarTitleSize),!isNaN(D)&&0<D?Sidebar.prototype.sidebarTitleSize=D:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));p.fontCss&&("string"===typeof p.fontCss?Editor.configureFontCss(p.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=p.autosaveDelay&&(D=parseInt(p.autosaveDelay),!isNaN(D)&&0<D?DrawioFile.prototype.autosaveDelay=D:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=p.maxImageBytes&&(EditorUi.prototype.maxImageBytes=p.maxImageBytes);null!=p.maxImageSize&&(EditorUi.prototype.maxImageSize=p.maxImageSize);null!=p.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=p.shareCursorPosition);null!=p.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=p.showRemoteCursors)}};
+Editor.configureFontCss=function(p){if(null!=p){Editor.prototype.fontCss=p;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(p));D.parentNode.insertBefore(L,D);p=p.split("url(");for(L=1;L<p.length;L++){var V=p[L].indexOf(")");V=Editor.trimCssUrl(p[L].substring(0,V));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",V);
+O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(p){return p.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(p){p=null!=p?p:Editor.GUID_LENGTH;for(var D=[],L=0;L<p;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
+Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(p){p=null!=p&&"mxlibrary"!=p.nodeName?this.extractGraphModel(p):null;if(null!=p){var D=Editor.extractParserError(p,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[p],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==p.nodeName){D=p.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(V=new mxCodec(L.ownerDocument),V.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=L){var V=new mxCodec(L.ownerDocument);V.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==p.getAttribute("math");D=p.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==p.getAttribute("shadow"),!1);if(D=p.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
+};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(p,D){p=null!=p?p:!0;var L=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var V=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=V&&L.setAttribute("backgroundImage",JSON.stringify(V));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(V=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",V.join("|")));return L};Editor.prototype.isDataSvg=function(p){try{var D=mxUtils.parseXml(p).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L=mxUtils.parseXml(D).documentElement;return"mxfile"==
+L.nodeName||"mxGraphModel"==L.nodeName}}catch(V){}return!1};Editor.prototype.extractGraphModel=function(p,D,L){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var c=
+Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(p,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){p=null!=p?p:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
+Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
+Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var V=document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",p);D[0].parentNode.appendChild(V)}}};Editor.prototype.csvToArray=function(p){if(0<p.length){var D="",L=[""],V=0,O=!0,R;p=$jscomp.makeIterator(p);for(R=p.next();!R.done;R=p.next())R=R.value,'"'===R?(O&&R===D&&(L[V]+=R),O=!O):","===R&&O?R=L[++V]="":L[V]+=R,D=R;return L}return[]};Editor.prototype.getProxiedUrl=
+function(p){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(p)){var D=/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p);D=/\.png$/i.test(p)||/\.pdf$/i.test(p)||D;var L="t="+(new Date).getTime();p=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+L+(D?"&base64=1":"")}return p};Editor.prototype.isCorsEnabledForUrl=function(p){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||p.substring(0,window.location.origin.length)==
+window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(p)||"https://raw.githubusercontent.com/"===p.substring(0,34)||"https://fonts.googleapis.com/"===p.substring(0,29)||"https://fonts.gstatic.com/"===p.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var p=new mxUrlConverter;p.updateBaseUrl();var D=p.convert,L=this;p.convert=function(V){if(null!=
+V){var O="http://"==V.substring(0,7)||"https://"==V.substring(0,8);O&&!navigator.onLine?V=Editor.svgBrokenImage.src:!O||V.substring(0,p.baseUrl.length)==p.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(V)?"chrome-extension://"==V.substring(0,19)||mxClient.IS_CHROMEAPP||(V=D.apply(this,arguments)):V=PROXY_URL+"?url="+encodeURIComponent(V)}return V};return p};Editor.createSvgDataUri=function(p){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(p)))};Editor.prototype.convertImageToDataUri=
+function(p,D){try{var L=!0,V=window.setTimeout(mxUtils.bind(this,function(){L=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(p))mxUtils.get(p,mxUtils.bind(this,function(R){window.clearTimeout(V);L&&D(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(V);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(V);if(L)try{var R=document.createElement("canvas"),S=R.getContext("2d");
+R.height=O.height;R.width=O.width;S.drawImage(O,0,0);D(R.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(V);L&&D(Editor.svgBrokenImage.src)};O.src=p}}catch(R){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(p,D,L,V){null==V&&(V=this.createImageUrlConverter());var O=0,R=L||{};L=mxUtils.bind(this,function(S,X){S=p.getElementsByTagName(S);for(var Y=0;Y<S.length;Y++)mxUtils.bind(this,function(aa){try{if(null!=aa){var ba=V.convert(aa.getAttribute(X));
+if(null!=ba&&"data:"!=ba.substring(0,5)){var da=R[ba];null==da?(O++,this.convertImageToDataUri(ba,function(Z){null!=Z&&(R[ba]=Z,aa.setAttribute(X,Z));O--;0==O&&D(p)})):aa.setAttribute(X,da)}else null!=ba&&aa.setAttribute(X,ba)}}catch(Z){}})(S[Y])});L("image","xlink:href");L("img","src");0==O&&D(p)};Editor.base64Encode=function(p){for(var D="",L=0,V=p.length,O,R,S;L<V;){O=p.charCodeAt(L++)&255;if(L==V){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);D+="==";break}R=p.charCodeAt(L++);if(L==V){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);D+="=";break}S=p.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};Editor.prototype.loadUrl=function(p,D,L,V,O,R,S,X){try{var Y=!S&&(V||/(\.png)($|\?)/i.test(p)||/(\.jpe?g)($|\?)/i.test(p)||/(\.gif)($|\?)/i.test(p)||/(\.pdf)($|\?)/i.test(p));O=null!=O?O:!0;var aa=mxUtils.bind(this,function(){mxUtils.get(p,mxUtils.bind(this,function(ba){if(200<=ba.getStatus()&&
+299>=ba.getStatus()){if(null!=D){var da=ba.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ba=mxUtilsBinaryToArray(ba.request.responseBody).toArray();da=Array(ba.length);for(var Z=0;Z<ba.length;Z++)da[Z]=String.fromCharCode(ba[Z]);da=da.join("")}R=null!=R?R:"data:image/png;base64,";da=R+Editor.base64Encode(da)}D(da)}}else null!=L&&(0==ba.getStatus()?L({message:mxResources.get("accessDenied")},ba):404==ba.getStatus()?L({code:ba.getStatus()},
+ba):L({message:mxResources.get("error")+" "+ba.getStatus()},ba))}),function(ba){null!=L&&L({message:mxResources.get("error")+" "+ba.getStatus()})},Y,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:aa})},X)});aa()}catch(ba){null!=L&&L(ba)}};Editor.prototype.absoluteCssFonts=function(p){var D=null;if(null!=p){var L=p.split("url(");if(0<L.length){D=[L[0]];p=window.location.pathname;var V=null!=p?p.lastIndexOf("/"):-1;0<=V&&(p=p.substring(0,V+1));V=document.getElementsByTagName("base");
+var O=null;null!=V&&0<V.length&&(O=V[0].getAttribute("href"));for(var R=1;R<L.length;R++)if(V=L[R].indexOf(")"),0<V){var S=Editor.trimCssUrl(L[R].substring(0,V));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":p)+S);D.push('url("'+S+'"'+L[R].substring(V))}else D.push(L[R])}else D=[p]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(p,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+
+encodeURIComponent(D));L(p,D)};Editor.prototype.embedCssFonts=function(p,D){var L=p.split("url("),V=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==V){for(var Y=[L[0]],aa=1;aa<L.length;aa++){var ba=L[aa].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(L[aa].substring(0,ba))]);Y.push('"'+L[aa].substring(ba))}D(Y.join(""))}});if(0<L.length){for(p=1;p<L.length;p++){var R=L[p].indexOf(")"),S=null,X=L[p].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(L[p].substring(X+
+7,L[p].indexOf(")",X))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;V++;var aa="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Y))aa="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Y))aa="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Y))aa="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Y))aa="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Y))aa="application/vnd.ms-fontobject";
+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Y))aa="application/font-sfnt";this.mapFontUrl(aa,Y,mxUtils.bind(this,function(ba,da){this.loadUrl(da,mxUtils.bind(this,function(Z){this.cachedFonts[Y]=Z;V--;O()}),mxUtils.bind(this,function(Z){V--;O()}),!0,null,"data:"+ba+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[p].substring(0,R)),S)}O()}else D(p)};Editor.prototype.loadFonts=function(p){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=
+D;null!=p&&p()})):null!=p&&p()};Editor.prototype.createGoogleFontCache=function(){var p={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(p[D]=Graph.fontMapping[D]);return p};Editor.prototype.embedExtFonts=function(p){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],V=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==V&&this.embedCssFonts(L.join(""),p)}),R=0;R<D.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?
+null==this.cachedGoogleFonts[X]?(V++,this.loadUrl(X,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[X]=Y;L.push(Y+"\n");V--;O()}),mxUtils.bind(this,function(Y){V--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[R].name,D[R].url);O()}else p()};Editor.prototype.addMathCss=function(p){p=p.getElementsByTagName("defs");if(null!=p&&0<p.length)for(var D=document.getElementsByTagName("style"),L=0;L<D.length;L++){var V=
+mxUtils.getTextContent(D[L]);0>V.indexOf("mxPageSelector")&&0<V.indexOf("MathJax")&&p[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(p,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=p.getElementsByTagName("defs"),V=p.ownerDocument;0==L.length?(L=null!=V.createElementNS?V.createElementNS(mxConstants.NS_SVG,"defs"):V.createElement("defs"),null!=p.firstChild?p.insertBefore(L,p.firstChild):p.appendChild(L)):L=L[0];p=null!=V.createElementNS?V.createElementNS(mxConstants.NS_SVG,
+"style"):V.createElement("style");p.setAttribute("type","text/css");mxUtils.setTextContent(p,D);L.appendChild(p)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(p,D,L){var V=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(V/p,V/D))};Editor.prototype.exportToCanvas=function(p,D,L,V,O,R,S,X,Y,aa,ba,da,Z,ha,ea,ua,ya,xa){try{R=null!=R?R:!0;S=null!=S?S:!0;da=null!=da?da:this.graph;Z=null!=Z?Z:0;var va=
+Y?null:da.background;va==mxConstants.NONE&&(va=null);null==va&&(va=V);null==va&&0==Y&&(va=ua?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,Z,ha,null,S,null,null,null,aa,null,ua,ya,xa),mxUtils.bind(this,function(ka){try{var Na=new Image;Na.onload=mxUtils.bind(this,function(){try{var Ca=function(){mxClient.IS_SF?window.setTimeout(function(){ra.drawImage(Na,0,0);p(oa,ka)},0):(ra.drawImage(Na,0,0),p(oa,ka))},oa=document.createElement("canvas"),qa=parseInt(ka.getAttribute("width")),
+Ja=parseInt(ka.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=R?Math.min(1,Math.min(3*D/(4*Ja),D/qa)):D/qa);X=this.getMaxCanvasScale(qa,Ja,X);qa=Math.ceil(X*qa);Ja=Math.ceil(X*Ja);oa.setAttribute("width",qa);oa.setAttribute("height",Ja);var ra=oa.getContext("2d");null!=va&&(ra.beginPath(),ra.rect(0,0,qa,Ja),ra.fillStyle=va,ra.fill());1!=X&&ra.scale(X,X);if(ea){var Ba=da.view,Aa=Ba.scale;Ba.scale=1;var Ka=btoa(unescape(encodeURIComponent(Ba.createSvgGrid(Ba.gridColor))));Ba.scale=Aa;Ka="data:image/svg+xml;base64,"+
+Ka;var ma=da.gridSize*Ba.gridSteps*X,fa=da.getGraphBounds(),ca=Ba.translate.x*Aa,na=Ba.translate.y*Aa,la=ca+(fa.x-ca)/Aa-Z,sa=na+(fa.y-na)/Aa-Z,ia=new Image;ia.onload=function(){try{for(var ja=-Math.round(ma-mxUtils.mod((ca-la)*X,ma)),pa=-Math.round(ma-mxUtils.mod((na-sa)*X,ma));ja<qa;ja+=ma)for(var za=pa;za<Ja;za+=ma)ra.drawImage(ia,ja/X,za/X);Ca()}catch(Da){null!=O&&O(Da)}};ia.onerror=function(ja){null!=O&&O(ja)};ia.src=Ka}else Ca()}catch(ja){null!=O&&O(ja)}});Na.onerror=function(Ca){null!=O&&O(Ca)};
+aa&&this.graph.addSvgShadow(ka);this.graph.mathEnabled&&this.addMathCss(ka);var Ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ka,this.resolvedFontCss),Na.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}catch(Ca){null!=O&&O(Ca)}});this.embedExtFonts(mxUtils.bind(this,function(Ca){try{null!=Ca&&this.addFontCss(ka,Ca),this.loadFonts(Ia)}catch(oa){null!=O&&O(oa)}}))}catch(Ca){null!=O&&O(Ca)}}),L,ba)}catch(ka){null!=O&&O(ka)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=
+k,u=0;8>u;u++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(p,D,L,V){for(var O=0;O<V;O++)p=Editor.crcTable[(p^D.charCodeAt(L+O))&255]^p>>>8;return p};Editor.crc32=function(p){for(var D=-1,L=0;L<p.length;L++)D=D>>>8^Editor.crcTable[(D^p.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(p,D,L,V,O){function R(ba,da){var Z=Y;Y+=da;return ba.substring(Z,Y)}function S(ba){ba=R(ba,4);return ba.charCodeAt(3)+(ba.charCodeAt(2)<<8)+(ba.charCodeAt(1)<<
+16)+(ba.charCodeAt(0)<<24)}function X(ba){return String.fromCharCode(ba>>24&255,ba>>16&255,ba>>8&255,ba&255)}p=p.substring(p.indexOf(",")+1);p=window.atob?atob(p):Base64.decode(p,!0);var Y=0;if(R(p,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(p,4),"IHDR"!=R(p,4))null!=O&&O();else{R(p,17);O=p.substring(0,Y);do{var aa=S(p);if("IDAT"==R(p,4)){O=p.substring(0,Y-8);"pHYs"==D&&"dpi"==L?(L=Math.round(V/.0254),L=X(L)+X(L)+String.fromCharCode(1)):L=L+String.fromCharCode(0)+
+("zTXt"==D?String.fromCharCode(0):"")+V;V=4294967295;V=Editor.updateCRC(V,D,0,4);V=Editor.updateCRC(V,L,0,L.length);O+=X(L.length)+D+L+X(V^4294967295);O+=p.substring(Y-8,p.length);break}O+=p.substring(Y-8,Y-4+aa);R(p,aa);R(p,4)}while(aa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var z=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(p,D){z.apply(this,
+arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(p,D){var L=null;null!=p.editor.graph.getModel().getParent(D)?L=D.getId():null!=p.currentPage&&(L=p.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var A=Format.prototype.init;
+Format.prototype.init=function(){A.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var B=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?B.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var p=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=p&&p.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(p){return!1};var J=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(p){p=J.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,V=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var R=new ChangePageSetup(D);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;L.model.execute(R)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
+D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(V.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(V,60));p.appendChild(V)}return p};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(p){p=f.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var V=D.getCurrentFile();if(null!=V&&V.isAutosaveOptional()){var O=
+this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);D.editor.autosave&&V.isModified()&&V.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});p.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return L.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";p.appendChild(O);var R=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return p};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",
@@ -11312,451 +11312,454 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(t,D,L){if(null!=D){var T=function(P){if(null!=P)if(L)for(var R=0;R<P.length;R++)D[P[R].name]=P[R];else for(var X in D){var Z=!1;for(R=0;R<P.length;R++)if(P[R].name==X&&P[R].type==D[X].type){Z=!0;break}Z||delete D[X]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(P){}}};var q=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));q.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
-{},L=t.vertices,T=t.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,t))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(t,D,L){function T(ta,Da,wa,Ja){ba.getModel().beginUpdate();try{var ka=[],da=[];if(null!=wa.index){for(var ca=[],na=wa.parentRow.nextSibling;na&&na.getAttribute("data-pName")==ta;)ca.push(na.getAttribute("data-pValue")),na=na.nextSibling;wa.index<ca.length?null!=Ja?ca.splice(Ja,1):ca[wa.index]=Da:ca.push(Da);null!=wa.size&&ca.length>wa.size&&(ca=ca.slice(0,wa.size));Da=ca.join(",");null!=wa.countProperty&&(ba.setCellStyles(wa.countProperty,ca.length,
-ba.getSelectionCells()),ka.push(wa.countProperty),da.push(ca.length))}ba.setCellStyles(ta,Da,ba.getSelectionCells());ka.push(ta);da.push(Da);if(null!=wa.dependentProps)for(ta=0;ta<wa.dependentProps.length;ta++){var la=wa.dependentPropsDefVal[ta],qa=wa.dependentPropsVals[ta];if(qa.length>Da)qa=qa.slice(0,Da);else for(var ha=qa.length;ha<Da;ha++)qa.push(la);qa=qa.join(",");ba.setCellStyles(wa.dependentProps[ta],qa,ba.getSelectionCells());ka.push(wa.dependentProps[ta]);da.push(qa)}if("function"==typeof wa.onChange)wa.onChange(ba,
-Da);aa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",da,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(ta,Da,wa){var Ja=mxUtils.getOffset(t,!0),ka=mxUtils.getOffset(ta,!0);Da.style.position="absolute";Da.style.left=ka.x-Ja.x+"px";Da.style.top=ka.y-Ja.y+"px";Da.style.width=ta.offsetWidth+"px";Da.style.height=ta.offsetHeight-(wa?4:0)+"px";Da.style.zIndex=5}function P(ta,Da,wa){var Ja=document.createElement("div");Ja.style.width="32px";Ja.style.height=
-"4px";Ja.style.margin="2px";Ja.style.border="1px solid black";Ja.style.background=Da&&"none"!=Da?Da:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(aa,function(ka){this.editorUi.pickColor(Da,function(da){Ja.style.background="none"==da?"url('"+Dialog.prototype.noColorImage+"')":da;T(ta,da,wa)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ja);return btn}function R(ta,Da,wa,Ja,ka,da,ca){null!=Da&&(Da=Da.split(","),
-ea.push({name:ta,values:Da,type:wa,defVal:Ja,countProperty:ka,parentRow:da,isDeletable:!0,flipBkg:ca}));btn=mxUtils.button("+",mxUtils.bind(aa,function(na){for(var la=da,qa=0;null!=la.nextSibling;)if(la.nextSibling.getAttribute("data-pName")==ta)la=la.nextSibling,qa++;else break;var ha={type:wa,parentRow:da,index:qa,isDeletable:!0,defVal:Ja,countProperty:ka};qa=Y(ta,"",ha,0==qa%2,ca);T(ta,Ja,ha);la.parentNode.insertBefore(qa,la.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function X(ta,Da,wa,Ja,ka,da,ca){if(0<ka){var na=Array(ka);Da=null!=Da?Da.split(","):[];for(var la=0;la<ka;la++)na[la]=null!=Da[la]?Da[la]:null!=Ja?Ja:"";ea.push({name:ta,values:na,type:wa,defVal:Ja,parentRow:da,flipBkg:ca,size:ka})}return document.createElement("div")}function Z(ta,Da,wa){var Ja=document.createElement("input");Ja.type="checkbox";Ja.checked="1"==Da;mxEvent.addListener(Ja,"change",function(){T(ta,Ja.checked?"1":"0",wa)});return Ja}function Y(ta,
-Da,wa,Ja,ka){var da=wa.dispName,ca=wa.type,na=document.createElement("tr");na.className="gePropRow"+(ka?"Dark":"")+(Ja?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",ta);na.setAttribute("data-pValue",Da);Ja=!1;null!=wa.index&&(na.setAttribute("data-index",wa.index),da=(null!=da?da:"")+"["+wa.index+"]",Ja=!0);var la=document.createElement("td");la.className="gePropRowCell";da=mxResources.get(da,null,da);mxUtils.write(la,da);la.setAttribute("title",da);Ja&&(la.style.textAlign="right");
-na.appendChild(la);la=document.createElement("td");la.className="gePropRowCell";if("color"==ca)la.appendChild(P(ta,Da,wa));else if("bool"==ca||"boolean"==ca)la.appendChild(Z(ta,Da,wa));else if("enum"==ca){var qa=wa.enumList;for(ka=0;ka<qa.length;ka++)if(da=qa[ka],da.val==Da){mxUtils.write(la,mxResources.get(da.dispName,null,da.dispName));break}mxEvent.addListener(la,"click",mxUtils.bind(aa,function(){var ha=document.createElement("select");O(la,ha);for(var ia=0;ia<qa.length;ia++){var pa=qa[ia],va=
-document.createElement("option");va.value=mxUtils.htmlEntities(pa.val);mxUtils.write(va,mxResources.get(pa.dispName,null,pa.dispName));ha.appendChild(va)}ha.value=Da;t.appendChild(ha);mxEvent.addListener(ha,"change",function(){var za=mxUtils.htmlEntities(ha.value);T(ta,za,wa)});ha.focus();mxEvent.addListener(ha,"blur",function(){t.removeChild(ha)})}))}else"dynamicArr"==ca?la.appendChild(R(ta,Da,wa.subType,wa.subDefVal,wa.countProperty,na,ka)):"staticArr"==ca?la.appendChild(X(ta,Da,wa.subType,wa.subDefVal,
-wa.size,na,ka)):"readOnly"==ca?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Da,ka.style.width="96px",ka.style.borderWidth="0px",la.appendChild(ka)):(la.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Da)),mxEvent.addListener(la,"click",mxUtils.bind(aa,function(){function ha(){var pa=ia.value;pa=0==pa.length&&"string"!=ca?0:pa;wa.allowAuto&&(null!=pa.trim&&"auto"==pa.trim().toLowerCase()?(pa="auto",ca="string"):(pa=parseFloat(pa),pa=isNaN(pa)?0:pa));null!=wa.min&&pa<
-wa.min?pa=wa.min:null!=wa.max&&pa>wa.max&&(pa=wa.max);pa=encodeURIComponent(("int"==ca?parseInt(pa):pa)+"");T(ta,pa,wa)}var ia=document.createElement("input");O(la,ia,!0);ia.value=decodeURIComponent(Da);ia.className="gePropEditor";"int"!=ca&&"float"!=ca||wa.allowAuto||(ia.type="number",ia.step="int"==ca?"1":"any",null!=wa.min&&(ia.min=parseFloat(wa.min)),null!=wa.max&&(ia.max=parseFloat(wa.max)));t.appendChild(ia);mxEvent.addListener(ia,"keypress",function(pa){13==pa.keyCode&&ha()});ia.focus();mxEvent.addListener(ia,
-"blur",function(){ha()})})));wa.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(aa,function(ha){T(ta,"",wa,wa.index);mxEvent.consume(ha)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",la.appendChild(ka));na.appendChild(la);return na}var aa=this,ba=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ja=document.createElement("table");ja.className="geProperties";ja.style.whiteSpace="nowrap";ja.style.width="100%";var fa=
-document.createElement("tr");fa.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var ma=document.createElement("img");ma.src=Sidebar.prototype.expandedImage;ma.style.verticalAlign="middle";ra.appendChild(ma);mxUtils.write(ra,mxResources.get("property"));fa.style.cursor="pointer";var Ga=function(){var ta=ja.querySelectorAll(".gePropNonHeaderRow");if(aa.editorUi.propertiesCollapsed){ma.src=Sidebar.prototype.collapsedImage;var Da="none";for(var wa=t.childNodes.length-
-1;0<=wa;wa--)try{var Ja=t.childNodes[wa],ka=Ja.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||t.removeChild(Ja)}catch(da){}}else ma.src=Sidebar.prototype.expandedImage,Da="";for(wa=0;wa<ta.length;wa++)ta[wa].style.display=Da};mxEvent.addListener(fa,"click",function(){aa.editorUi.propertiesCollapsed=!aa.editorUi.propertiesCollapsed;Ga()});fa.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");fa.appendChild(ra);ja.appendChild(fa);
-var Fa=!1,ya=!1;fa=null;1==L.vertices.length&&0==L.edges.length?fa=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(fa=L.edges[0].id);null!=fa&&ja.appendChild(Y("id",mxUtils.htmlEntities(fa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in D)if(fa=D[Ma],"function"!=typeof fa.isVisible||fa.isVisible(L,this)){var xa=null!=L.style[Ma]?mxUtils.htmlEntities(L.style[Ma]+""):null!=fa.getDefaultValue?fa.getDefaultValue(L,this):fa.defVal;if("separator"==fa.type)ya=!ya;else{if("staticArr"==fa.type)fa.size=
-parseInt(L.style[fa.sizeProperty]||D[fa.sizeProperty].defVal)||0;else if(null!=fa.dependentProps){var Ca=fa.dependentProps,oa=[],Aa=[];for(ra=0;ra<Ca.length;ra++){var La=L.style[Ca[ra]];Aa.push(D[Ca[ra]].subDefVal);oa.push(null!=La?La.split(","):[])}fa.dependentPropsDefVal=Aa;fa.dependentPropsVals=oa}ja.appendChild(Y(Ma,xa,fa,Fa,ya));Fa=!Fa}}for(ra=0;ra<ea.length;ra++)for(fa=ea[ra],D=fa.parentRow,L=0;L<fa.values.length;L++)Ma=Y(fa.name,fa.values[L],{type:fa.type,parentRow:fa.parentRow,isDeletable:fa.isDeletable,
-index:L,defVal:fa.defVal,countProperty:fa.countProperty,size:fa.size},0==L%2,fa.flipBkg),D.parentNode.insertBefore(Ma,D.nextSibling),D=Ma;t.appendChild(ja);Ga();return t};StyleFormatPanel.prototype.addStyles=function(t){function D(fa){mxEvent.addListener(fa,"mouseenter",function(){fa.style.opacity="1"});mxEvent.addListener(fa,"mouseleave",function(){fa.style.opacity="0.5"})}var L=this.editorUi,T=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
-O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var P="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(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var X=[],Z=0;Z<this.defaultColorSchemes.length;Z++){var Y=
-document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(fa){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){aa(fa)}))})(Z);X.push(Y);R.appendChild(Y)}var aa=mxUtils.bind(this,function(fa){null!=X[fa]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=fa,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(fa){var ra=mxUtils.bind(this,function(Ga){var Fa=mxUtils.button("",mxUtils.bind(this,function(xa){T.getModel().beginUpdate();try{for(var Ca=L.getSelectionState().cells,oa=0;oa<Ca.length;oa++){for(var Aa=T.getModel().getStyle(Ca[oa]),La=0;La<P.length;La++)Aa=mxUtils.removeStylename(Aa,
-P[La]);var ta=T.getModel().isVertex(Ca[oa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=Ga?(mxEvent.isShiftDown(xa)||(Aa=""==Ga.fill?mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,Ga.fill||mxUtils.getValue(ta,mxConstants.STYLE_FILLCOLOR,null)),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_GRADIENTCOLOR,Ga.gradient||mxUtils.getValue(ta,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(xa)||mxClient.IS_MAC&&mxEvent.isMetaDown(xa)||!T.getModel().isVertex(Ca[oa])||
-(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FONTCOLOR,Ga.font||mxUtils.getValue(ta,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(xa)||(Aa=""==Ga.stroke?mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,Ga.stroke||mxUtils.getValue(ta,mxConstants.STYLE_STROKECOLOR,null)))):(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ta,
-mxConstants.STYLE_STROKECOLOR,"#000000")),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ca[oa])&&(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ca[oa],Aa)}}finally{T.getModel().endUpdate()}}));Fa.className="geStyleButton";Fa.style.width="36px";Fa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Fa.style.margin="0px 6px 6px 0px";
-if(null!=Ga){var ya="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ga.border&&(ya=Ga.border);null!=Ga.gradient?mxClient.IS_IE&&10>document.documentMode?Fa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ga.fill+"', EndColorStr='"+Ga.gradient+"', GradientType=0)":Fa.style.backgroundImage="linear-gradient("+Ga.fill+" 0px,"+Ga.gradient+" 100%)":Ga.fill==mxConstants.NONE?Fa.style.background="url('"+Dialog.prototype.noColorImage+"')":Fa.style.backgroundColor=""==Ga.fill?
-mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ga.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Fa.style.border=Ga.stroke==mxConstants.NONE?ya+" transparent":""==Ga.stroke?ya+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):ya+" "+(Ga.stroke||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ga.title&&Fa.setAttribute("title",Ga.title)}else{ya=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Fa.style.backgroundColor=ya;Fa.style.border="1px solid "+Ma}Fa.style.borderRadius="0";O.appendChild(Fa)});O.innerText="";for(var ma=0;ma<fa.length;ma++)0<ma&&0==mxUtils.mod(ma,4)&&mxUtils.br(O),ra(fa[ma])});null==this.format.currentScheme?
-aa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):aa(this.format.currentScheme);Z=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ja=document.createElement("div");ja.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(t.appendChild(ea),t.appendChild(ja));mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(ea);D(ja);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(R);return t};StyleFormatPanel.prototype.addEditOps=function(t){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
-mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),t.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
-t.appendChild(D));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
-D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+D+'");\n}'),t=document.createElement("style"),mxUtils.write(t,L));return t};Graph.addFont=function(t,D,L){if(null!=t&&0<t.length&&null!=D&&0<D.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
-T){var O=Graph.customFontElements[T];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:t,url:D,elt:Graph.createFontElement(t,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
-return t};Graph.getFontUrl=function(t,D){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(D=t.url);return D};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var D=0;D<t.length;D++){var L=t[D].getAttribute("data-font-src");if(null!=L){var T="FONT"==t[D].nodeName?t[D].getAttribute("face"):t[D].style.fontFamily;null!=T&&Graph.addFont(T,L)}}};Graph.processFontStyle=function(t){if(null!=t){var D=mxUtils.getValue(t,"fontSource",null);if(null!=D){var L=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
-null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var y=Graph.prototype.init;Graph.prototype.init=function(){function t(O){D=O}y.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):L.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var P=this.graph.getCellStyle(O);if(null!=P&&"rack"==P.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=P.marginLeft||0;R.marginRight=P.marginRight||0;R.marginTop=P.marginTop||0;R.marginBottom=
-P.marginBottom||0;R.allowGaps=P.allowGaps||0;R.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,D){return Graph.processFontStyle(A.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,D,L,T,O,P,R,X,Z,Y,aa){C.apply(this,arguments);Graph.processFontAttributes(aa)};
-var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,D,L){function T(){for(var fa=R.getSelectionCells(),ra=[],ma=0;ma<fa.length;ma++)R.isCellVisible(fa[ma])&&ra.push(fa[ma]);R.setSelectionCells(ra)}function O(fa){R.setHiddenTags(fa?[]:X.slice());T();R.refresh()}function P(fa,ra){Y.innerText="";if(0<fa.length){var ma=document.createElement("table");
-ma.setAttribute("cellpadding","2");ma.style.boxSizing="border-box";ma.style.tableLayout="fixed";ma.style.width="100%";var Ga=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var Fa=0;Fa<fa.length;Fa++)(function(ya){var Ma=0>mxUtils.indexOf(R.hiddenTags,ya),xa=document.createElement("tr"),Ca=document.createElement("td");Ca.style.align="center";Ca.style.width="16px";var oa=document.createElement("img");oa.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);oa.setAttribute("title",
-mxResources.get(Ma?"hideIt":"show",[ya]));mxUtils.setOpacity(oa,Ma?75:25);oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";Ca.appendChild(oa);mxEvent.addListener(oa,"click",function(La){mxEvent.isShiftDown(La)?O(0<=mxUtils.indexOf(R.hiddenTags,ya)):(R.toggleHiddenTag(ya),T(),R.refresh());mxEvent.consume(La)});xa.appendChild(Ca);Ca=document.createElement("td");Ca.style.overflow="hidden";Ca.style.whiteSpace="nowrap";
-Ca.style.textOverflow="ellipsis";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.setAttribute("title",ya);a=document.createElement("a");mxUtils.write(a,ya);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Ca.appendChild(a);mxEvent.addListener(Ca,"click",function(La){if(mxEvent.isShiftDown(La)){O(!0);var ta=R.getCellsForTags([ya],null,null,!0);R.isEnabled()?R.setSelectionCells(ta):R.highlightCells(ta)}else if(Ma&&0<R.hiddenTags.length)O(!0);else{ta=
-X.slice();var Da=mxUtils.indexOf(ta,ya);ta.splice(Da,1);R.setHiddenTags(ta);T();R.refresh()}mxEvent.consume(La)});xa.appendChild(Ca);if(R.isEnabled()){Ca=document.createElement("td");Ca.style.verticalAlign="middle";Ca.style.textAlign="center";Ca.style.width="18px";if(null==ra){Ca.style.align="center";Ca.style.width="16px";oa=document.createElement("img");oa.setAttribute("src",Editor.crossImage);oa.setAttribute("title",mxResources.get("removeIt",[ya]));mxUtils.setOpacity(oa,Ma?75:25);oa.style.verticalAlign=
-"middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";mxEvent.addListener(oa,"click",function(La){var ta=mxUtils.indexOf(X,ya);0<=ta&&X.splice(ta,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[ya]);R.refresh();mxEvent.consume(La)});Ca.appendChild(oa)}else{var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.margin="0px";Aa.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,ya);Aa.checked=Aa.defaultChecked;
-Aa.style.background="transparent";Aa.setAttribute("title",mxResources.get(Aa.defaultChecked?"removeIt":"add",[ya]));mxEvent.addListener(Aa,"change",function(La){Aa.checked?R.addTagsForCells(R.getSelectionCells(),[ya]):R.removeTagsForCells(R.getSelectionCells(),[ya]);mxEvent.consume(La)});Ca.appendChild(Aa)}xa.appendChild(Ca)}Ga.appendChild(xa)})(fa[Fa]);ma.appendChild(Ga);Y.appendChild(ma)}}var R=this,X=R.hiddenTags.slice(),Z=document.createElement("div");Z.style.userSelect="none";Z.style.overflow=
-"hidden";Z.style.padding="10px";Z.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=R.isEnabled()?"1px solid #808080":"none";Y.style.bottom=R.isEnabled()?"48px":"10px";Z.appendChild(Y);var aa=mxUtils.button(mxResources.get("reset"),function(fa){R.setHiddenTags([]);mxEvent.isShiftDown(fa)||
-(X=R.hiddenTags.slice());T();R.refresh()});aa.setAttribute("title",mxResources.get("reset"));aa.className="geBtn";aa.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(fa){X=fa;ea()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";R.addListener(mxEvent.ROOT,function(){X=R.hiddenTags.slice()});var ea=mxUtils.bind(this,function(fa,ra){if(t()){fa=R.getAllTags();for(ra=0;ra<fa.length;ra++)0>mxUtils.indexOf(X,
-fa[ra])&&X.push(fa[ra]);X.sort();R.isSelectionEmpty()?P(X):P(X,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,ea);R.model.addListener(mxEvent.CHANGE,ea);R.addListener(mxEvent.REFRESH,ea);var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.whiteSpace="nowrap";ja.style.position="absolute";ja.style.overflow="hidden";ja.style.bottom="0px";ja.style.height="42px";ja.style.right="10px";ja.style.left="10px";R.isEnabled()&&(ja.appendChild(aa),
-ja.appendChild(ba),Z.appendChild(ja));return{div:Z,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];t.push({name:L.name,url:L.url})}return t};Graph.prototype.setFont=function(t,D){Graph.addFont(t,D);document.execCommand("fontname",!1,t);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(t,D);for(var T=0;T<L.length;T++)L[T].getAttribute("face")==
-t&&L[T].getAttribute("data-font-src")!=D&&L[T].setAttribute("data-font-src",D)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var D in t)this.globalVars[D]=
-t[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var D=M.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[t]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,D,L,T,O,P,R,X,Z,Y,aa,ba,ea,ja){var fa=null,ra=null,ma=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(fa=this.stylesheet,ra=this.shapeForegroundColor,ma=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ga=G.apply(this,arguments),Fa=this.getCustomFonts();if(aa&&0<Fa.length){var ya=Ga.ownerDocument,Ma=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):ya.createElement("style");null!=ya.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var xa="",Ca="",oa=0;oa<Fa.length;oa++){var Aa=Fa[oa].name,La=Fa[oa].url;Graph.isCssFontUrl(La)?
-xa+="@import url("+La+");\n":Ca+='@font-face {\nfont-family: "'+Aa+'";\nsrc: url("'+La+'");\n}\n'}Ma.appendChild(ya.createTextNode(xa+Ca));Ga.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Ga),Editor.MathJaxRender(Ga),Ga.parentNode.removeChild(Ga));null!=fa&&(this.shapeBackgroundColor=ma,this.shapeForegroundColor=ra,this.stylesheet=fa,this.refresh());return Ga};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){S.apply(this,
-arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var u=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){u.apply(this,arguments);this.enumerationState=0};var z=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return z.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var D="1"==mxUtils.getValue(t.style,"enumerate",0);D&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):D||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);D=t.secondLabel;if(null!=D){var L=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*L,t.y+4*L,0,0):mxRectangle.fromPoint(t.view.getPoint(t));D.bounds.equals(t)&&D.value==T&&D.scale==L||(D.bounds=t,D.value=T,D.scale=
-L,D.redraw())}};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=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;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var J=Graph.prototype.refresh;Graph.prototype.refresh=function(){J.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var K=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){K.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
-t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,T=0,O=0,P=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,
-function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<T&&T--;0==T&&Z()}),Z=mxUtils.bind(this,function(){if(O<t.length){var Y=this.stoppingCustomActions,aa=t[O++],ba=[];if(null!=aa.open)if(R(),this.isCustomLink(aa.open)){if(!this.customLinkClicked(aa.open))return}else this.openLink(aa.open);null==aa.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=aa.wait?parseInt(aa.wait):1E3),R());null!=aa.opacity&&null!=aa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(aa.opacity,!0)),aa.opacity.value);null!=aa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeIn,!0)),0,1,X,Y?0:aa.fadeIn.delay));null!=aa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeOut,!0)),1,0,X,Y?0:aa.fadeOut.delay));null!=aa.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeIn,
-!0),!0)));null!=aa.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeOut,!0),!1)));null!=aa.toggle&&(P(),this.toggleCells(this.getCellsForAction(aa.toggle,!0)));if(null!=aa.show){P();var ea=this.getCellsForAction(aa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=aa.hide&&(P(),ea=this.getCellsForAction(aa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=aa.toggleStyle&&null!=
-aa.toggleStyle.key&&(P(),this.toggleCellStyles(aa.toggleStyle.key,null!=aa.toggleStyle.defaultValue?aa.toggleStyle.defaultValue:"0",this.getCellsForAction(aa.toggleStyle,!0)));null!=aa.style&&null!=aa.style.key&&(P(),this.setCellStyles(aa.style.key,aa.style.value,this.getCellsForAction(aa.style,!0)));ea=[];null!=aa.select&&this.isEnabled()&&(ea=this.getCellsForAction(aa.select),this.setSelectionCells(ea));null!=aa.highlight&&(ea=this.getCellsForAction(aa.highlight),this.highlightCells(ea,aa.highlight.color,
-aa.highlight.duration,aa.highlight.opacity));null!=aa.scroll&&(ea=this.getCellsForAction(aa.scroll));null!=aa.viewbox&&this.fitWindow(aa.viewbox,aa.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=aa.tags){ea=[];null!=aa.tags.hidden&&(ea=ea.concat(aa.tags.hidden));if(null!=aa.tags.visible)for(var ja=this.getAllTags(),fa=0;fa<ja.length;fa++)0>mxUtils.indexOf(aa.tags.visible,ja[fa])&&0>mxUtils.indexOf(ea,ja[fa])&&ea.push(ja[fa]);this.setHiddenTags(ea);this.refresh()}0<ba.length&&
-(T++,this.executeAnimations(ba,X,Y?1:aa.steps,Y?0:aa.delay));0==T?Z():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=D&&D()});Z()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(t,L));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=T.getElementsByTagName("a"),P=!1,R=0;R<
-O.length;R++)L=O[R].getAttribute("href"),null!=L&&"data:action/json,"==L.substring(0,17)&&(O[R].setAttribute("href",this.updateCustomLink(t,L)),P=!0);P&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(t,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(t,D){for(var L=0;L<
-D.length;L++){var T=D[L],O;for(O in T)this.updateCustomLinkAction(t,T[O],"cells"),this.updateCustomLinkAction(t,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,D,L){if(null!=D&&null!=D[L]){for(var T=[],O=0;O<D[L].length;O++)if("*"==D[L][O])T.push(D[L][O]);else{var P=t[D[L][O]];null!=P?""!=P&&T.push(P):T.push(D[L][O])}D[L]=T}};Graph.prototype.getCellsForAction=function(t,D){D=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,D));if(null!=t.excludeCells){for(var L=
-[],T=0;T<D.length;T++)0>t.excludeCells.indexOf(D[T].id)&&L.push(D[T]);D=L}return D};Graph.prototype.getCellsById=function(t){var D=[];if(null!=t)for(var L=0;L<t.length;L++)if("*"==t[L]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(P){return P!=T},T))}else{var O=this.model.getCell(t[L]);null!=O&&D.push(O)}return D};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};
-Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(t){var D=mxUtils.indexOf(this.hiddenTags,t);0>D?this.hiddenTags.push(t):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var D=0;D<t.length;D++)if(0>
-mxUtils.indexOf(this.hiddenTags,t[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,D,L,T){var O=[];if(null!=t){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var P=0,R={},X=0;X<t.length;X++)0<t[X].length&&(R[t[X]]=!0,P++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var Z=this.getTagsForCell(D[X]),Y=!1;if(0<Z.length&&(Z=Z.split(" "),Z.length>=t.length)){for(var aa=Y=0;aa<Z.length&&Y<
-P;aa++)null!=R[Z[aa]]&&Y++;Y=Y==P}Y&&(1!=T||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var D=null,L=[],T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);L=[];if(0<O.length){O=O.split(" ");for(var P={},R=0;R<O.length;R++)if(null==D||null!=D[O[R]])P[O[R]]=!0,L.push(O[R]);D=P}else return[]}return L};Graph.prototype.getTagsForCells=
-function(t){for(var D=[],L={},T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);if(0<O.length){O=O.split(" ");for(var P=0;P<O.length;P++)null==L[O[P]]&&(L[O[P]]=!0,D.push(O[P]))}}return D};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){for(var T=this.getTagsForCell(t[L]),O=T.split(" "),P=!1,R=0;R<D.length;R++){var X=mxUtils.trim(D[R]);
-""!=X&&0>mxUtils.indexOf(O,X)&&(T=0<T.length?T+" "+X:X,P=!0)}P&&this.setAttributeForCell(t[L],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){var T=this.getTagsForCell(t[L]);if(0<T.length){for(var O=T.split(" "),P=!1,R=0;R<D.length;R++){var X=mxUtils.indexOf(O,D[R]);0<=X&&(O.splice(X,1),P=!0)}P&&this.setAttributeForCell(t[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};
-Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var D=0;D<t.length;D++)this.model.setVisible(t[D],!this.model.isVisible(t[D]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,D){this.model.beginUpdate();try{for(var L=0;L<t.length;L++)this.model.setVisible(t[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,D,L,T){for(var O=0;O<t.length;O++)this.highlightCell(t[O],D,L,T)};Graph.prototype.highlightCell=function(t,D,
-L,T,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;t=this.view.getState(t);var P=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+O),P=new mxCellHighlight(this,D,O,!1),null!=T&&(P.opacity=T),P.highlight(t),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},L));return P};Graph.prototype.addSvgShadow=
-function(t,D,L,T){L=null!=L?L:!1;T=null!=T?T:!0;var O=t.ownerDocument,P=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");P.setAttribute("id",this.shadowId);var R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",this.svgShadowBlur);R.setAttribute("result","blur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
-"feOffset"):O.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",this.svgShadowOpacity);R.setAttribute("result","offsetColor");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
-"feComposite"):O.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2","offsetBlur");P.appendChild(R);R=t.getElementsByTagName("defs");0==R.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
-"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=R[0];O.appendChild(P);L||(D=null!=D?D:t.getElementsByTagName("g")[0],null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),D=t.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=
-parseFloat(D[3])+6,t.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(t,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=null!=D?D:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),
-D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<t&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
-"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+
-"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+
-"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
-[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
-STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var D=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?D="mxgraph.er":"sysML"==t.substring(0,5)&&(D="mxgraph.sysml"));return D};var N=mxMarker.createMarker;mxMarker.createMarker=function(t,D,L,T,O,P,R,X,Z,Y){if(null!=L&&null==mxMarker.markers[L]){var aa=this.getPackageForType(L);null!=
-aa&&mxStencilRegistry.getStencil(aa)}return N.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,D,L,T,O,P){"1"==mxUtils.getValue(D.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(t,D){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),
-parseInt(ba.value))))}function T(da){function ca(Ia,Pa,Qa){var Oa=Ia.useCssTransforms,Sa=Ia.currentTranslate,Ua=Ia.currentScale,Ka=Ia.view.translate,Ta=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Va=Ia.getGraphBounds(),Wa=0,$a=0,Xa=Ja.get(),ab=1/Ia.pageScale,Za=Ga.checked;if(Za){ab=parseInt(Da.value);var gb=parseInt(wa.value);ab=Math.min(Xa.height*gb/(Va.height/Ia.view.scale),
-Xa.width*ab/(Va.width/Ia.view.scale))}else ab=parseInt(ma.value)/(100*Ia.pageScale),isNaN(ab)&&(na=1/Ia.pageScale,ma.value="100 %");Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ia.pageVisible?(Va=Ia.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ia,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ja.checked&&(Pa.isCellVisible=function(Ya){return Ia.isCellSelected(Ya)});
-Wa=t.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ia.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,
-db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,
-O.refresh())}else{Xa=Ia.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ia,ab,Wa,$a,Qa,!0);Qa=Ia.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+
-mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Oa&&(Ia.useCssTransforms=Oa,Ia.currentTranslate=Sa,Ia.currentScale=Ua,Ia.view.translate=Ka,Ia.view.scale=Ta);return Pa}var na=parseInt(ka.value)/100;isNaN(na)&&(na=1,ka.value="100 %");na*=.75;var la=null,qa=O.shapeForegroundColor,ha=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(la=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",
-O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,pa=ea.value,va=!Y.checked,za=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,Y.checked,ia,pa,Ga.checked,Da.value,wa.value,parseInt(ma.value)/100,parseInt(ka.value)/100,Ja.get());else{va&&(va=ja.checked||ia==Z&&pa==Z);if(!va&&null!=t.pages&&t.pages.length){var Ea=0;va=t.pages.length-1;Y.checked||(Ea=parseInt(ia)-1,va=parseInt(pa)-1);for(var Ba=Ea;Ba<=va;Ba++){var ua=t.pages[Ba];ia=ua==t.currentPage?O:null;if(null==ia){ia=t.createTemporaryGraph(O.stylesheet);
-ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;pa=!0;Ea=!1;var sa=null,Ha=null;null==ua.viewState&&null==ua.root&&t.updatePageRoot(ua);null!=ua.viewState&&(pa=ua.viewState.pageVisible,Ea=ua.viewState.mathEnabled,sa=ua.viewState.background,Ha=ua.viewState.backgroundImage,ia.extFonts=ua.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=t.createImageForPageLink(Ha.originalSrc,ua));ia.background=sa;ia.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,
-Ha.height,Ha.x,Ha.y):null;ia.pageVisible=pa;ia.mathEnabled=Ea;var Na=ia.getGraphBounds;ia.getGraphBounds=function(){var Ia=Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ia};var Ra=ia.getGlobalVariable;ia.getGlobalVariable=function(Ia){return"page"==Ia?ua.getName():"pagenumber"==Ia?Ba+1:
-"pagecount"==Ia?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ia.container);t.updatePageRoot(ua);ia.model.setRoot(ua.root)}za=ca(ia,za,Ba!=va);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else za=ca(O);null==za?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(za.mathEnabled&&(va=za.wnd.document,da&&(za.wnd.IMMEDIATE_PRINT=!0),va.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),za.closeDocument(),
-!za.mathEnabled&&da&&PrintDialog.printPreview(za));null!=la&&(O.shapeForegroundColor=qa,O.shapeBackgroundColor=ha,O.stylesheet=la,O.refresh())}}var O=t.editor.graph,P=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,D||mxResources.get("print"));P.appendChild(R);var X=1,Z=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=
-document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");R.appendChild(Y);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));R.appendChild(D);mxUtils.br(R);var aa=Y.cloneNode(!0);Y.setAttribute("checked","checked");aa.setAttribute("value","range");R.appendChild(aa);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+
-":");R.appendChild(D);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="50px";R.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));R.appendChild(D);var ea=ba.cloneNode(!0);R.appendChild(ea);mxEvent.addListener(ba,"focus",function(){aa.checked=!0});mxEvent.addListener(ea,"focus",function(){aa.checked=!0});mxEvent.addListener(ba,"change",
-L);mxEvent.addListener(ea,"change",L);if(null!=t.pages&&(X=t.pages.length,null!=t.currentPage))for(D=0;D<t.pages.length;D++)if(t.currentPage==t.pages[D]){Z=D+1;ba.value=Z;ea.value=Z;break}ba.setAttribute("max",X);ea.setAttribute("max",X);t.isPagesEnabled()?1<X&&(P.appendChild(R),aa.checked=!0):aa.checked=!0;mxUtils.br(R);var ja=document.createElement("input");ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.style.marginRight="8px";O.isSelectionEmpty()&&ja.setAttribute("disabled",
-"disabled");var fa=document.createElement("div");fa.style.marginBottom="10px";1==X?(ja.setAttribute("type","checkbox"),ja.style.marginBottom="12px",fa.appendChild(ja)):(ja.setAttribute("name","pages-printdialog"),ja.style.marginBottom="8px",R.appendChild(ja));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ja.parentNode.appendChild(D);1==X&&mxUtils.br(ja.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");
-ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");fa.appendChild(ra);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));fa.appendChild(D);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="50px";fa.appendChild(ma);mxEvent.addListener(ma,"focus",function(){ra.checked=!0});P.appendChild(fa);R=R.cloneNode(!1);var Ga=ra.cloneNode(!0);Ga.setAttribute("value","fit");ra.setAttribute("checked",
-"checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(Ga);R.appendChild(D);fa=document.createElement("table");fa.style.display="inline-block";var Fa=document.createElement("tbody"),ya=document.createElement("tr"),Ma=ya.cloneNode(!0),xa=document.createElement("td"),Ca=xa.cloneNode(!0),oa=xa.cloneNode(!0),Aa=xa.cloneNode(!0),La=xa.cloneNode(!0),ta=xa.cloneNode(!0);xa.style.textAlign="right";Aa.style.textAlign="right";mxUtils.write(xa,
-mxResources.get("fitTo"));var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("min","1");Da.setAttribute("type","number");Da.style.width="40px";Ca.appendChild(Da);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));oa.appendChild(D);mxUtils.write(Aa,mxResources.get("fitToBy"));var wa=Da.cloneNode(!0);La.appendChild(wa);mxEvent.addListener(Da,"focus",function(){Ga.checked=!0});mxEvent.addListener(wa,
-"focus",function(){Ga.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));ta.appendChild(D);ya.appendChild(xa);ya.appendChild(Ca);ya.appendChild(oa);Ma.appendChild(Aa);Ma.appendChild(La);Ma.appendChild(ta);Fa.appendChild(ya);Fa.appendChild(Ma);fa.appendChild(Fa);R.appendChild(fa);P.appendChild(R);R=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));
-R.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ja=PageSetupDialog.addPageFormatPanel(D,"printdialog",t.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));R.appendChild(D);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";R.appendChild(ka);P.appendChild(R);D=document.createElement("div");
-D.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});R.className="geBtn";t.editor.cancelFirst&&D.appendChild(R);t.isOffline()||(fa=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),fa.className="geBtn",D.appendChild(fa));PrintDialog.previewEnabled&&(fa=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),fa.className="geBtn",D.appendChild(fa));
-fa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});fa.className="geBtn gePrimaryBtn";D.appendChild(fa);t.editor.cancelFirst||D.appendChild(R);P.appendChild(D);this.container=P};var Q=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=
-this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Q.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 V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var t=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(D){}};W.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(t){}Editor.prototype.useCanvasForExport=
-!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+function(p,D,L){if(null!=D){var V=function(R){if(null!=R)if(L)for(var S=0;S<R.length;S++)D[R[S].name]=R[S];else for(var X in D){var Y=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==D[X].type){Y=!0;break}Y||delete D[X]}},O=this.editorUi.editor.graph.view.getState(p);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),V(O.shape.customProperties));p=p.getAttribute("customProperties");if(null!=p)try{V(JSON.parse(p))}catch(R){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var p=this.editorUi.getSelectionState();"image"!=p.style.shape&&!p.containsLabel&&0<p.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
+{},L=p.vertices,V=p.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<V.length;O++)this.findCommonProperties(V[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,p))}};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(p){this.addActions(p,["copyStyle","pasteStyle"]);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(p,D,L){function V(ra,Ba,Aa,Ka){da.getModel().beginUpdate();try{var ma=[],fa=[];if(null!=Aa.index){for(var ca=[],na=Aa.parentRow.nextSibling;na&&na.getAttribute("data-pName")==ra;)ca.push(na.getAttribute("data-pValue")),na=na.nextSibling;Aa.index<ca.length?null!=Ka?ca.splice(Ka,1):ca[Aa.index]=Ba:ca.push(Ba);null!=Aa.size&&ca.length>Aa.size&&(ca=ca.slice(0,Aa.size));Ba=ca.join(",");null!=Aa.countProperty&&(da.setCellStyles(Aa.countProperty,ca.length,
+da.getSelectionCells()),ma.push(Aa.countProperty),fa.push(ca.length))}da.setCellStyles(ra,Ba,da.getSelectionCells());ma.push(ra);fa.push(Ba);if(null!=Aa.dependentProps)for(ra=0;ra<Aa.dependentProps.length;ra++){var la=Aa.dependentPropsDefVal[ra],sa=Aa.dependentPropsVals[ra];if(sa.length>Ba)sa=sa.slice(0,Ba);else for(var ia=sa.length;ia<Ba;ia++)sa.push(la);sa=sa.join(",");da.setCellStyles(Aa.dependentProps[ra],sa,da.getSelectionCells());ma.push(Aa.dependentProps[ra]);fa.push(sa)}if("function"==typeof Aa.onChange)Aa.onChange(da,
+Ba);ba.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",fa,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function O(ra,Ba,Aa){var Ka=mxUtils.getOffset(p,!0),ma=mxUtils.getOffset(ra,!0);Ba.style.position="absolute";Ba.style.left=ma.x-Ka.x+"px";Ba.style.top=ma.y-Ka.y+"px";Ba.style.width=ra.offsetWidth+"px";Ba.style.height=ra.offsetHeight-(Aa?4:0)+"px";Ba.style.zIndex=5}function R(ra,Ba,Aa){var Ka=document.createElement("div");Ka.style.width="32px";Ka.style.height=
+"4px";Ka.style.margin="2px";Ka.style.border="1px solid black";Ka.style.background=Ba&&"none"!=Ba?Ba:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ba,function(ma){this.editorUi.pickColor(Ba,function(fa){Ka.style.background="none"==fa?"url('"+Dialog.prototype.noColorImage+"')":fa;V(ra,fa,Aa)});mxEvent.consume(ma)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ka);return btn}function S(ra,Ba,Aa,Ka,ma,fa,ca){null!=Ba&&(Ba=Ba.split(","),
+Z.push({name:ra,values:Ba,type:Aa,defVal:Ka,countProperty:ma,parentRow:fa,isDeletable:!0,flipBkg:ca}));btn=mxUtils.button("+",mxUtils.bind(ba,function(na){for(var la=fa,sa=0;null!=la.nextSibling;)if(la.nextSibling.getAttribute("data-pName")==ra)la=la.nextSibling,sa++;else break;var ia={type:Aa,parentRow:fa,index:sa,isDeletable:!0,defVal:Ka,countProperty:ma};sa=aa(ra,"",ia,0==sa%2,ca);V(ra,Ka,ia);la.parentNode.insertBefore(sa,la.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function X(ra,Ba,Aa,Ka,ma,fa,ca){if(0<ma){var na=Array(ma);Ba=null!=Ba?Ba.split(","):[];for(var la=0;la<ma;la++)na[la]=null!=Ba[la]?Ba[la]:null!=Ka?Ka:"";Z.push({name:ra,values:na,type:Aa,defVal:Ka,parentRow:fa,flipBkg:ca,size:ma})}return document.createElement("div")}function Y(ra,Ba,Aa){var Ka=document.createElement("input");Ka.type="checkbox";Ka.checked="1"==Ba;mxEvent.addListener(Ka,"change",function(){V(ra,Ka.checked?"1":"0",Aa)});return Ka}function aa(ra,
+Ba,Aa,Ka,ma){var fa=Aa.dispName,ca=Aa.type,na=document.createElement("tr");na.className="gePropRow"+(ma?"Dark":"")+(Ka?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",ra);na.setAttribute("data-pValue",Ba);Ka=!1;null!=Aa.index&&(na.setAttribute("data-index",Aa.index),fa=(null!=fa?fa:"")+"["+Aa.index+"]",Ka=!0);var la=document.createElement("td");la.className="gePropRowCell";fa=mxResources.get(fa,null,fa);mxUtils.write(la,fa);la.setAttribute("title",fa);Ka&&(la.style.textAlign="right");
+na.appendChild(la);la=document.createElement("td");la.className="gePropRowCell";if("color"==ca)la.appendChild(R(ra,Ba,Aa));else if("bool"==ca||"boolean"==ca)la.appendChild(Y(ra,Ba,Aa));else if("enum"==ca){var sa=Aa.enumList;for(ma=0;ma<sa.length;ma++)if(fa=sa[ma],fa.val==Ba){mxUtils.write(la,mxResources.get(fa.dispName,null,fa.dispName));break}mxEvent.addListener(la,"click",mxUtils.bind(ba,function(){var ia=document.createElement("select");O(la,ia);for(var ja=0;ja<sa.length;ja++){var pa=sa[ja],za=
+document.createElement("option");za.value=mxUtils.htmlEntities(pa.val);mxUtils.write(za,mxResources.get(pa.dispName,null,pa.dispName));ia.appendChild(za)}ia.value=Ba;p.appendChild(ia);mxEvent.addListener(ia,"change",function(){var Da=mxUtils.htmlEntities(ia.value);V(ra,Da,Aa)});ia.focus();mxEvent.addListener(ia,"blur",function(){p.removeChild(ia)})}))}else"dynamicArr"==ca?la.appendChild(S(ra,Ba,Aa.subType,Aa.subDefVal,Aa.countProperty,na,ma)):"staticArr"==ca?la.appendChild(X(ra,Ba,Aa.subType,Aa.subDefVal,
+Aa.size,na,ma)):"readOnly"==ca?(ma=document.createElement("input"),ma.setAttribute("readonly",""),ma.value=Ba,ma.style.width="96px",ma.style.borderWidth="0px",la.appendChild(ma)):(la.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ba)),mxEvent.addListener(la,"click",mxUtils.bind(ba,function(){function ia(){var pa=ja.value;pa=0==pa.length&&"string"!=ca?0:pa;Aa.allowAuto&&(null!=pa.trim&&"auto"==pa.trim().toLowerCase()?(pa="auto",ca="string"):(pa=parseFloat(pa),pa=isNaN(pa)?0:pa));null!=Aa.min&&pa<
+Aa.min?pa=Aa.min:null!=Aa.max&&pa>Aa.max&&(pa=Aa.max);pa=encodeURIComponent(("int"==ca?parseInt(pa):pa)+"");V(ra,pa,Aa)}var ja=document.createElement("input");O(la,ja,!0);ja.value=decodeURIComponent(Ba);ja.className="gePropEditor";"int"!=ca&&"float"!=ca||Aa.allowAuto||(ja.type="number",ja.step="int"==ca?"1":"any",null!=Aa.min&&(ja.min=parseFloat(Aa.min)),null!=Aa.max&&(ja.max=parseFloat(Aa.max)));p.appendChild(ja);mxEvent.addListener(ja,"keypress",function(pa){13==pa.keyCode&&ia()});ja.focus();mxEvent.addListener(ja,
+"blur",function(){ia()})})));Aa.isDeletable&&(ma=mxUtils.button("-",mxUtils.bind(ba,function(ia){V(ra,"",Aa,Aa.index);mxEvent.consume(ia)})),ma.style.height="16px",ma.style.width="25px",ma.style.float="right",ma.className="geColorBtn",la.appendChild(ma));na.appendChild(la);return na}var ba=this,da=this.editorUi.editor.graph,Z=[];p.style.position="relative";p.style.padding="0";var ha=document.createElement("table");ha.className="geProperties";ha.style.whiteSpace="nowrap";ha.style.width="100%";var ea=
+document.createElement("tr");ea.className="gePropHeader";var ua=document.createElement("th");ua.className="gePropHeaderCell";var ya=document.createElement("img");ya.src=Sidebar.prototype.expandedImage;ya.style.verticalAlign="middle";ua.appendChild(ya);mxUtils.write(ua,mxResources.get("property"));ea.style.cursor="pointer";var xa=function(){var ra=ha.querySelectorAll(".gePropNonHeaderRow");if(ba.editorUi.propertiesCollapsed){ya.src=Sidebar.prototype.collapsedImage;var Ba="none";for(var Aa=p.childNodes.length-
+1;0<=Aa;Aa--)try{var Ka=p.childNodes[Aa],ma=Ka.nodeName.toUpperCase();"INPUT"!=ma&&"SELECT"!=ma||p.removeChild(Ka)}catch(fa){}}else ya.src=Sidebar.prototype.expandedImage,Ba="";for(Aa=0;Aa<ra.length;Aa++)ra[Aa].style.display=Ba};mxEvent.addListener(ea,"click",function(){ba.editorUi.propertiesCollapsed=!ba.editorUi.propertiesCollapsed;xa()});ea.appendChild(ua);ua=document.createElement("th");ua.className="gePropHeaderCell";ua.innerHTML=mxResources.get("value");ea.appendChild(ua);ha.appendChild(ea);
+var va=!1,ka=!1;ea=null;1==L.vertices.length&&0==L.edges.length?ea=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ea=L.edges[0].id);null!=ea&&ha.appendChild(aa("id",mxUtils.htmlEntities(ea),{dispName:"ID",type:"readOnly"},!0,!1));for(var Na in D)if(ea=D[Na],"function"!=typeof ea.isVisible||ea.isVisible(L,this)){var Ia=null!=L.style[Na]?mxUtils.htmlEntities(L.style[Na]+""):null!=ea.getDefaultValue?ea.getDefaultValue(L,this):ea.defVal;if("separator"==ea.type)ka=!ka;else{if("staticArr"==
+ea.type)ea.size=parseInt(L.style[ea.sizeProperty]||D[ea.sizeProperty].defVal)||0;else if(null!=ea.dependentProps){var Ca=ea.dependentProps,oa=[],qa=[];for(ua=0;ua<Ca.length;ua++){var Ja=L.style[Ca[ua]];qa.push(D[Ca[ua]].subDefVal);oa.push(null!=Ja?Ja.split(","):[])}ea.dependentPropsDefVal=qa;ea.dependentPropsVals=oa}ha.appendChild(aa(Na,Ia,ea,va,ka));va=!va}}for(ua=0;ua<Z.length;ua++)for(ea=Z[ua],D=ea.parentRow,L=0;L<ea.values.length;L++)Na=aa(ea.name,ea.values[L],{type:ea.type,parentRow:ea.parentRow,
+isDeletable:ea.isDeletable,index:L,defVal:ea.defVal,countProperty:ea.countProperty,size:ea.size},0==L%2,ea.flipBkg),D.parentNode.insertBefore(Na,D.nextSibling),D=Na;p.appendChild(ha);xa();return p};StyleFormatPanel.prototype.addStyles=function(p){function D(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})}var L=this.editorUi,V=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";
+O.style.paddingLeft="24px";O.style.paddingRight="20px";p.style.paddingLeft="16px";p.style.paddingBottom="6px";p.style.position="relative";p.appendChild(O);var R="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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=
+document.createElement("div");aa.style.display="inline-block";aa.style.width="6px";aa.style.height="6px";aa.style.marginLeft="4px";aa.style.marginRight="3px";aa.style.borderRadius="3px";aa.style.cursor="pointer";aa.style.background="transparent";aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){ba(ea)}))})(Y);X.push(aa);S.appendChild(aa)}var ba=mxUtils.bind(this,function(ea){null!=X[ea]&&(null!=this.format.currentScheme&&
+null!=X[this.format.currentScheme]&&(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,da(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(ea){var ua=mxUtils.bind(this,function(xa){var va=mxUtils.button("",mxUtils.bind(this,function(Ia){V.getModel().beginUpdate();try{for(var Ca=L.getSelectionState().cells,oa=0;oa<Ca.length;oa++){for(var qa=V.getModel().getStyle(Ca[oa]),
+Ja=0;Ja<R.length;Ja++)qa=mxUtils.removeStylename(qa,R[Ja]);var ra=V.getModel().isVertex(Ca[oa])?V.defaultVertexStyle:V.defaultEdgeStyle;null!=xa?(mxEvent.isShiftDown(Ia)||(qa=""==xa.fill?mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,xa.fill||mxUtils.getValue(ra,mxConstants.STYLE_FILLCOLOR,null)),qa=mxUtils.setStyle(qa,mxConstants.STYLE_GRADIENTCOLOR,xa.gradient||mxUtils.getValue(ra,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ia)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(Ia)||!V.getModel().isVertex(Ca[oa])||(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FONTCOLOR,xa.font||mxUtils.getValue(ra,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ia)||(qa=""==xa.stroke?mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,xa.stroke||mxUtils.getValue(ra,mxConstants.STYLE_STROKECOLOR,null)))):(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ra,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),qa=mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ra,mxConstants.STYLE_STROKECOLOR,"#000000")),qa=mxUtils.setStyle(qa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ra,mxConstants.STYLE_GRADIENTCOLOR,null)),V.getModel().isVertex(Ca[oa])&&(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ra,mxConstants.STYLE_FONTCOLOR,null))));V.getModel().setStyle(Ca[oa],qa)}}finally{V.getModel().endUpdate()}}));va.className="geStyleButton";va.style.width="36px";
+va.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";va.style.margin="0px 6px 6px 0px";if(null!=xa){var ka="1"==urlParams.sketch?"2px solid":"1px solid";null!=xa.border&&(ka=xa.border);null!=xa.gradient?mxClient.IS_IE&&10>document.documentMode?va.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+xa.fill+"', EndColorStr='"+xa.gradient+"', GradientType=0)":va.style.backgroundImage="linear-gradient("+xa.fill+" 0px,"+xa.gradient+" 100%)":xa.fill==mxConstants.NONE?
+va.style.background="url('"+Dialog.prototype.noColorImage+"')":va.style.backgroundColor=""==xa.fill?mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):xa.fill||mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");va.style.border=xa.stroke==mxConstants.NONE?ka+" transparent":""==xa.stroke?ka+" "+mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?
+"#ffffff":Editor.darkColor):ka+" "+(xa.stroke||mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=xa.title&&va.setAttribute("title",xa.title)}else{ka=mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Na=mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");va.style.backgroundColor=ka;va.style.border="1px solid "+Na}va.style.borderRadius="0";O.appendChild(va)});O.innerText=
+"";for(var ya=0;ya<ea.length;ya++)0<ya&&0==mxUtils.mod(ya,4)&&mxUtils.br(O),ua(ea[ya])});null==this.format.currentScheme?ba(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ba(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var Z=document.createElement("div");Z.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Y+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Y+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(p.appendChild(Z),p.appendChild(ha));mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(Z);D(ha);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&p.appendChild(S);return p};StyleFormatPanel.prototype.addEditOps=function(p){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,V=null;1==D.cells.length&&(V=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),V.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),V.style.width="210px",V.style.marginBottom="2px",p.appendChild(V));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
+mxResources.get("editShape")),D.style.marginBottom="2px",null==V?D.style.width="210px":(V.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),p.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==V?D.style.width="210px":(V.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
+p.appendChild(D));return p}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(p){return p.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(p){return Graph.isGoogleFontUrl(p)};Graph.createFontElement=function(p,
+D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(p=document.createElement("link"),p.setAttribute("rel","stylesheet"),p.setAttribute("type","text/css"),p.setAttribute("charset","UTF-8"),p.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+p+'";\nsrc: url("'+D+'");\n}'),p=document.createElement("style"),mxUtils.write(p,L));return p};Graph.addFont=function(p,D,L){if(null!=p&&0<p.length&&null!=D&&0<D.length){var V=p.toLowerCase();if("helvetica"!=V&&"arial"!=p&&"sans-serif"!=
+V){var O=Graph.customFontElements[V];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:p,url:D,elt:Graph.createFontElement(p,O)},Graph.customFontElements[V]=O,Graph.recentCustomFonts[V]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
+return p};Graph.getFontUrl=function(p,D){p=Graph.customFontElements[p.toLowerCase()];null!=p&&(D=p.url);return D};Graph.processFontAttributes=function(p){p=p.getElementsByTagName("*");for(var D=0;D<p.length;D++){var L=p[D].getAttribute("data-font-src");if(null!=L){var V="FONT"==p[D].nodeName?p[D].getAttribute("face"):p[D].style.fontFamily;null!=V&&Graph.addFont(V,L)}}};Graph.processFontStyle=function(p){if(null!=p){var D=mxUtils.getValue(p,"fontSource",null);if(null!=D){var L=mxUtils.getValue(p,mxConstants.STYLE_FONTFAMILY,
+null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return p};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var q=Graph.prototype.init;Graph.prototype.init=function(){function p(O){D=O}q.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",p);mxEvent.addListener(this.container,"mousemove",p);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):L.apply(this,arguments)};var V=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom=
+R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return V.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(p,D){return Graph.processFontStyle(t.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(p,D,L,V,O,R,S,X,Y,aa,ba){x.apply(this,arguments);Graph.processFontAttributes(ba)};
+var E=mxText.prototype.redraw;mxText.prototype.redraw=function(){E.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(p,D,L){function V(){for(var ea=S.getSelectionCells(),ua=[],ya=0;ya<ea.length;ya++)S.isCellVisible(ea[ya])&&ua.push(ea[ya]);S.setSelectionCells(ua)}function O(ea){S.setHiddenTags(ea?[]:X.slice());V();S.refresh()}function R(ea,ua){aa.innerText="";if(0<ea.length){var ya=document.createElement("table");
+ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var xa=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var va=0;va<ea.length;va++)(function(ka){var Na=0>mxUtils.indexOf(S.hiddenTags,ka),Ia=document.createElement("tr"),Ca=document.createElement("td");Ca.style.align="center";Ca.style.width="16px";var oa=document.createElement("img");oa.setAttribute("src",Na?Editor.visibleImage:Editor.hiddenImage);oa.setAttribute("title",
+mxResources.get(Na?"hideIt":"show",[ka]));mxUtils.setOpacity(oa,Na?75:25);oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";Ca.appendChild(oa);mxEvent.addListener(oa,"click",function(Ja){mxEvent.isShiftDown(Ja)?O(0<=mxUtils.indexOf(S.hiddenTags,ka)):(S.toggleHiddenTag(ka),V(),S.refresh());mxEvent.consume(Ja)});Ia.appendChild(Ca);Ca=document.createElement("td");Ca.style.overflow="hidden";Ca.style.whiteSpace="nowrap";
+Ca.style.textOverflow="ellipsis";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.setAttribute("title",ka);a=document.createElement("a");mxUtils.write(a,ka);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Na?100:40);Ca.appendChild(a);mxEvent.addListener(Ca,"click",function(Ja){if(mxEvent.isShiftDown(Ja)){O(!0);var ra=S.getCellsForTags([ka],null,null,!0);S.isEnabled()?S.setSelectionCells(ra):S.highlightCells(ra)}else if(Na&&0<S.hiddenTags.length)O(!0);else{ra=
+X.slice();var Ba=mxUtils.indexOf(ra,ka);ra.splice(Ba,1);S.setHiddenTags(ra);V();S.refresh()}mxEvent.consume(Ja)});Ia.appendChild(Ca);if(S.isEnabled()){Ca=document.createElement("td");Ca.style.verticalAlign="middle";Ca.style.textAlign="center";Ca.style.width="18px";if(null==ua){Ca.style.align="center";Ca.style.width="16px";oa=document.createElement("img");oa.setAttribute("src",Editor.crossImage);oa.setAttribute("title",mxResources.get("removeIt",[ka]));mxUtils.setOpacity(oa,Na?75:25);oa.style.verticalAlign=
+"middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";mxEvent.addListener(oa,"click",function(Ja){var ra=mxUtils.indexOf(X,ka);0<=ra&&X.splice(ra,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[ka]);S.refresh();mxEvent.consume(Ja)});Ca.appendChild(oa)}else{var qa=document.createElement("input");qa.setAttribute("type","checkbox");qa.style.margin="0px";qa.defaultChecked=null!=ua&&0<=mxUtils.indexOf(ua,ka);qa.checked=qa.defaultChecked;
+qa.style.background="transparent";qa.setAttribute("title",mxResources.get(qa.defaultChecked?"removeIt":"add",[ka]));mxEvent.addListener(qa,"change",function(Ja){qa.checked?S.addTagsForCells(S.getSelectionCells(),[ka]):S.removeTagsForCells(S.getSelectionCells(),[ka]);mxEvent.consume(Ja)});Ca.appendChild(qa)}Ia.appendChild(Ca)}xa.appendChild(Ia)})(ea[va]);ya.appendChild(xa);aa.appendChild(ya)}}var S=this,X=S.hiddenTags.slice(),Y=document.createElement("div");Y.style.userSelect="none";Y.style.overflow=
+"hidden";Y.style.padding="10px";Y.style.height="100%";var aa=document.createElement("div");aa.style.boxSizing="border-box";aa.style.borderRadius="4px";aa.style.userSelect="none";aa.style.overflow="auto";aa.style.position="absolute";aa.style.left="10px";aa.style.right="10px";aa.style.top="10px";aa.style.border=S.isEnabled()?"1px solid #808080":"none";aa.style.bottom=S.isEnabled()?"48px":"10px";Y.appendChild(aa);var ba=mxUtils.button(mxResources.get("reset"),function(ea){S.setHiddenTags([]);mxEvent.isShiftDown(ea)||
+(X=S.hiddenTags.slice());V();S.refresh()});ba.setAttribute("title",mxResources.get("reset"));ba.className="geBtn";ba.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(ea){X=ea;Z()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var Z=mxUtils.bind(this,function(ea,ua){if(p()){ea=S.getAllTags();for(ua=0;ua<ea.length;ua++)0>mxUtils.indexOf(X,
+ea[ua])&&X.push(ea[ua]);X.sort();S.isSelectionEmpty()?R(X):R(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,Z);S.model.addListener(mxEvent.CHANGE,Z);S.addListener(mxEvent.REFRESH,Z);var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.whiteSpace="nowrap";ha.style.position="absolute";ha.style.overflow="hidden";ha.style.bottom="0px";ha.style.height="42px";ha.style.right="10px";ha.style.left="10px";S.isEnabled()&&(ha.appendChild(ba),
+ha.appendChild(da),Y.appendChild(ha));return{div:Y,refresh:Z}};Graph.prototype.getCustomFonts=function(){var p=this.extFonts;p=null!=p?p.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];p.push({name:L.name,url:L.url})}return p};Graph.prototype.setFont=function(p,D){Graph.addFont(p,D);document.execCommand("fontname",!1,p);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(p,D);for(var V=0;V<L.length;V++)L[V].getAttribute("face")==
+p&&L[V].getAttribute("data-font-src")!=D&&L[V].setAttribute("data-font-src",D)}};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var D in p)this.globalVars[D]=
+p[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var D=G.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[p]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(p.ownerDocument)).decode(p)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(p,D,L,V,O,R,S,X,Y,aa,ba,da,Z,ha){var ea=null,ua=null,ya=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ea=this.stylesheet,ua=this.shapeForegroundColor,ya=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var xa=y.apply(this,arguments),va=this.getCustomFonts();if(ba&&0<va.length){var ka=xa.ownerDocument,Na=null!=ka.createElementNS?ka.createElementNS(mxConstants.NS_SVG,"style"):ka.createElement("style");null!=ka.setAttributeNS?Na.setAttributeNS("type","text/css"):Na.setAttribute("type","text/css");for(var Ia="",Ca="",oa=0;oa<va.length;oa++){var qa=va[oa].name,Ja=va[oa].url;Graph.isCssFontUrl(Ja)?
+Ia+="@import url("+Ja+");\n":Ca+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+Ja+'");\n}\n'}Na.appendChild(ka.createTextNode(Ia+Ca));xa.getElementsByTagName("defs")[0].appendChild(Na)}this.mathEnabled&&(document.body.appendChild(xa),Editor.MathJaxRender(xa),xa.parentNode.removeChild(xa));null!=ea&&(this.shapeBackgroundColor=ya,this.shapeForegroundColor=ua,this.stylesheet=ea,this.refresh());return xa};var T=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(p){T.apply(this,
+arguments);null!=p.secondLabel&&(p.secondLabel.destroy(),p.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(p){return[p.shape,p.text,p.secondLabel,p.control]};var n=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){n.apply(this,arguments);this.enumerationState=0};var v=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(p){null!=p.shape&&this.redrawEnumerationState(p);return v.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(p){p=decodeURIComponent(mxUtils.getValue(p.style,"enumerateValue",""));""==p&&(p=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(p)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(p){var D="1"==mxUtils.getValue(p.style,"enumerate",0);D&&null==p.secondLabel?(p.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+p.secondLabel.size=12,p.secondLabel.state=p,p.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(p,p.secondLabel)):D||null==p.secondLabel||(p.secondLabel.destroy(),p.secondLabel=null);D=p.secondLabel;if(null!=D){var L=p.view.scale,V=this.createEnumerationValue(p);p=this.graph.model.isVertex(p.cell)?new mxRectangle(p.x+p.width-4*L,p.y+4*L,0,0):mxRectangle.fromPoint(p.view.getPoint(p));D.bounds.equals(p)&&D.value==V&&D.scale==L||(D.bounds=p,D.value=V,D.scale=
+L,D.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var p=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;",p.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,p.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(p){"data:action/json,"==p.substring(0,17)&&(p=JSON.parse(p.substring(17)),null!=
+p.actions&&this.executeCustomActions(p.actions))};Graph.prototype.executeCustomActions=function(p,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,V=0,O=0,R=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<V&&V--;0==V&&Y()}),Y=mxUtils.bind(this,function(){if(O<p.length){var aa=this.stoppingCustomActions,ba=p[O++],da=[];if(null!=ba.open)if(S(),this.isCustomLink(ba.open)){if(!this.customLinkClicked(ba.open))return}else this.openLink(ba.open);null==ba.wait||aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),V++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=ba.wait?parseInt(ba.wait):1E3),S());null!=ba.opacity&&null!=ba.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ba.opacity,!0)),ba.opacity.value);null!=ba.fadeIn&&(V++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeIn,!0)),0,1,X,aa?0:ba.fadeIn.delay));null!=ba.fadeOut&&(V++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeOut,!0)),1,0,X,aa?0:ba.fadeOut.delay));null!=ba.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeIn,
+!0),!0)));null!=ba.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeOut,!0),!1)));null!=ba.toggle&&(R(),this.toggleCells(this.getCellsForAction(ba.toggle,!0)));if(null!=ba.show){R();var Z=this.getCellsForAction(ba.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Z),1);this.setCellsVisible(Z,!0)}null!=ba.hide&&(R(),Z=this.getCellsForAction(ba.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Z),0),this.setCellsVisible(Z,!1));null!=ba.toggleStyle&&null!=ba.toggleStyle.key&&
+(R(),this.toggleCellStyles(ba.toggleStyle.key,null!=ba.toggleStyle.defaultValue?ba.toggleStyle.defaultValue:"0",this.getCellsForAction(ba.toggleStyle,!0)));null!=ba.style&&null!=ba.style.key&&(R(),this.setCellStyles(ba.style.key,ba.style.value,this.getCellsForAction(ba.style,!0)));Z=[];null!=ba.select&&this.isEnabled()&&(Z=this.getCellsForAction(ba.select),this.setSelectionCells(Z));null!=ba.highlight&&(Z=this.getCellsForAction(ba.highlight),this.highlightCells(Z,ba.highlight.color,ba.highlight.duration,
+ba.highlight.opacity));null!=ba.scroll&&(Z=this.getCellsForAction(ba.scroll));null!=ba.viewbox&&this.fitWindow(ba.viewbox,ba.viewbox.border);0<Z.length&&this.scrollCellToVisible(Z[0]);if(null!=ba.tags){Z=[];null!=ba.tags.hidden&&(Z=Z.concat(ba.tags.hidden));if(null!=ba.tags.visible)for(var ha=this.getAllTags(),ea=0;ea<ha.length;ea++)0>mxUtils.indexOf(ba.tags.visible,ha[ea])&&0>mxUtils.indexOf(Z,ha[ea])&&Z.push(ha[ea]);this.setHiddenTags(Z);this.refresh()}0<da.length&&(V++,this.executeAnimations(da,
+X,aa?1:ba.steps,aa?0:ba.delay));0==V?Y():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(p,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(p,L));if(this.isHtmlLabel(D)){var V=document.createElement("div");V.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=V.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),
+null!=L&&"data:action/json,"==L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(p,L)),R=!0);R&&this.labelChanged(D,V.innerHTML)}};Graph.prototype.updateCustomLink=function(p,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(p,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(V){}return D};Graph.prototype.updateCustomLinkActions=function(p,D){for(var L=0;L<D.length;L++){var V=D[L],O;for(O in V)this.updateCustomLinkAction(p,
+V[O],"cells"),this.updateCustomLinkAction(p,V[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(p,D,L){if(null!=D&&null!=D[L]){for(var V=[],O=0;O<D[L].length;O++)if("*"==D[L][O])V.push(D[L][O]);else{var R=p[D[L][O]];null!=R?""!=R&&V.push(R):V.push(D[L][O])}D[L]=V}};Graph.prototype.getCellsForAction=function(p,D){D=this.getCellsById(p.cells).concat(this.getCellsForTags(p.tags,null,D));if(null!=p.excludeCells){for(var L=[],V=0;V<D.length;V++)0>p.excludeCells.indexOf(D[V].id)&&L.push(D[V]);
+D=L}return D};Graph.prototype.getCellsById=function(p){var D=[];if(null!=p)for(var L=0;L<p.length;L++)if("*"==p[L]){var V=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(R){return R!=V},V))}else{var O=this.model.getCell(p[L]);null!=O&&D.push(O)}return D};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(p){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(p))};Graph.prototype.setHiddenTags=function(p){this.hiddenTags=p;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(p){var D=mxUtils.indexOf(this.hiddenTags,p);0>D?this.hiddenTags.push(p):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(p){if(null==p||0==p.length||0==this.hiddenTags.length)return!1;p=p.split(" ");if(p.length>this.hiddenTags.length)return!1;for(var D=0;D<p.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,p[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(p,D,L,
+V){var O=[];if(null!=p){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<p.length;X++)0<p[X].length&&(S[p[X]]=!0,R++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var Y=this.getTagsForCell(D[X]),aa=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=p.length)){for(var ba=aa=0;ba<Y.length&&aa<R;ba++)null!=S[Y[ba]]&&aa++;aa=aa==R}aa&&(1!=V||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(p){for(var D=null,L=[],V=0;V<p.length;V++){var O=this.getTagsForCell(p[V]);L=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])R[O[S]]=!0,L.push(O[S]);D=R}else return[]}return L};Graph.prototype.getTagsForCells=function(p){for(var D=[],L={},V=0;V<p.length;V++){var O=this.getTagsForCell(p[V]);if(0<O.length){O=O.split(" ");for(var R=
+0;R<O.length;R++)null==L[O[R]]&&(L[O[R]]=!0,D.push(O[R]))}}return D};Graph.prototype.getTagsForCell=function(p){return this.getAttributeForCell(p,"tags","")};Graph.prototype.addTagsForCells=function(p,D){if(0<p.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<p.length;L++){for(var V=this.getTagsForCell(p[L]),O=V.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(V=0<V.length?V+" "+X:X,R=!0)}R&&this.setAttributeForCell(p[L],"tags",V)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(p,D){if(0<p.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<p.length;L++){var V=this.getTagsForCell(p[L]);if(0<V.length){for(var O=V.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(p[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(p){this.model.beginUpdate();try{for(var D=0;D<p.length;D++)this.model.setVisible(p[D],!this.model.isVisible(p[D]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(p,D){this.model.beginUpdate();try{for(var L=0;L<p.length;L++)this.model.setVisible(p[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(p,D,L,V){for(var O=0;O<p.length;O++)this.highlightCell(p[O],D,L,V)};Graph.prototype.highlightCell=function(p,D,L,V,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;p=this.view.getState(p);var R=null;null!=p&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(p.style,mxConstants.STYLE_STROKEWIDTH,
+1)+O),R=new mxCellHighlight(this,D,O,!1),null!=V&&(R.opacity=V),R.highlight(p),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},L));return R};Graph.prototype.addSvgShadow=function(p,D,L,V){L=null!=L?L:!1;V=null!=V?V:!0;var O=p.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
+this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
+"offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
+S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=p.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=p.firstChild?p.insertBefore(O,p.firstChild):p.appendChild(O)):O=S[0];O.appendChild(R);L||(D=null!=D?D:p.getElementsByTagName("g")[0],
+null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(p.getAttribute("width")))&&V&&(p.setAttribute("width",parseInt(p.getAttribute("width"))+6),p.setAttribute("height",parseInt(p.getAttribute("height"))+6),D=p.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,p.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(p,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=
+null!=D?D:!0,(this.shadowVisible=p)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var p=this.model.getChildCount(this.model.root),D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<p&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};
+mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
+[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
+STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+
+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
+[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
+[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(p){var D=null;null!=p&&0<p.length&&("ER"==p.substring(0,2)?D="mxgraph.er":"sysML"==p.substring(0,5)&&(D="mxgraph.sysml"));return D};var M=mxMarker.createMarker;mxMarker.createMarker=function(p,D,L,V,O,R,S,X,Y,aa){if(null!=L&&null==mxMarker.markers[L]){var ba=this.getPackageForType(L);null!=ba&&mxStencilRegistry.getStencil(ba)}return M.apply(this,arguments)};var Q=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
+function(p,D,L,V,O,R){"1"==mxUtils.getValue(D.style,"lineShape",null)&&p.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return Q.apply(this,arguments)};PrintDialog.prototype.create=function(p,D){function L(){Z.value=Math.max(1,Math.min(X,Math.max(parseInt(Z.value),parseInt(da.value))));da.value=Math.max(1,Math.min(X,Math.min(parseInt(Z.value),parseInt(da.value))))}function V(fa){function ca(Ga,La,Ma){var Pa=Ga.useCssTransforms,Ra=Ga.currentTranslate,Ua=Ga.currentScale,
+Ha=Ga.view.translate,Ta=Ga.view.scale;Ga.useCssTransforms&&(Ga.useCssTransforms=!1,Ga.currentTranslate=new mxPoint(0,0),Ga.currentScale=1,Ga.view.translate=new mxPoint(0,0),Ga.view.scale=1);var Sa=Ga.getGraphBounds(),Wa=0,$a=0,Xa=Ka.get(),ab=1/Ga.pageScale,Za=xa.checked;if(Za){ab=parseInt(Ba.value);var gb=parseInt(Aa.value);ab=Math.min(Xa.height*gb/(Sa.height/Ga.view.scale),Xa.width*ab/(Sa.width/Ga.view.scale))}else ab=parseInt(ya.value)/(100*Ga.pageScale),isNaN(ab)&&(na=1/Ga.pageScale,ya.value="100 %");
+Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ga.pageVisible?(Sa=Ga.getPageLayout(),Wa-=Sa.x*Xa.width,$a-=Sa.y*Xa.height):Za=!0;if(null==La){La=PrintDialog.createPrintPreview(Ga,ab,Xa,0,Wa,$a,Za);La.pageSelector=!1;La.mathEnabled=!1;ha.checked&&(La.isCellVisible=function(Ya){return Ga.isCellSelected(Ya)});Wa=p.getCurrentFile();null!=Wa&&(La.title=Wa.getTitle());var hb=La.writeHead;La.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
+(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=p.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(p.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ga.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
+(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=La.renderPage;La.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
+Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());La.open(null,null,Ma,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ga.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";La.backgroundColor=Xa;La.autoOrigin=Za;La.appendGraph(Ga,
+ab,Wa,$a,Ma,!0);Ma=Ga.getCustomFonts();if(null!=La.wnd)for(Wa=0;Wa<Ma.length;Wa++)$a=Ma[Wa].name,Za=Ma[Wa].url,Graph.isCssFontUrl(Za)?La.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(La.wnd.document.writeln('<style type="text/css">'),La.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),La.wnd.document.writeln("</style>"))}Pa&&(Ga.useCssTransforms=Pa,
+Ga.currentTranslate=Ra,Ga.currentScale=Ua,Ga.view.translate=Ha,Ga.view.scale=Ta);return La}var na=parseInt(ma.value)/100;isNaN(na)&&(na=1,ma.value="100 %");na*=.75;var la=null,sa=O.shapeForegroundColor,ia=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(la=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ja=da.value,pa=Z.value,za=!aa.checked,Da=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(p,
+aa.checked,ja,pa,xa.checked,Ba.value,Aa.value,parseInt(ya.value)/100,parseInt(ma.value)/100,Ka.get());else{za&&(za=ha.checked||ja==Y&&pa==Y);if(!za&&null!=p.pages&&p.pages.length){var Fa=0;za=p.pages.length-1;aa.checked||(Fa=parseInt(ja)-1,za=parseInt(pa)-1);for(var Ea=Fa;Ea<=za;Ea++){var wa=p.pages[Ea];ja=wa==p.currentPage?O:null;if(null==ja){ja=p.createTemporaryGraph(O.stylesheet);ja.shapeForegroundColor=O.shapeForegroundColor;ja.shapeBackgroundColor=O.shapeBackgroundColor;pa=!0;Fa=!1;var ta=null,
+Oa=null;null==wa.viewState&&null==wa.root&&p.updatePageRoot(wa);null!=wa.viewState&&(pa=wa.viewState.pageVisible,Fa=wa.viewState.mathEnabled,ta=wa.viewState.background,Oa=wa.viewState.backgroundImage,ja.extFonts=wa.viewState.extFonts);null!=Oa&&null!=Oa.originalSrc&&(Oa=p.createImageForPageLink(Oa.originalSrc,wa));ja.background=ta;ja.backgroundImage=null!=Oa?new mxImage(Oa.src,Oa.width,Oa.height,Oa.x,Oa.y):null;ja.pageVisible=pa;ja.mathEnabled=Fa;var Qa=ja.getGraphBounds;ja.getGraphBounds=function(){var Ga=
+Qa.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Ma=this.view.translate,Pa=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Ma.x+La.x)*Pa,(Ma.y+La.y)*Pa,La.width*Pa,La.height*Pa))}return Ga};var Va=ja.getGlobalVariable;ja.getGlobalVariable=function(Ga){return"page"==Ga?wa.getName():"pagenumber"==Ga?Ea+1:"pagecount"==Ga?null!=p.pages?p.pages.length:1:Va.apply(this,arguments)};document.body.appendChild(ja.container);p.updatePageRoot(wa);
+ja.model.setRoot(wa.root)}Da=ca(ja,Da,Ea!=za);ja!=O&&ja.container.parentNode.removeChild(ja.container)}}else Da=ca(O);null==Da?p.handleError({message:mxResources.get("errorUpdatingPreview")}):(Da.mathEnabled&&(za=Da.wnd.document,fa&&(Da.wnd.IMMEDIATE_PRINT=!0),za.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Da.closeDocument(),!Da.mathEnabled&&fa&&PrintDialog.printPreview(Da));null!=la&&(O.shapeForegroundColor=sa,O.shapeBackgroundColor=ia,O.stylesheet=
+la,O.refresh())}}var O=p.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));R.appendChild(S);var X=1,Y=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var aa=document.createElement("input");aa.style.cssText="margin-right:8px;margin-bottom:8px;";aa.setAttribute("value","all");aa.setAttribute("type",
+"radio");aa.setAttribute("name","pages-printdialog");S.appendChild(aa);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));S.appendChild(D);mxUtils.br(S);var ba=aa.cloneNode(!0);aa.setAttribute("checked","checked");ba.setAttribute("value","range");S.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");S.appendChild(D);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type",
+"number");da.setAttribute("min","1");da.style.width="50px";S.appendChild(da);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var Z=da.cloneNode(!0);S.appendChild(Z);mxEvent.addListener(da,"focus",function(){ba.checked=!0});mxEvent.addListener(Z,"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",L);mxEvent.addListener(Z,"change",L);if(null!=p.pages&&(X=p.pages.length,null!=p.currentPage))for(D=0;D<p.pages.length;D++)if(p.currentPage==p.pages[D]){Y=
+D+1;da.value=Y;Z.value=Y;break}da.setAttribute("max",X);Z.setAttribute("max",X);p.isPagesEnabled()?1<X&&(R.appendChild(S),ba.checked=!0):ba.checked=!0;mxUtils.br(S);var ha=document.createElement("input");ha.setAttribute("value","all");ha.setAttribute("type","radio");ha.style.marginRight="8px";O.isSelectionEmpty()&&ha.setAttribute("disabled","disabled");var ea=document.createElement("div");ea.style.marginBottom="10px";1==X?(ha.setAttribute("type","checkbox"),ha.style.marginBottom="12px",ea.appendChild(ha)):
+(ha.setAttribute("name","pages-printdialog"),ha.style.marginBottom="8px",S.appendChild(ha));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ha.parentNode.appendChild(D);1==X&&mxUtils.br(ha.parentNode);var ua=document.createElement("input");ua.style.marginRight="8px";ua.setAttribute("value","adjust");ua.setAttribute("type","radio");ua.setAttribute("name","printZoom");ea.appendChild(ua);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));
+ea.appendChild(D);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","100 %");ya.style.width="50px";ea.appendChild(ya);mxEvent.addListener(ya,"focus",function(){ua.checked=!0});R.appendChild(ea);S=S.cloneNode(!1);var xa=ua.cloneNode(!0);xa.setAttribute("value","fit");ua.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(xa);S.appendChild(D);ea=
+document.createElement("table");ea.style.display="inline-block";var va=document.createElement("tbody"),ka=document.createElement("tr"),Na=ka.cloneNode(!0),Ia=document.createElement("td"),Ca=Ia.cloneNode(!0),oa=Ia.cloneNode(!0),qa=Ia.cloneNode(!0),Ja=Ia.cloneNode(!0),ra=Ia.cloneNode(!0);Ia.style.textAlign="right";qa.style.textAlign="right";mxUtils.write(Ia,mxResources.get("fitTo"));var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("min",
+"1");Ba.setAttribute("type","number");Ba.style.width="40px";Ca.appendChild(Ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));oa.appendChild(D);mxUtils.write(qa,mxResources.get("fitToBy"));var Aa=Ba.cloneNode(!0);Ja.appendChild(Aa);mxEvent.addListener(Ba,"focus",function(){xa.checked=!0});mxEvent.addListener(Aa,"focus",function(){xa.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));ra.appendChild(D);ka.appendChild(Ia);
+ka.appendChild(Ca);ka.appendChild(oa);Na.appendChild(qa);Na.appendChild(Ja);Na.appendChild(ra);va.appendChild(ka);va.appendChild(Na);ea.appendChild(va);S.appendChild(ea);R.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ka=PageSetupDialog.addPageFormatPanel(D,"printdialog",p.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="60px";S.appendChild(ma);R.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){p.hideDialog()});S.className="geBtn";p.editor.cancelFirst&&
+D.appendChild(S);p.isOffline()||(ea=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ea.className="geBtn",D.appendChild(ea));PrintDialog.previewEnabled&&(ea=mxUtils.button(mxResources.get("preview"),function(){p.hideDialog();V(!1)}),ea.className="geBtn",D.appendChild(ea));ea=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){p.hideDialog();V(!0)});ea.className="geBtn gePrimaryBtn";D.appendChild(ea);p.editor.cancelFirst||
+D.appendChild(S);R.appendChild(D);this.container=R};var P=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var p=this.image;null!=p&&null!=p.src&&Graph.isPageLink(p.src)&&(p={originalSrc:p.src});this.page.viewState.backgroundImage=p}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else P.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 U=document.createElement("canvas"),W=new Image;W.onload=function(){try{U.getContext("2d").drawImage(W,0,0);var p=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=p&&6<p.length}catch(D){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}Editor.prototype.useCanvasForExport=
+!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,n,q,p,y){p=null!=p?p:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var A=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=A+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
-encodeURIComponent(n):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(C){}try{y||null==window.console||console.error(p,d,g,k,n,q)}catch(C){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
-function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,
-d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(f,g,l,q,t,x,E){x=null!=x?x:0<=f.indexOf("NetworkError")||0<=f.indexOf("SecurityError")||0<=f.indexOf("NS_ERROR_FAILURE")||0<=f.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(f!=EditorUi.lastErrorMessage&&(null==f||null==g||-1==f.indexOf("Script error")&&-1==f.indexOf("extension"))&&null!=f&&0>f.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=f;var F=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(f);(new Image).src=F+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(f)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=q?":colno:"+
+encodeURIComponent(q):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(G){}try{E||null==window.console||console.error(x,f,g,l,q,t)}catch(G){}};EditorUi.logEvent=function(f){if("1"==urlParams.dev)EditorUi.debug("logEvent",f);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=f?"&data="+encodeURIComponent(JSON.stringify(f)):"")}catch(l){}};EditorUi.sendReport=
+function(f,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",f);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,f.length>g&&(f=f.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(f))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var f=[(new Date).toISOString()],g=0;g<arguments.length;g++)f.push(arguments[g]);console.log.apply(console,
+f)}}catch(l){}};EditorUi.removeChildNodes=function(f){for(;null!=f.firstChild;)f.removeChild(f.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var q=
-g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(p){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
-d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=q.spin;q.spin=function(A,C){var B=!1;this.active||(p.call(this,A),this.active=!0,null!=C&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"),
-B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,d)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),B.innerHTML=C,A.appendChild(B),q.status=B),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(A,C)}));this.stop();return I}),B=!0);return B};var y=q.stop;q.stop=function(){y.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
-3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,q=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var y=q.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<y&&q.movePage(y,y-1)};if(38==p.keyCode)return function(){0<y&&q.movePage(y,0)};if(39==p.keyCode)return function(){y<q.pages.length-1&&q.movePage(y,
-y+1)};if(40==p.keyCode)return function(){y<q.pages.length-1&&q.movePage(y,q.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<y&&q.selectNextPage(!1)};if(38==p.keyCode)return function(){0<y&&q.selectPage(q.pages[0])};if(39==p.keyCode)return function(){y<q.pages.length-1&&q.selectNextPage(!0)};if(40==p.keyCode)return function(){y<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
-n.isSelectionEmpty()||mxEvent.isAltDown(p)||mxEvent.isShiftDown(p)||mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)?k.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("&lt;mxfile ");if(0<=k){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>k&&(g=d.substring(k,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var q=mxUtils.parseXml(d),p=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(y){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=n.length-1;0<=q;q--){var p=this.updatePageRoot(new DiagramPage(n[q]));null==p.getName()&&
-p.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,p,0==q?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=k)for(q=0;q<k.length;q++)g.model.execute(new ChangePage(this,k[q],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,q,p,y,A,C,B,I){g=null!=g?g:this.editor.graph;q=null!=q?q:!1;C=null!=C?C:!0;var M=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var G="_blank";else M=G=n;if(null==d)return"";var S=d;if("mxfile"!=S.nodeName.toLowerCase()){if(I){var u=d.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());
-u.appendChild(d)}else{u=Graph.zapGremlins(mxUtils.getXml(d));S=Graph.compress(u);if(Graph.decompress(S)!=u)return u;u=d.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());mxUtils.setTextContent(u,S)}S=d.ownerDocument.createElement("mxfile");S.appendChild(u)}B?(S=S.cloneNode(!0),S.removeAttribute("modified"),S.removeAttribute("host"),S.removeAttribute("agent"),S.removeAttribute("etag"),S.removeAttribute("userAgent"),S.removeAttribute("version"),S.removeAttribute("editor"),S.removeAttribute("type")):
-(S.removeAttribute("userAgent"),S.removeAttribute("version"),S.removeAttribute("editor"),S.removeAttribute("pages"),S.removeAttribute("type"),mxClient.IS_CHROMEAPP?S.setAttribute("host","Chrome"):EditorUi.isElectronApp?S.setAttribute("host","Electron"):S.setAttribute("host",window.location.hostname),S.setAttribute("modified",(new Date).toISOString()),S.setAttribute("agent",navigator.appVersion),S.setAttribute("version",EditorUi.VERSION),S.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,
-null!=d&&S.setAttribute("type",d),1<S.getElementsByTagName("diagram").length&&null!=this.pages&&S.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(S):mxUtils.getXml(S);if(!p&&!q&&(y||null!=k&&/(\.html)$/i.test(k.getTitle())))I=this.getHtml2(mxUtils.getXml(S),g,null!=k?k.getTitle():null,G,M);else if(p||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),I=this.getEmbeddedSvg(I,g,n,null,A,C,M);return I};EditorUi.prototype.getXmlFileData=
-function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var q=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var B=C.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&C.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?C=C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,
-Graph.compressNode(B)));q.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],y=p.node;if(p!=this.currentPage)if(p.needsUpdate){var A=new mxCodec(mxUtils.createXmlDocument());A=A.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,A,null,n);EditorUi.removeChildNodes(y);mxUtils.setTextContent(y,
-Graph.compressNode(A));delete p.needsUpdate}else n&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(A=new mxCodec(mxUtils.createXmlDocument()),
-A=A.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,A,null,n),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(A))));d(y)}return q};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var q=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(q)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){d[EditorUi.DIFF_INSERT][g].data=
-p.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][n];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(g=mxUtils.bind(this,function(p){var y=q.cells[p];if(null!=y){for(var A in y)null!=y[A].value&&(y[A].value="["+y[A].value.length+"]"),null!=y[A].xmlValue&&(y[A].xmlValue="["+y[A].xmlValue.length+"]"),null!=y[A].style&&(y[A].style="["+y[A].style.length+"]"),mxUtils.isEmptyObject(y[A])&&delete y[A];mxUtils.isEmptyObject(y)&&
-delete q.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=
-0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=
-g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
-this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,q,p,y,A,C,B,I){q=null!=q?q:!0;p=null!=p?p:!1;var M=this.editor.graph;if(g||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var G=
-null!=M.themes&&"darkTheme"==M.defaultThemeName;B=!1;if(G||null!=this.pages&&this.currentPage!=this.pages[0]){var S=M.getGlobalVariable;M=this.createTemporaryGraph(G?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var u=this.pages[0];this.currentPage==u?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&M.setBackgroundImage(u.viewState.backgroundImage);M.getGlobalVariable=
-function(z){return"page"==z?u.getName():"pagenumber"==z?1:S.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(u.root)}}y=null!=y?y:this.getXmlFileData(q,p,B,I);C=null!=C?C:this.getCurrentFile();d=this.createFileData(y,M,C,window.location.href,d,g,k,n,q,A,B);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,q,p){p=null!=p?p:!0;var y=null,A=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){y=
-p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var C=g.view.scale;p=Math.floor(y.x/C-g.view.translate.x);C=Math.floor(y.y/C-g.view.translate.y);y=g.background;null==q&&(g=this.getBasenames().join(";"),0<g.length&&(A=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",p);d.setAttribute("y0",C)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",
-n));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
-q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+A+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,n,q){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+
-g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var n=0;n<d.length;n++)null==d[n].getAttribute("id")&&d[n].setAttribute("id",n),g=new DiagramPage(d[n]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
-[n+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");g={};for(n=0;n<q.length;n++)g[q[n]]=!0;var p=this.editor.graph.getModel(),y=p.getChildren(p.root);for(n=0;n<y.length;n++){var A=y[n];p.setVisible(A,g[A.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
-/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,n,q,p,y,A,C,B,I,M){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename("remoteSvg"==d?
-!1:!q),S=G+("xml"==d||"pdf"==d&&I?".drawio":"")+"."+d;if("xml"==d){var u=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,q,null,null,null,g);this.saveData(S,d,u,"text/xml")}else if("html"==d)u=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(S,d,u,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)S=G+".png";else if("jpeg"==d)S=G+".jpg";else if("remoteSvg"==d){S=G+".svg";d="svg";var z=parseInt(C);
-"string"===typeof A&&0<A.indexOf("%")&&(A=parseInt(A)/100);if(0<z){var F=this.editor.graph,J=F.getGraphBounds();var K=Math.ceil(J.width*A/F.view.scale+2*z);var H=Math.ceil(J.height*A/F.view.scale+2*z)}}this.saveRequest(S,d,mxUtils.bind(this,function(W,t){try{var D=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(W,d,n,t,y,q,A,C,B,I,M,K,H);this.editor.graph.pageVisible=D;return L}catch(T){this.handleError(T)}}))}else{var N=null,U=mxUtils.bind(this,
-function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(S,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});if("svg"==d){var Q=this.editor.graph.background;if(y||Q==mxConstants.NONE)Q=null;var V=this.editor.graph.getSvg(Q,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else S=G+".svg",N=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,q,p,y,A,C,B,I,M,G){var S=this.editor.graph,u=S.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var z="",F="";if(u.width*u.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-B=B?"1":"0";"pdf"==g&&(null!=I?F="&from="+I.from+"&to="+I.to:0==p&&(F="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){z="&from="+p;break}p=S.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!q?q||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;q={globalVars:S.getExportVariables()};C&&(q.grid={size:S.gridSize,steps:S.view.gridSteps,color:S.view.gridColor});Graph.translateDiagram&&
-(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+z+F+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=y?"&scale="+y:"")+(null!=A?"&border="+A:"")+(M&&isFinite(M)?"&w="+M:"")+(G&&isFinite(G)?"&h="+G:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var n=
-window.location.hash,q=mxUtils.bind(this,function(y){var A=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<A.length&&(A+="\n"),A+=y);y=new LocalFile(this,"csv"!=d.format&&0<A.length?A:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return n};this.fileLoaded(y);"csv"==d.format&&this.importCsv(A,mxUtils.bind(this,function(G){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=
-null!=d.interval?parseInt(d.interval):6E4,B=null,I=mxUtils.bind(this,function(){var G=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(S){G===this.currentPage&&(200<=S.getStatus()&&300>=S.getStatus()?(this.updateDiagram(S.getText()),M()):this.handleError({message:mxResources.get("error")+" "+S.getStatus()}))}),mxUtils.bind(this,function(S){this.handleError(S)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(B);
-B=window.setTimeout(I,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();I()}));M();I()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var p=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(p,mxUtils.bind(this,function(y){q(y)}),mxUtils.bind(this,function(y){null!=k&&k(y)}))}else q("")};EditorUi.prototype.updateDiagram=function(d){function g(H){var N=new mxCellOverlay(H.image||q.warningImage,H.tooltip,H.align,H.valign,H.offset);N.addListener(mxEvent.CLICK,function(U,
-Q){n.alert(H.tooltip)});return N}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,p=q.getModel();p.beginUpdate();var y=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var A=p.getCell(d.getAttribute("id"));if(null!=A){try{var C=d.getAttribute("value");if(null!=C){var B=mxUtils.parseXml(C).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(A,B);else for(var I=
-B.attributes,M=0;M<I.length;M++)q.setAttributeForCell(A,I[M].nodeName,0<I[M].nodeValue.length?I[M].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+A.id+": "+H)}try{var G=d.getAttribute("style");null!=G&&q.model.setStyle(A,G)}catch(H){null!=window.console&&console.log("Error in style for "+A.id+": "+H)}try{var S=d.getAttribute("icon");if(null!=S){var u=0<S.length?JSON.parse(S):null;null!=u&&u.append||q.removeCellOverlays(A);null!=u&&q.addCellOverlay(A,g(u))}}catch(H){null!=
-window.console&&console.log("Error in icon for "+A.id+": "+H)}try{var z=d.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var F=q.getCellGeometry(A);if(null!=F){F=F.clone();for(key in z){var J=parseFloat(z[key]);"dx"==key?F.x+=J:"dy"==key?F.y+=J:"dw"==key?F.width+=J:"dh"==key?F.height+=J:F[key]=parseFloat(z[key])}q.model.setGeometry(A,F)}}}catch(H){null!=window.console&&console.log("Error in icon for "+A.id+": "+H)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
-K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,p)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(y=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{p.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
-y)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var q=new Date;k=q.getFullYear();n=q.getMonth()+1;var p=q.getDate(),y=q.getHours(),A=q.getMinutes();q=q.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+y+"-"+A+"-"+q))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=
-this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&
-(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();
-delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
-this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=d.getMode()){var p="1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),
-action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=
-y;if(null!=d)try{d.close()}catch(A){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(A){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||q():q()});g?d():this.handleError(y,mxResources.get("errorLoadingFile"),d,!0,null,null,
-!0)}else q();return n};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,q=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<d.length;p++){this.updatePageRoot(d[p]);var y=d[p].node.cloneNode(!1);y.removeAttribute("name");n.root=d[p].root;var A=q.encode(n);this.editor.graph.saveViewState(d[p].viewState,A,!0);A.removeAttribute("pageWidth");A.removeAttribute("pageHeight");y.appendChild(A);null!=g&&(g.eltCount+=y.getElementsByTagName("*").length,
-g.nodeCount+=y.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(y,function(C,B,I,M){return!M||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?M&&"mxCell"==C.nodeName&&"previous"==B?null:I:Math.round(I)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,
-g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var p=d.attributes[q].name,y=null!=g?g(d,p,d.attributes[q].value,!0):d.attributes[q].value;null!=y&&(n^=this.hashValue(p,g,k)+this.hashValue(y,g,k))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)n=(n<<5)-n+this.hashValue(d.childNodes[q],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(q=0;q<d.length;q++)g=(g<<5)-g+d.charCodeAt(q)<<
-0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,q,p,y){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var n=k.previousSibling;g.insertBefore(k,d);g.insertBefore(n,k)};EditorUi.prototype.loadLibrary=
-function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,g,k,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&
-(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var p=null,y=mxUtils.bind(this,function(K,H){0==K.length&&d.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),H.appendChild(p)):this.addLibraryEntries(K,H)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,
-k.lastIndexOf("."))));var A=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(K){y(g,K)}));this.repositionLibrary(q);var C=A.parentNode.previousSibling;n=C.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=d.title&&C.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";C.style.position="relative";var I=
-document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var M=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var H=
-mxUtils.bind(this,function(){this.closeLibrary(d)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(K)}}));if(d.isEditable()){var G=this.editor.graph,S=null,u=mxUtils.bind(this,function(K){this.showLibraryDialog(d.getTitle(),A,g,d,d.getMode());mxEvent.consume(K)}),z=mxUtils.bind(this,function(K){d.setModified(!0);d.isAutosave()?(null!=S&&null!=S.parentNode&&S.parentNode.removeChild(S),S=I.cloneNode(!1),
-S.setAttribute("src",Editor.spinImage),S.setAttribute("title",mxResources.get("saving")),S.style.cursor="default",S.style.marginRight="2px",S.style.marginTop="-2px",B.insertBefore(S,B.firstChild),C.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=S&&null!=S.parentNode&&(S.parentNode.removeChild(S),C.style.paddingRight=18*B.childNodes.length+"px")})):null==M&&(M=I.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",
-mxResources.get("save")),B.insertBefore(M,B.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==M||d.isModified()||(C.style.paddingRight=18*B.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(H)})),C.style.paddingRight=18*B.childNodes.length+"px")}),F=mxUtils.bind(this,function(K,H,N,U){K=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(K)));for(var Q=
-0;Q<K.length;Q++){var V=G.getCellGeometry(K[Q]);null!=V&&V.translate(-H.x,-H.y)}A.appendChild(this.sidebar.createVertexTemplateFromCells(K,H.width,H.height,U||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:H.width,h:H.height};null!=U&&(K.title=U);g.push(K);z(N);null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)}),J=mxUtils.bind(this,function(K){if(G.isSelectionEmpty())G.getRubberband().isActive()?(G.getRubberband().execute(K),G.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=G.getSelectionCells(),N=G.view.getBounds(H),U=G.view.scale;N.x/=U;N.y/=U;N.width/=U;N.height/=U;N.x-=G.view.translate.x;N.y-=G.view.translate.y;F(H,N)}mxEvent.consume(K)});mxEvent.addGestureListeners(A,function(){},mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler.first&&(G.graphHandler.suspend(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility=
-"hidden"),A.style.backgroundColor="#f1f3f4",A.style.cursor="copy",G.panningManager.stop(),G.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler&&(A.style.backgroundColor="",A.style.cursor="default",this.sidebar.showTooltips=!0,G.panningManager.stop(),G.graphHandler.reset(),G.isMouseDown=!1,G.autoScroll=!0,J(K),mxEvent.consume(K))}));mxEvent.addListener(A,"mouseleave",mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.graphHandler.first&&
-(G.graphHandler.resume(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="visible"),A.style.backgroundColor="",A.style.cursor="",G.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(K){A.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";A.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(K){A.style.cursor="";A.style.backgroundColor=
-"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,N,U,Q,V,W,t,D,L){if(null!=H&&"image/"==N.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,V,W),H)],H[0].vertex=!0,F(H,new mxRectangle(0,0,V,W),K,mxEvent.isAltDown(K)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&&
-(p.parentNode.removeChild(p),p=null);else{var T=!1,O=mxUtils.bind(this,function(P,R){null!=P&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(P),null!=R&&0<R.length&&(P=R));if(null!=P)if(P=mxUtils.parseXml(P),"mxlibrary"==P.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(P.documentElement));y(X,A);g=g.concat(X);z(K);this.spinner.stop();T=!0}catch(ba){}else if("mxfile"==P.documentElement.nodeName)try{var Z=P.documentElement.getElementsByTagName("diagram");for(X=0;X<Z.length;X++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(Z[X])),aa=this.editor.graph.getBoundingBoxFromGeometry(Y);F(Y,new mxRectangle(0,0,aa.width,aa.height),K)}T=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}T||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(L,function(P){O(P,
-"text/xml")},null,t):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,t)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(P){4==P.readyState&&(this.spinner.stop(),200<=P.status&&299>=P.status?O(P.responseText,"text/xml"):this.handleError({message:mxResources.get(413==P.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(H,N)}}));
-K.stopPropagation();K.preventDefault()})),mxEvent.addListener(A,"dragleave",function(K){A.style.cursor="";A.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));B.insertBefore(I,B.firstChild);mxEvent.addListener(I,"click",u);mxEvent.addListener(A,"dblclick",function(K){mxEvent.getSource(K)==A&&u(K)});n=I.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
-mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",J);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),B.insertBefore(n,B.firstChild))}C.appendChild(B);
-C.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var n=d[k],q=n.data;if(null!=q){q=this.convertDataUri(q);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+q,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(q=this.stringToCells(Graph.decompress(n.xml)),0<q.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(q,
-n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var f=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!f.getContext||!f.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),l=new Image;l.onload=function(){try{g.getContext("2d").drawImage(l,0,0);var t=
+g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(x){}};l.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(t){}try{g=document.createElement("canvas");g.width=g.height=1;var q=g.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(f,g,l){return this.editor.graph.openLink(f,g,l)};EditorUi.prototype.showSplash=function(f){};EditorUi.prototype.getLocalData=function(f,g){g(localStorage.getItem(f))};EditorUi.prototype.setLocalData=function(f,g,l){localStorage.setItem(f,g);null!=l&&l()};EditorUi.prototype.removeLocalData=function(f,g){localStorage.removeItem(f);g()};EditorUi.prototype.setShareCursorPosition=function(f){this.shareCursorPosition=
+f;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(f){this.showRemoteCursors=f;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(f){this.editor.graph.mathEnabled=f;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=f;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(f){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(f){return this.isOfflineApp()||!navigator.onLine||!f&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(f,g,l){var q=null==f||null==g;l=null!=l?l:24;var t=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=t.spin;t.spin=function(F,G){var y=!1;this.active||(x.call(this,F),this.active=!0,null!=G&&(q&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,f=document.body.clientWidth/2-2),y=document.createElement("div"),
+y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,f)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=G.substring(G.length-3,G.length)&&"!"!=G.charAt(G.length-1)&&(G+="..."),y.innerHTML=G,F.appendChild(y),t.status=y),this.pause=mxUtils.bind(this,function(){var T=function(){};this.active&&(T=mxUtils.bind(this,function(){this.spin(F,G)}));this.stop();return T}),y=!0);return y};var E=t.stop;t.stop=function(){E.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};
+return t};EditorUi.prototype.isCompatibleString=function(f){try{var g=mxUtils.parseXml(f),l=this.editor.extractGraphModel(g.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(f){return 8<f.length&&(208==f.charCodeAt(0)&&207==f.charCodeAt(1)&&17==f.charCodeAt(2)&&224==f.charCodeAt(3)&&161==f.charCodeAt(4)&&177==f.charCodeAt(5)&&26==f.charCodeAt(6)&&225==f.charCodeAt(7)||80==f.charCodeAt(0)&&75==f.charCodeAt(1)&&
+3==f.charCodeAt(2)&&4==f.charCodeAt(3)||80==f.charCodeAt(0)&&75==f.charCodeAt(1)&&3==f.charCodeAt(2)&&6==f.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(f){return 8<f.length&&(208==f.charCodeAt(0)&&207==f.charCodeAt(1)&&17==f.charCodeAt(2)&&224==f.charCodeAt(3)&&161==f.charCodeAt(4)&&177==f.charCodeAt(5)&&26==f.charCodeAt(6)&&225==f.charCodeAt(7)||60==f.charCodeAt(0)&&63==f.charCodeAt(1)&&120==f.charCodeAt(2)&&109==f.charCodeAt(3)&&108==f.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(f){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=g.getFunction,q=this.editor.graph,t=this;g.getFunction=function(x){if(q.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var E=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<E&&t.movePage(E,E-1)};if(38==x.keyCode)return function(){0<E&&t.movePage(E,0)};if(39==x.keyCode)return function(){E<t.pages.length-1&&t.movePage(E,
+E+1)};if(40==x.keyCode)return function(){E<t.pages.length-1&&t.movePage(E,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<E&&t.selectNextPage(!1)};if(38==x.keyCode)return function(){0<E&&t.selectPage(t.pages[0])};if(39==x.keyCode)return function(){E<t.pages.length-1&&t.selectNextPage(!0)};if(40==x.keyCode)return function(){E<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||
+q.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?l.apply(this,arguments):null}}return g};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(f){var g=d.apply(this,arguments);if(null==g)try{var l=f.indexOf("&lt;mxfile ");if(0<=l){var q=f.lastIndexOf("&lt;/mxfile&gt;");q>l&&(g=f.substring(l,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var t=mxUtils.parseXml(f),x=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(E){}return g};EditorUi.prototype.validateFileData=function(f){if(null!=f&&0<f.length){var g=f.indexOf('<meta charset="utf-8">');0<=g&&(f=f.slice(0,g)+'<meta charset="utf-8"/>'+f.slice(g+23-1,f.length));f=Graph.zapGremlins(f)}return f};EditorUi.prototype.replaceFileData=function(f){f=this.validateFileData(f);
+f=null!=f&&0<f.length?mxUtils.parseXml(f).documentElement:null;var g=null!=f?this.editor.extractGraphModel(f,!0):null;null!=g&&(f=g);if(null!=f){g=this.editor.graph;g.model.beginUpdate();try{var l=null!=this.pages?this.pages.slice():null,q=f.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=f;this.pages=null!=this.pages?this.pages:[];for(var t=q.length-1;0<=t;t--){var x=this.updatePageRoot(new DiagramPage(q[t]));null==x.getName()&&
+x.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,x,0==t?x:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(f),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=l)for(t=0;t<l.length;t++)g.model.execute(new ChangePage(this,l[t],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(f,g,l,q,t,x,E,F,G,y,T){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;G=null!=G?G:!0;var n=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else n=v=q;if(null==f)return"";var H=f;if("mxfile"!=H.nodeName.toLowerCase()){if(T){var K=f.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());
+K.appendChild(f)}else{K=Graph.zapGremlins(mxUtils.getXml(f));H=Graph.compress(K);if(Graph.decompress(H)!=K)return K;K=f.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,H)}H=f.ownerDocument.createElement("mxfile");H.appendChild(K)}y?(H=H.cloneNode(!0),H.removeAttribute("modified"),H.removeAttribute("host"),H.removeAttribute("agent"),H.removeAttribute("etag"),H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("type")):
+(H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("pages"),H.removeAttribute("type"),mxClient.IS_CHROMEAPP?H.setAttribute("host","Chrome"):EditorUi.isElectronApp?H.setAttribute("host","Electron"):H.setAttribute("host",window.location.hostname),H.setAttribute("modified",(new Date).toISOString()),H.setAttribute("agent",navigator.appVersion),H.setAttribute("version",EditorUi.VERSION),H.setAttribute("etag",Editor.guid()),f=null!=l?l.getMode():this.mode,
+null!=f&&H.setAttribute("type",f),1<H.getElementsByTagName("diagram").length&&null!=this.pages&&H.setAttribute("pages",this.pages.length));T=T?mxUtils.getPrettyXml(H):mxUtils.getXml(H);if(!x&&!t&&(E||null!=l&&/(\.html)$/i.test(l.getTitle())))T=this.getHtml2(mxUtils.getXml(H),g,null!=l?l.getTitle():null,v,n);else if(x||!t&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(q=null),T=this.getEmbeddedSvg(T,g,q,null,F,G,n);return T};EditorUi.prototype.getXmlFileData=
+function(f,g,l,q){f=null!=f?f:!0;g=null!=g?g:!1;l=null!=l?l:!Editor.compressXml;var t=this.editor.getGraphXml(f,q);if(f&&null!=this.fileNode&&null!=this.currentPage)if(f=function(G){var y=G.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&l?(y=mxUtils.trim(mxUtils.getTextContent(G)),G=G.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&G.appendChild(mxUtils.parseXml(y).documentElement))):null==y||l?G=G.cloneNode(!0):(G=G.cloneNode(!1),mxUtils.setTextContent(G,
+Graph.compressNode(y)));t.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),g)f(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],E=x.node;if(x!=this.currentPage)if(x.needsUpdate){var F=new mxCodec(mxUtils.createXmlDocument());F=F.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,F,null,q);EditorUi.removeChildNodes(E);mxUtils.setTextContent(E,
+Graph.compressNode(F));delete x.needsUpdate}else q&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(F=new mxCodec(mxUtils.createXmlDocument()),
+F=F.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,F,null,q),E=E.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(F))));f(E)}return t};EditorUi.prototype.anonymizeString=function(f,g){for(var l=[],q=0;q<f.length;q++){var t=f.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?l.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(t)?l.push(" "):l.push("?"):l.push(g?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(f){if(null!=f[EditorUi.DIFF_INSERT])for(var g=0;g<f[EditorUi.DIFF_INSERT].length;g++)try{var l=mxUtils.parseXml(f[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));f[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(l)}catch(x){f[EditorUi.DIFF_INSERT][g].data=
+x.message}if(null!=f[EditorUi.DIFF_UPDATE]){for(var q in f[EditorUi.DIFF_UPDATE]){var t=f[EditorUi.DIFF_UPDATE][q];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(x){var E=t.cells[x];if(null!=E){for(var F in E)null!=E[F].value&&(E[F].value="["+E[F].value.length+"]"),null!=E[F].xmlValue&&(E[F].xmlValue="["+E[F].xmlValue.length+"]"),null!=E[F].style&&(E[F].style="["+E[F].style.length+"]"),mxUtils.isEmptyObject(E[F])&&delete E[F];mxUtils.isEmptyObject(E)&&
+delete t.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete f[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(f[EditorUi.DIFF_UPDATE])&&delete f[EditorUi.DIFF_UPDATE]}return f};EditorUi.prototype.anonymizeAttributes=function(f,g){if(null!=f.attributes)for(var l=0;l<f.attributes.length;l++)"as"!=f.attributes[l].name&&f.setAttribute(f.attributes[l].name,this.anonymizeString(f.attributes[l].value,g));if(null!=f.childNodes)for(l=
+0;l<f.childNodes.length;l++)this.anonymizeAttributes(f.childNodes[l],g)};EditorUi.prototype.anonymizeNode=function(f,g){g=f.getElementsByTagName("mxCell");for(var l=0;l<g.length;l++)null!=g[l].getAttribute("value")&&g[l].setAttribute("value","["+g[l].getAttribute("value").length+"]"),null!=g[l].getAttribute("xmlValue")&&g[l].setAttribute("xmlValue","["+g[l].getAttribute("xmlValue").length+"]"),null!=g[l].getAttribute("style")&&g[l].setAttribute("style","["+g[l].getAttribute("style").length+"]"),null!=
+g[l].parentNode&&"root"!=g[l].parentNode.nodeName&&null!=g[l].parentNode.parentNode&&(g[l].setAttribute("id",g[l].parentNode.getAttribute("id")),g[l].parentNode.parentNode.replaceChild(g[l],g[l].parentNode));return f};EditorUi.prototype.synchronizeCurrentFile=function(f){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!f&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
+this.editor.setStatus(""),f?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){g.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(f,g,l,q,t,x,E,F,G,y,T){t=null!=t?t:!0;x=null!=x?x:!1;var n=this.editor.graph;if(g||!f&&null!=G&&/(\.svg)$/i.test(G.getTitle())){var v=
+null!=n.themes&&"darkTheme"==n.defaultThemeName;y=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var H=n.getGlobalVariable;n=this.createTemporaryGraph(v?n.getDefaultStylesheet():n.getStylesheet());n.setBackgroundImage=this.editor.graph.setBackgroundImage;n.background=this.editor.graph.background;var K=this.pages[0];this.currentPage==K?n.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&n.setBackgroundImage(K.viewState.backgroundImage);n.getGlobalVariable=
+function(N){return"page"==N?K.getName():"pagenumber"==N?1:H.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(K.root)}}E=null!=E?E:this.getXmlFileData(t,x,y,T);G=null!=G?G:this.getCurrentFile();f=this.createFileData(E,n,G,window.location.href,f,g,l,q,t,F,y);n!=this.editor.graph&&n.container.parentNode.removeChild(n.container);return f};EditorUi.prototype.getHtml=function(f,g,l,q,t,x){x=null!=x?x:!0;var E=null,F=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){E=
+x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;x=Math.floor(E.x/G-g.view.translate.x);G=Math.floor(E.y/G-g.view.translate.y);E=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(F=EditorUi.drawHost+"/embed.js?s="+g));f.setAttribute("x0",x);f.setAttribute("y0",G)}null!=f&&(f.setAttribute("pan","1"),f.setAttribute("zoom","1"),f.setAttribute("resize","0"),f.setAttribute("fit","0"),f.setAttribute("border","20"),f.setAttribute("links","1"),null!=q&&f.setAttribute("edit",
+q));null!=t&&(t=t.replace(/&/g,"&amp;"));f=null!=f?Graph.zapGremlins(mxUtils.getXml(f)):"";q=Graph.compress(f);Graph.decompress(q)!=f&&(q=encodeURIComponent(f));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+
+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=E&&E!=mxConstants.NONE?' style="background-color:'+E+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+q+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+F+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(f,g,l,q,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));f={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(f),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\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(f))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+
+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(f){f=this.validateFileData(f);this.pages=this.fileNode=this.currentPage=null;var g=null!=f&&0<f.length?mxUtils.parseXml(f).documentElement:null,l=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",
+[this],"data",[f],"node",[g],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");f=null!=g?this.editor.extractGraphModel(g,!0):null;null!=f&&(g=f);if(null!=g&&"mxfile"==g.nodeName&&(f=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<f.length||1==f.length&&f[0].hasAttribute("name"))){l=null;this.fileNode=g;this.pages=[];for(var q=0;q<f.length;q++)null==f[q].getAttribute("id")&&f[q].setAttribute("id",q),g=new DiagramPage(f[q]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
+[q+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(l=g);this.currentPage=null!=l?l:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");g={};for(q=0;q<t.length;q++)g[t[q]]=!0;var x=this.editor.graph.getModel(),E=x.getChildren(x.root);for(q=0;q<E.length;q++){var F=E[q];x.setVisible(F,g[F.id]||!1)}}catch(G){}};EditorUi.prototype.getBaseFilename=function(f){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
+/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!f&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(f,g,l,q,t,x,E,F,G,y,T,n){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==f?
+!1:!t),H=v+("xml"==f||"pdf"==f&&T?".drawio":"")+"."+f;if("xml"==f){var K=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,t,null,null,null,g);this.saveData(H,f,K,"text/xml")}else if("html"==f)K=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(H,f,K,"text/html");else if("svg"!=f&&"xmlsvg"!=f||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==f)H=v+".png";else if("jpeg"==f)H=v+".jpg";else if("remoteSvg"==f){H=v+".svg";f="svg";var N=parseInt(G);
+"string"===typeof F&&0<F.indexOf("%")&&(F=parseInt(F)/100);if(0<N){var I=this.editor.graph,M=I.getGraphBounds();var Q=Math.ceil(M.width*F/I.view.scale+2*N);var P=Math.ceil(M.height*F/I.view.scale+2*N)}}this.saveRequest(H,f,mxUtils.bind(this,function(L,V){try{var O=this.editor.graph.pageVisible;0==x&&(this.editor.graph.pageVisible=x);var R=this.createDownloadRequest(L,f,q,V,E,t,F,G,y,T,n,Q,P);this.editor.graph.pageVisible=O;return R}catch(S){this.handleError(S)}}))}else{var U=null,W=mxUtils.bind(this,
+function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==f){var p=this.editor.graph.background;if(E||p==mxConstants.NONE)p=null;var D=this.editor.graph.getSvg(p,null,null,null,null,q);l&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();W(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else H=v+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();W(L)}),q)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(f,g,l,q,t,x,E,F,G,y,T,n,v){var H=this.editor.graph,K=H.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==x?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var N="",I="";if(K.width*K.height>MAX_AREA||l.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+y=y?"1":"0";"pdf"==g&&(null!=T?I="&from="+T.from+"&to="+T.to:0==x&&(I="&allPages=1"));"xmlpng"==g&&(y="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){N="&from="+x;break}x=H.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:H.getExportVariables()};G&&(t.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});Graph.translateDiagram&&
+(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+N+I+"&bg="+(null!=x?x:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(l)+(null!=f?"&filename="+encodeURIComponent(f):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=E?"&scale="+E:"")+(null!=F?"&border="+F:"")+(n&&isFinite(n)?"&w="+n:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(f,g){this.mode=f};EditorUi.prototype.loadDescriptor=function(f,g,l){var q=
+window.location.hash,t=mxUtils.bind(this,function(E){var F=null!=f.data?f.data:"";null!=E&&0<E.length&&(0<F.length&&(F+="\n"),F+=E);E=new LocalFile(this,"csv"!=f.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);E.getHash=function(){return q};this.fileLoaded(E);"csv"==f.format&&this.importCsv(F,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=f.update){var G=
+null!=f.interval?parseInt(f.interval):6E4,y=null,T=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(f.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(H){v===this.currentPage&&(200<=H.getStatus()&&300>=H.getStatus()?(this.updateDiagram(H.getText()),n()):this.handleError({message:mxResources.get("error")+" "+H.getStatus()}))}),mxUtils.bind(this,function(H){this.handleError(H)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(y);
+y=window.setTimeout(T,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();T()}));n();T()}null!=g&&g()});if(null!=f.url&&0<f.url.length){var x=this.editor.getProxiedUrl(f.url);this.editor.loadUrl(x,mxUtils.bind(this,function(E){t(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else t("")};EditorUi.prototype.updateDiagram=function(f){function g(P){var U=new mxCellOverlay(P.image||t.warningImage,P.tooltip,P.align,P.valign,P.offset);U.addListener(mxEvent.CLICK,function(W,
+p){q.alert(P.tooltip)});return U}var l=null,q=this;if(null!=f&&0<f.length&&(l=mxUtils.parseXml(f),f=null!=l?l.documentElement:null,null!=f&&"updates"==f.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var E=null;try{for(f=f.firstChild;null!=f;){if("update"==f.nodeName){var F=x.getCell(f.getAttribute("id"));if(null!=F){try{var G=f.getAttribute("value");if(null!=G){var y=mxUtils.parseXml(G).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))x.setValue(F,y);else for(var T=
+y.attributes,n=0;n<T.length;n++)t.setAttributeForCell(F,T[n].nodeName,0<T[n].nodeValue.length?T[n].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+F.id+": "+P)}try{var v=f.getAttribute("style");null!=v&&t.model.setStyle(F,v)}catch(P){null!=window.console&&console.log("Error in style for "+F.id+": "+P)}try{var H=f.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=K&&K.append||t.removeCellOverlays(F);null!=K&&t.addCellOverlay(F,g(K))}}catch(P){null!=
+window.console&&console.log("Error in icon for "+F.id+": "+P)}try{var N=f.getAttribute("geometry");if(null!=N){N=JSON.parse(N);var I=t.getCellGeometry(F);if(null!=I){I=I.clone();for(key in N){var M=parseFloat(N[key]);"dx"==key?I.x+=M:"dy"==key?I.y+=M:"dw"==key?I.width+=M:"dh"==key?I.height+=M:I[key]=parseFloat(N[key])}t.model.setGeometry(F,I)}}}catch(P){null!=window.console&&console.log("Error in icon for "+F.id+": "+P)}}}else if("model"==f.nodeName){for(var Q=f.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=
+Q.nextSibling;null!=Q&&(new mxCodec(f.firstChild)).decode(Q,x)}else if("view"==f.nodeName){if(f.hasAttribute("scale")&&(t.view.scale=parseFloat(f.getAttribute("scale"))),f.hasAttribute("dx")||f.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(f.getAttribute("dx")||0),parseFloat(f.getAttribute("dy")||0))}else"fit"==f.nodeName&&(E=f.hasAttribute("max-scale")?parseFloat(f.getAttribute("max-scale")):1);f=f.nextSibling}}finally{x.endUpdate()}null!=E&&this.chromelessResize&&this.chromelessResize(!0,
+E)}return l};EditorUi.prototype.getCopyFilename=function(f,g){var l=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;f="";var q=l.lastIndexOf(".");0<=q&&(f=l.substring(q),l=l.substring(0,q));if(g){g=l;var t=new Date;l=t.getFullYear();q=t.getMonth()+1;var x=t.getDate(),E=t.getHours(),F=t.getMinutes();t=t.getSeconds();l=g+(" "+(l+"-"+q+"-"+x+"-"+E+"-"+F+"-"+t))}return l=mxResources.get("copyOf",[l])+f};EditorUi.prototype.fileLoaded=function(f,g){var l=this.getCurrentFile();this.fileEditable=
+this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=l&&(EditorUi.debug("File.closed",[l]),l.removeListener(this.descriptorChangedListener),l.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=l&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&
+(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=f)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(f);f.addListener("descriptorChanged",this.descriptorChangedListener);f.addListener("contentChanged",this.descriptorChangedListener);f.open();
+delete this.openingFile;this.setGraphEnabled(!0);this.setMode(f.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();f.isEditable()?f.isModified()?(f.addUnsavedStatus(),null!=f.backupPatch&&f.patch([f.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
+this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=f.getMode()){var x="1"==urlParams.sketch?"sketch":uiTheme;if(null==x)x="default";else if("sketch"==x||"min"==x)x+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:f.getMode().toUpperCase()+"-OPEN-FILE-"+f.getHash(),
+action:"size_"+f.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+x})}EditorUi.debug("File.opened",[f]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==f.getMode()&&f.getMode()!=App.MODE_DEVICE&&null!=f.getMode())try{this.addRecent({id:f.getHash(),title:f.getTitle(),mode:f.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=
+E;if(null!=f)try{f.close()}catch(F){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=f?f.getHash():"none"),action:"message_"+E.message,label:"stack_"+E.stack})}catch(F){}f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=l?this.fileLoaded(l)||t():t()});g?f():this.handleError(E,mxResources.get("errorLoadingFile"),f,!0,null,null,
+!0)}else t();return q};EditorUi.prototype.getHashValueForPages=function(f,g){var l=0,q=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<f.length;x++){this.updatePageRoot(f[x]);var E=f[x].node.cloneNode(!1);E.removeAttribute("name");q.root=f[x].root;var F=t.encode(q);this.editor.graph.saveViewState(f[x].viewState,F,!0);F.removeAttribute("pageWidth");F.removeAttribute("pageHeight");E.appendChild(F);null!=g&&(g.eltCount+=E.getElementsByTagName("*").length,
+g.nodeCount+=E.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(E,function(G,y,T,n){return!n||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?n&&"mxCell"==G.nodeName&&"previous"==y?null:T:Math.round(T)},g)<<0}return l};EditorUi.prototype.hashValue=function(f,g,l){var q=0;if(null!=f&&"object"===typeof f&&"number"===typeof f.nodeType&&"string"===typeof f.nodeName&&"function"===typeof f.getAttribute){null!=f.nodeName&&(q^=this.hashValue(f.nodeName,
+g,l));if(null!=f.attributes){null!=l&&(l.attrCount+=f.attributes.length);for(var t=0;t<f.attributes.length;t++){var x=f.attributes[t].name,E=null!=g?g(f,x,f.attributes[t].value,!0):f.attributes[t].value;null!=E&&(q^=this.hashValue(x,g,l)+this.hashValue(E,g,l))}}if(null!=f.childNodes)for(t=0;t<f.childNodes.length;t++)q=(q<<5)-q+this.hashValue(f.childNodes[t],g,l)<<0}else if(null!=f&&"function"!==typeof f){f=String(f);g=0;null!=l&&(l.byteCount+=f.length);for(t=0;t<f.length;t++)g=(g<<5)-g+f.charCodeAt(t)<<
+0;q^=g}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(f,g,l,q,t,x,E){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(f){null==f&&(f=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+f,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(f){var g=mxUtils.createXmlDocument(),l=g.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(f));g.appendChild(l);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(f){null!=f&&(this.removeLibrarySidebar(f.getHash()),f.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(f.getHash()),".scratchpad"==f.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(f){var g=this.sidebar.palettes[f];if(null!=g){for(var l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);delete this.sidebar.palettes[f]}};EditorUi.prototype.repositionLibrary=function(f){var g=this.sidebar.container;if(null==f){var l=this.sidebar.palettes["L.scratchpad"];null==l&&(l=this.sidebar.palettes.search);null!=l&&(f=l[l.length-1].nextSibling)}f=null!=f?f:g.firstChild.nextSibling.nextSibling;l=g.lastChild;var q=l.previousSibling;g.insertBefore(l,f);g.insertBefore(q,l)};EditorUi.prototype.loadLibrary=
+function(f,g){var l=mxUtils.parseXml(f.getData());if("mxlibrary"==l.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(f,q,l.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(f){return""};EditorUi.prototype.libraryLoaded=function(f,g,l,q){if(null!=this.sidebar){f.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(f.getHash());".scratchpad"==f.title&&
+(this.scratchpad=f);var t=this.sidebar.palettes[f.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(f.getHash());var x=null,E=mxUtils.bind(this,function(Q,P){0==Q.length&&f.isEditable()?(null==x&&(x=document.createElement("div"),x.className="geDropTarget",mxUtils.write(x,mxResources.get("dragElementsHere"))),P.appendChild(x)):this.addLibraryEntries(Q,P)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==l&&(l=f.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,
+l.lastIndexOf("."))));var F=this.sidebar.addPalette(f.getHash(),l,null!=q?q:!0,mxUtils.bind(this,function(Q){E(g,Q)}));this.repositionLibrary(t);var G=F.parentNode.previousSibling;q=G.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=f.title&&G.setAttribute("title",this.getLibraryStorageHint(f)+"\n"+q);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";G.style.position="relative";var T=
+document.createElement("img");T.className="geAdaptiveAsset";T.setAttribute("src",Editor.crossImage);T.setAttribute("title",mxResources.get("close"));T.setAttribute("valign","absmiddle");T.setAttribute("border","0");T.style.position="relative";T.style.top="2px";T.style.width="14px";T.style.cursor="pointer";T.style.margin="0 3px";var n=null;if(".scratchpad"!=f.title||this.closableScratchpad)y.appendChild(T),mxEvent.addListener(T,"click",mxUtils.bind(this,function(Q){if(!mxEvent.isConsumed(Q)){var P=
+mxUtils.bind(this,function(){this.closeLibrary(f)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,P,mxResources.get("cancel"),mxResources.get("discardChanges")):P();mxEvent.consume(Q)}}));if(f.isEditable()){var v=this.editor.graph,H=null,K=mxUtils.bind(this,function(Q){this.showLibraryDialog(f.getTitle(),F,g,f,f.getMode());mxEvent.consume(Q)}),N=mxUtils.bind(this,function(Q){f.setModified(!0);f.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=T.cloneNode(!1),
+H.setAttribute("src",Editor.spinImage),H.setAttribute("title",mxResources.get("saving")),H.style.cursor="default",H.style.marginRight="2px",H.style.marginTop="-2px",y.insertBefore(H,y.firstChild),G.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(f.getTitle(),g,f,f.getMode(),!0,!0,function(){null!=H&&null!=H.parentNode&&(H.parentNode.removeChild(H),G.style.paddingRight=18*y.childNodes.length+"px")})):null==n&&(n=T.cloneNode(!1),n.setAttribute("src",Editor.saveImage),n.setAttribute("title",
+mxResources.get("save")),y.insertBefore(n,y.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(P){this.saveLibrary(f.getTitle(),g,f,f.getMode(),f.constructor==LocalLibrary,!0,function(){null==n||f.isModified()||(G.style.paddingRight=18*y.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(P)})),G.style.paddingRight=18*y.childNodes.length+"px")}),I=mxUtils.bind(this,function(Q,P,U,W){Q=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(Q)));for(var p=
+0;p<Q.length;p++){var D=v.getCellGeometry(Q[p]);null!=D&&D.translate(-P.x,-P.y)}F.appendChild(this.sidebar.createVertexTemplateFromCells(Q,P.width,P.height,W||"",!0,null,!1));Q={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(Q))),w:P.width,h:P.height};null!=W&&(Q.title=W);g.push(Q);N(U);null!=x&&null!=x.parentNode&&0<g.length&&(x.parentNode.removeChild(x),x=null)}),M=mxUtils.bind(this,function(Q){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(Q),v.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var P=v.getSelectionCells(),U=v.view.getBounds(P),W=v.view.scale;U.x/=W;U.y/=W;U.width/=W;U.height/=W;U.x-=v.view.translate.x;U.y-=v.view.translate.y;I(P,U)}mxEvent.consume(Q)});mxEvent.addGestureListeners(F,function(){},mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility=
+"hidden"),F.style.backgroundColor="#f1f3f4",F.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(Q))}),mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(F.style.backgroundColor="",F.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,M(Q),mxEvent.consume(Q))}));mxEvent.addListener(F,"mouseleave",mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.graphHandler.first&&
+(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),F.style.backgroundColor="",F.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(Q){F.style.backgroundColor="#f1f3f4";Q.dataTransfer.dropEffect="copy";F.style.cursor="copy";this.sidebar.hideTooltip();Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(F,"drop",mxUtils.bind(this,function(Q){F.style.cursor="";F.style.backgroundColor=
+"";0<Q.dataTransfer.files.length&&this.importFiles(Q.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(P,U,W,p,D,L,V,O,R){if(null!=P&&"image/"==U.substring(0,6))P="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(P),P=[new mxCell("",new mxGeometry(0,0,D,L),P)],P[0].vertex=!0,I(P,new mxRectangle(0,0,D,L),Q,mxEvent.isAltDown(Q)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=x&&null!=x.parentNode&&0<g.length&&
+(x.parentNode.removeChild(x),x=null);else{var S=!1,X=mxUtils.bind(this,function(Y,aa){null!=Y&&"application/pdf"==aa&&(aa=Editor.extractGraphModelFromPdf(Y),null!=aa&&0<aa.length&&(Y=aa));if(null!=Y)if(Y=mxUtils.parseXml(Y),"mxlibrary"==Y.documentElement.nodeName)try{var ba=JSON.parse(mxUtils.getTextContent(Y.documentElement));E(ba,F);g=g.concat(ba);N(Q);this.spinner.stop();S=!0}catch(ea){}else if("mxfile"==Y.documentElement.nodeName)try{var da=Y.documentElement.getElementsByTagName("diagram");for(ba=
+0;ba<da.length;ba++){var Z=this.stringToCells(Editor.getDiagramNodeXml(da[ba])),ha=this.editor.graph.getBoundingBoxFromGeometry(Z);I(Z,new mxRectangle(0,0,ha.width,ha.height),Q)}S=!0}catch(ea){null!=window.console&&console.log("error in drop handler:",ea)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=x&&null!=x.parentNode&&0<g.length&&(x.parentNode.removeChild(x),x=null)});null!=R&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?
+this.importVisio(R,function(Y){X(Y,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(P,V)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(Y){4==Y.readyState&&(this.spinner.stop(),200<=Y.status&&299>=Y.status?X(Y.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+X(P,U)}}));Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(F,"dragleave",function(Q){F.style.cursor="";F.style.backgroundColor="";Q.stopPropagation();Q.preventDefault()}));T=T.cloneNode(!1);T.setAttribute("src",Editor.editImage);T.setAttribute("title",mxResources.get("edit"));y.insertBefore(T,y.firstChild);mxEvent.addListener(T,"click",K);mxEvent.addListener(F,"dblclick",function(Q){mxEvent.getSource(Q)==F&&K(Q)});q=T.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title",
+mxResources.get("add"));y.insertBefore(q,y.firstChild);mxEvent.addListener(q,"click",M);this.isOffline()||".scratchpad"!=f.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(Q){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(Q)})),y.insertBefore(q,y.firstChild))}G.appendChild(y);
+G.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(f,g){for(var l=0;l<f.length;l++){var q=f[l],t=q.data;if(null!=t){t=this.convertDataUri(t);var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(x+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(x+"image="+t,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(t=this.stringToCells(Graph.decompress(q.xml)),0<t.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(t,
+q.w,q.h,q.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(f){return null!=f?f[mxLanguage]||f.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
-"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
-typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,q,p,y){d=new ImageDialog(this,d,g,k,n,q,p,y);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),
-k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,n,q){d=new LibraryDialog(this,d,g,k,n,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);
-this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=
-g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,n,q,p,y){var A=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{y?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(S){}if(null!=C||null!=g){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),I=null;g=null!=g?g:mxResources.get("error");if(null!=C){null!=
-C.retry&&(B=mxResources.get("cancel"),I=function(){A();C.retry()});if(404==C.code||404==C.status||403==C.code){y=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=q?null:null!=p?p: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!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==C.code||404==C.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(g,y,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(d,g,k,n,q)}),
-I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){J.innerText="";for(var K=0;K<u.length;K++){var H=document.createElement("option");mxUtils.write(H,u[K].displayName);H.value=K;J.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+u[K].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=u.length;J.appendChild(H)}var u=this.drive.getUsersList(),
-z=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");z.appendChild(F);var J=document.createElement("select");J.style.width="200px";S();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var K=J.value,H=u.length!=K;H&&this.drive.setUser(u[K]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(u=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(N){this.handleError(N)}),!0)}));z.appendChild(J);
-z=new CustomDialog(this,z,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(z.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=C.message?y=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name):mxUtils.htmlEntities(C.message):null!=C.response&&null!=C.response.error?y=mxUtils.htmlEntities(C.response.error):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?
-y=mxUtils.htmlEntities(mxResources.get("timeout")):C.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof C&&0<C.length&&(y=mxUtils.htmlEntities(C)))}var G=p=null;null!=C&&null!=C.helpLink?(p=mxResources.get("help"),G=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail&&(p=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+p+": "+C.ownerEmail+")"),G=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(C.ownerEmail))}));this.showError(g,y,B,k,I,null,null,p,G,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,q,p){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){y();null!=g&&
-g()},function(){y();null!=k&&k()},n,q,null,null,null,null,A);this.showDialog(d.container,340,46+A,!0,p);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(q);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var y=document.createElement("input");
-y.setAttribute("type","checkbox");y.setAttribute("id","geDoNotShowAgainCheckbox");y.style.marginRight="6px";if(!n){g.appendChild(y);var A=document.createElement("label");A.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(A,mxResources.get("doNotShowAgain"));g.appendChild(A);p.style.paddingBottom="30px";p.appendChild(g)}var C=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,y.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);C()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){var M=mxEvent.getSource(I);M!=y&&M!=A?(null!=k&&k(),C(),mxEvent.consume(I)):B()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,n){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,n,q){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;d=this.createImageDataUri(d,g,k,q);this.saveData(n,p,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,n,q,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
-/(\.html)$/i.test(g)||(g=g+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,
-k,n);else{var y=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(A?parseInt(A[2],10):!1)?!1:p}if(p||this.isOffline()){y.href=URL.createObjectURL(n?this.base64ToBlob(d,k):new Blob([d],{type:k}));p?y.download=g:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},
-2E4),y.click(),y.parentNode.removeChild(y)}catch(C){}}else this.createEchoRequest(d,g,k,n,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,q,p){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,n=Math.ceil(k/1024),q=Array(n),
-p=0;p<n;++p){for(var y=1024*p,A=Math.min(y+1024,k),C=Array(A-y),B=0;y<A;++B,++y)C[B]=d[y].charCodeAt(0);q[p]=new Uint8Array(C)}return new Blob(q,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,n,q,p,y,A){p=null!=p?p:!1;y=null!=y?y:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(p);isLocalStorage&&q++;var C=4>=q?2:6<q?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,I){try{if("_blank"==I)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,
-k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var M=new EmbedDialog(this,d);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var G=window.open("about:blank");null==G?mxUtils.popup(d,!0):(G.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),G.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(d,B,k,n,null,A):null!=B&&0<B.length&&this.pickFolder(I,mxUtils.bind(this,function(S){try{this.exportFile(d,B,k,n,I,S)}catch(u){this.handleError(u)}}))}catch(S){this.handleError(S)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,y,null,1<q,C,d,k,n);p=this.isServices(q)?q>C?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(d=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write('<html><img style="max-width:100%;" src="data:'+
-g+";base64,"+d+'"/></html>')):n.document.write("<html>"+d+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),n.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var g=d(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=g.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",
-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,
-function(n){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=p.zIndex;var y=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});y.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(A){y.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);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,q){this.isLocalFileSave()?this.saveLocalFile(k,d,n,q,g):this.saveRequest(d,g,mxUtils.bind(this,function(p,y){return this.createEchoRequest(k,p,n,q,g,y)}),k,q,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,q,p,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;
-var A=this.getServiceCount(!1);isLocalStorage&&A++;var C=4>=A?2:6<A?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,I){if("_blank"==I||null!=B&&0<B.length){var M=k("_blank"==I?null:B,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=M&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?M.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(G){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,I,G)}catch(S){this.handleError(S)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),B,p,!0,I,G)}catch(S){this.handleError(S)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(S){this.spinner.stop();this.handleError(S)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,y,null,1<A,C,n,p,q);A=this.isServices(A)?4<A?390:280:160;this.showDialog(d.container,
-420,A,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,q,p){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,q,p,y,A,C,B,I,M,G,S){if(this.spinner.spin(document.body,mxResources.get("export")))try{var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;var z=g?null:this.editor.graph.background;z==mxConstants.NONE&&
-(z=null);null==z&&0==g&&(z=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(z,d,y,A,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!G,I,M);n&&this.editor.graph.addSvgShadow(F);var J=this.getBaseFilename()+(q?".drawio":"")+".svg";S=null!=S?S:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(J,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(N)}))});var K=mxUtils.bind(this,function(N){this.spinner.stop();q&&N.setAttribute("content",this.getFileData(!0,null,null,null,k,C,null,null,null,!1));S(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var H=mxUtils.bind(this,function(N){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,K,this.thumbImageCache)):
-K(N)});G?this.embedFonts(F,H):(this.editor.addFontCss(F),H(F))}catch(N){this.handleError(N)}};EditorUi.prototype.addRadiobox=function(d,g,k,n,q,p,y){return this.addCheckbox(d,k,n,q,p,y,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,q,p,y,A){p=null!=p?p:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();C.id=y;null!=A&&C.setAttribute("name",A);k&&(C.setAttribute("checked","checked"),
-C.defaultChecked=!0);n&&C.setAttribute("disabled","disabled");p&&(d.appendChild(C),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",y),d.appendChild(k),q||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),q="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var p=document.createElement("select");
-p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");p.appendChild(n);d.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var y=new FilenameDialog(this,
-q,mxResources.get("ok"),function(A){null!=A?q=A:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return p}}};
-EditorUi.prototype.addLinkSection=function(d,g){function k(){var A=document.createElement("div");A.style.width="100%";A.style.height="100%";A.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(A.style.border="1px solid black",A.style.backgroundColor=p):(A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",A.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(A)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");
-n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));
-n.appendChild(q);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+":");var p="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(A){this.pickColor(p||"none",function(C){p=C;k()});mxEvent.consume(A)}));k();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height=
-"22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";d.appendChild(y);mxUtils.br(d);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,q,p,y){y=null!=y?y:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=d&&y.push("target="+d),null!=
-g&&g!=mxConstants.NONE&&y.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=q&&0<q.length&&y.push("edit="+encodeURIComponent(q)),p&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(d,g,k,n,q,p,y,A,C,B){C=this.createUrlParameters(d,g,k,n,q,p,C);d=this.getCurrentFile();g=!0;null!=y?k="#U"+encodeURIComponent(y):
-(d=this.getCurrentFile(),A||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(C.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,q,p,y,A,C,B,I,M){this.getBasenames();var G={};""!=q&&q!=mxConstants.NONE&&(G.highlight=q);"auto"!==n&&(G.target=n);B||(G.lightbox=!1);G.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(G.zoom=k/100);k=[];y&&(k.push("pages"),G.resize=!0,null!=this.pages&&null!=this.currentPage&&(G.page=mxUtils.indexOf(this.pages,
-this.currentPage)));g&&(k.push("zoom"),G.resize=!0);A&&k.push("layers");C&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),G.toolbar=k.join(" "));null!=I&&0<I.length&&(G.edit=I);null!=d?G.url=d:G.xml=this.getFileData(!0,null,null,null,null,!y);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(G))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";M(g,'<script type="text/javascript" src="'+
-(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,n){var q=document.createElement("div");q.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(p);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";A.setAttribute("value","url");A.setAttribute("type","radio");A.setAttribute("name","type-embedhtmldialog");p=A.cloneNode(!0);p.setAttribute("value","copy");y.appendChild(p);var C=document.createElement("span");
-mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(C);mxUtils.br(y);y.appendChild(A);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));y.appendChild(C);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),y.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&A.setAttribute("disabled","disabled");q.appendChild(y);var I=this.addLinkSection(q),M=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");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="100%";q.appendChild(G);var S=this.addCheckbox(q,mxResources.get("fit"),!0);
-y=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(q,mxResources.get("allPages"),y,!y),z=this.addCheckbox(q,mxResources.get("layers"),!0),F=this.addCheckbox(q,mxResources.get("tags"),!0),J=this.addCheckbox(q,mxResources.get("lightbox"),!0),K=null;y=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(q,J);var H=K.getEditInput();H.style.marginBottom="16px";y+=50;mxEvent.addListener(J,"change",function(){J.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");
-H.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){n(A.checked?k:null,M.checked,G.value,I.getTarget(),I.getColor(),S.checked,u.checked,z.checked,F.checked,J.checked,null!=K?K.getLink():null)}),null,d,g);this.showDialog(d.container,340,y,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,q,p,y,A){var C=document.createElement("div");C.style.whiteSpace=
-"nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(B);var I=this.getCurrentFile();d=0;if(null==I||I.constructor!=window.DriveFile||g)y=null!=y?y:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;y=null!=y?y:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.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"));B.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));M.style.marginTop="12px";M.className="geBtn";B.appendChild(M);C.appendChild(B);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));B.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(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var G=null,S=null;if(null!=k||null!=n)d+=30,mxUtils.write(C,mxResources.get("width")+":"),G=document.createElement("input"),
-G.setAttribute("type","text"),G.style.marginRight="16px",G.style.width="50px",G.style.marginLeft="6px",G.style.marginRight="16px",G.style.marginBottom="10px",G.value="100%",C.appendChild(G),mxUtils.write(C,mxResources.get("height")+":"),S=document.createElement("input"),S.setAttribute("type","text"),S.style.width="50px",S.style.marginLeft="6px",S.style.marginBottom="10px",S.value=n+"px",C.appendChild(S),mxUtils.br(C);var u=this.addLinkSection(C,p);k=null!=this.pages&&1<this.pages.length;var z=null;
-if(null==I||I.constructor!=window.DriveFile||g)z=this.addCheckbox(C,mxResources.get("allPages"),k,!k);var F=this.addCheckbox(C,mxResources.get("lightbox"),!0,null,null,!p),J=this.addEditButton(C,F),K=J.getEditInput();p&&(K.style.marginLeft=F.style.marginLeft,F.style.display="none",d-=20);var H=this.addCheckbox(C,mxResources.get("layers"),!0);H.style.marginLeft=K.style.marginLeft;H.style.marginTop="8px";var N=this.addCheckbox(C,mxResources.get("tags"),!0);N.style.marginLeft=K.style.marginLeft;N.style.marginBottom=
-"16px";N.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&F.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,C,mxUtils.bind(this,function(){q(u.getTarget(),u.getColor(),null==z?!0:z.checked,F.checked,J.getLink(),H.checked,null!=G?G.value:null,
-null!=S?S.value:null,N.checked)}),null,mxResources.get("create"),y,A);this.showDialog(g.container,340,300+d,!0,!0);null!=G?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(q?"10":"4")+"px";p.appendChild(y);if(q){mxUtils.write(p,mxResources.get("zoom")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value=this.lastExportZoom||"100%";p.appendChild(A);mxUtils.write(p,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=
-this.lastExportBorder||"0";p.appendChild(C);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var M=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=M&&(M.style.marginBottom="16px");d=new CustomDialog(this,p,mxUtils.bind(this,function(){var G=
-parseInt(A.value)/100||1,S=parseInt(C.value)||0;k(!B.checked,null!=I?I.checked:!1,null!=M?M.checked:!1,G,S)}),null,d,g);this.showDialog(d.container,300,(q?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,q,p,y,A,C){y=null!=y?y:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph,M="jpeg"==A?220:300,G=document.createElement("h3");mxUtils.write(G,d);G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-B.appendChild(G);mxUtils.write(B,mxResources.get("zoom")+":");var S=document.createElement("input");S.setAttribute("type","text");S.style.marginRight="16px";S.style.width="60px";S.style.marginLeft="4px";S.style.marginRight="12px";S.value=this.lastExportZoom||"100%";B.appendChild(S);mxUtils.write(B,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";B.appendChild(u);mxUtils.br(B);var z=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var K={};for(G=0;G<d.length;G++)if(!I.isSelectionEmpty()||"selectionOnly"!=
-d[G]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(d[G]));H.setAttribute("value",d[G]);J.appendChild(H);K[d[G]]=H}C?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(J),mxUtils.br(B),M+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(z.checked=!0)})):p&&(B.appendChild(F),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),M+=30,mxEvent.addListener(z,"change",function(){z.checked?F.removeAttribute("disabled"):F.setAttribute("disabled",
-"disabled")}));I.isSelectionEmpty()?C&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",M-=30):(J.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(z,"change",function(){J.value=z.checked?"selectionOnly":"diagram"}));var N=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=A),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),M+=26);var Q=this.addCheckbox(B,
-mxResources.get("shadow"),I.shadowVisible),V=null;if("png"==A||"jpeg"==A)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),y,null,null,"jpeg"!=A);W.style.marginBottom="16px";var t=document.createElement("input");t.style.marginBottom="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||t.setAttribute("disabled","disabled");var D=
-document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginRight="10px";D.style.marginBottom="16px";D.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||D.appendChild(p);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){"lblToSvg"==D.value?(t.checked=!0,t.setAttribute("disabled","disabled"),K.page.style.display="none","page"==J.value&&(J.value="diagram"),Q.checked=!1,Q.setAttribute("disabled","disabled"),T.style.display="inline-block",L.style.display="none"):"disabled"==t.getAttribute("disabled")&&(t.checked=!1,t.removeAttribute("disabled"),Q.removeAttribute("disabled"),
-K.page.style.display="",T.style.display="none",L.style.display="")}));g&&(B.appendChild(t),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(D),mxUtils.br(B),M+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));L.appendChild(g);
-g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));L.appendChild(g);var T=document.createElement("div");mxUtils.write(T,mxResources.get("LinksLost"));T.style.margin="7px";T.style.display="none";"svg"==A&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(L),B.appendChild(T),mxUtils.br(B),
-mxUtils.br(B),M+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=S.value;q(S.value,N.checked,!z.checked,Q.checked,W.checked,t.checked,u.value,F.checked,!1,L.value,null!=V?V.checked:null,null!=U?U.checked:null,J.value,"embedFonts"==D.value,"lblToSvg"==D.value)}),null,k,n);this.showDialog(k.container,340,M,!0,!0,null,null,null,null,!0);S.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?S.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var y=this.editor.graph;if(null!=g){var A=document.createElement("h3");mxUtils.write(A,g);A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(A)}var C=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),y.shadowVisible&&n,!n),I=this.addCheckbox(p,k),M=this.addCheckbox(p,mxResources.get("lightbox"),
-!0),G=this.addEditButton(p,M),S=G.getEditInput(),u=1<y.model.getChildCount(y.model.getRoot()),z=this.addCheckbox(p,mxResources.get("layers"),u,!u);z.style.marginLeft=S.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(u&&z.removeAttribute("disabled"),S.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));S.checked&&M.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled",
-"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){d(C.checked,B.checked,I.checked,M.checked,G.getLink(),z.checked)}),null,mxResources.get("embed"),q);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,q,p,y,A){function C(S){var u=" ",z="";n&&(u=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");d&&(z+="max-width:100%;");var F="";k&&(F=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');y('<img src="'+S+'"'+F+(""!=z?' style="'+z+'"':"")+u+"/>")}var B=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(S){var u=n?this.getFileData(!0):null;S=
-this.createImageDataUri(S,u,"png");C(S)}),null,null,null,mxUtils.bind(this,function(S){A({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var M="";k&&(M="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var G=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+M+"&xml="+encodeURIComponent(g));G.send(mxUtils.bind(this,function(){200<=G.getStatus()&&
-299>=G.getStatus()?C("data:image/png;base64,"+G.getText()):A({message:mxResources.get("unknownError")})}))}else A({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,q,p,y){var A=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),C=A.getElementsByTagName("a");if(null!=C)for(var B=0;B<C.length;B++){var I=C[B].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==C[B].getAttribute("target")&&C[B].removeAttribute("target")}n&&
-A.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(A);if(k){var M=" ",G="";n&&(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.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(p?"&layers=1":
-"")+"');}})(this);\"",G+="cursor:pointer;");d&&(G+="max-width:100%;");this.editor.convertImages(A,mxUtils.bind(this,function(S){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(S))+'"'+(""!=G?' style="'+G+'"':"")+M+"/>")}))}else G="",n&&(g=this.getSelectedPageIndex(),A.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),G+="cursor:pointer;"),d&&(d=parseInt(A.getAttribute("width")),q=parseInt(A.getAttribute("height")),A.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),G+="max-width:100%;max-height:"+q+"px;",A.removeAttribute("height")),""!=G&&A.setAttribute("style",G),this.editor.addFontCss(A),this.editor.graph.mathEnabled&&this.editor.addMathCss(A),y(mxUtils.getXml(A))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
-d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){k=n[0];var q=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:q.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(p){}finally{this.editor.graph=n}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=
-d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,q){try{var p=this.editor.graph,y=null!=p.themes&&"darkTheme"==p.defaultThemeName,A=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(y?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),p),A=k;else if(y||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(y?p.getDefaultStylesheet():p.getStylesheet());var C=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(I){return"page"==I?B.getName():"pagenumber"==I?1:C.apply(this,
-arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=I.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(A));d(M.substring(M.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(G){null!=g&&g(G)}}),null,null,null,mxUtils.bind(this,function(I){null!=g&&
-g(I)}),null,null,n,null,p.shadowVisible,null,p,q,null,null,null,"diagram",null)}catch(I){null!=g&&g(I)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,q,p,y,A,C,B,I,M,G){A=null!=A?A:!0;I=null!=I?I:0;y=null!=C?C:g.background;y==mxConstants.NONE&&(y=null);p=g.getSvg(y,B,I,null,null,p,null,null,null,g.shadowVisible||M,null,G,"diagram");(g.shadowVisible||M)&&g.addSvgShadow(p,null,null,0==I);null!=d&&p.setAttribute("content",d);null!=k&&p.setAttribute("resource",k);var S=mxUtils.bind(this,function(u){u=
-(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(u);null!=q&&q(u);return u});g.mathEnabled&&this.editor.addMathCss(p);if(null!=q)this.embedFonts(p,mxUtils.bind(this,function(u){A?this.editor.convertImages(u,mxUtils.bind(this,function(z){S(z)})):S(u)}));else return S(p)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,q,p,y,A,C,B,I,M,G){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var S=this.editor.graph.isSelectionEmpty();k=null!=k?k:S;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(u){this.spinner.stop();try{this.saveCanvas(u,
-q?this.getFileData(!0,null,null,null,k,A):null,C,null==this.pages||0==this.pages.length,I)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,k,d||1,g,n,null,null,p,y,B,M,G)}catch(u){this.spinner.stop(),this.handleError(u)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,n,q,p,y){g=null!=g?g:0;k=null!=k?k:0;var A=[];try{var C=
-this.editor.graph;if(null!=d&&0<d.length){C.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var I=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var M=I.getElementsByTagName("diagram");if(1==M.length&&!p){if(I=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(d[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var G=M[0].getAttribute("name");null!=G&&""!=G&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,G))}}else if(0<M.length){p=[];var S=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[M[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(M[0]),n=!1,S=1);for(;S<M.length;S++){var u=M[S].getAttribute("id");M[S].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(M[S]));d[u]=M[S].getAttribute("id");var F=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[F+1]));C.model.execute(new ChangePage(this,z,z,F,
-!0));p.push(z)}this.updatePageLinks(d,p)}}if(null!=I&&"mxGraphModel"===I.nodeName){A=C.importGraphModel(I,g,k,n);if(null!=A)for(S=0;S<A.length;S++)this.updatePageLinksForCell(d,A[S]);var J=C.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;C.model.execute(K)}}y&&this.insertHandler(A,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(H){if(q)throw H;
-this.handleError(H)}return A};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,g){var k=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(g);null!=q&&n.setLinkForCell(g,this.updatePageLink(d,q));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),y=!1,A=0;A<p.length;A++)q=p[A].getAttribute("href"),null!=q&&(p[A].setAttribute("href",this.updatePageLink(d,q)),y=!0);y&&n.labelChanged(g,k.innerHTML)}for(A=0;A<n.model.getChildCount(g);A++)this.updatePageLinksForCell(d,n.model.getChildAt(g,A))};EditorUi.prototype.updatePageLink=
-function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var y=p.open.substring(p.open.indexOf(",")+1);k=d[y];null!=k?p.open="data:page/id,"+k:null==this.getPageById(y)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(A){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,q){n=null!=n?n:d.name;k=null!=k?k:mxUtils.bind(this,function(y){this.handleError(y)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(n);try{var A="UNKNOWN-VISIO",C=n.lastIndexOf(".");if(0<=C&&C<n.length)A=n.substring(C+1).toUpperCase();else{var B=n.lastIndexOf("/");0<=
-B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:A+"-MS-IMPORT-FILE",action:"filename_"+n,label:y?"remote":"local"})}catch(M){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",d,n);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=q&&I.setRequestHeader("x-convert-custom",q);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var M=I.response;if("text/xml"==M.type){var G=new FileReader;G.onload=mxUtils.bind(this,function(S){try{g(S.target.result)}catch(u){k({message:mxResources.get("errorLoadingFile")})}});G.readAsText(M)}else this.doImportVisio(M,g,k,n)}catch(S){k(S)}else try{""==I.responseType||"text"==I.responseType?k({message:I.responseText}):(G=new FileReader,G.onload=
-function(){k({message:JSON.parse(G.result).Message})},G.readAsText(I.response))}catch(S){k({})}});I.send(y)}else try{this.doImportVisio(d,g,k,n)}catch(M){k(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(q){this.handleError(q)});
-var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(q){k(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
-this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
-JSON.parse(d);g(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&p.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var y=0;y<q.svgThumbs.length;y++)p.push(Editor.createSvgDataUri(q.svgThumbs[y]));null!=q.thumb&&p.push(q.thumb);console.log.apply(console,p)}}catch(A){}}catch(A){null!=window.console&&console.error(A),k(A)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(d,
-g,k,n){var q=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(y){try{if(mxClient.IS_IE||mxClient.IS_IE11)y=y.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var A=mxUtils.parseXml(y).getElementsByTagName("svg");
-if(0<A.length){var C=parseFloat(A[0].getAttribute("width")),B=parseFloat(A[0].getAttribute("height"));if(isNaN(C)||isNaN(B))try{var I=A[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(I[2]);B=parseFloat(I[3])}catch(M){C=C||100,B=B||100}k(q.convertDataUri(Editor.createSvgDataUri(y)),C,B)}else n({message:mxResources.get("invalidInput")})}catch(M){n(M)}})}catch(y){n(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function q(A,C,B){c1=A>>2;c2=(A&3)<<4|C>>4;c3=(C&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(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 y=new XMLHttpRequest;y.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(A){r="";for(i=0;i<A.length;i+=3)r=i+2==A.length?r+q(A.charCodeAt(i),A.charCodeAt(i+1),0):i+1==A.length?r+q(A.charCodeAt(i),0,0):r+q(A.charCodeAt(i),A.charCodeAt(i+1),A.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(B){var I=new Image;I.onload=
-function(){try{var M=I.width,G=I.height;if(0==M&&0==G){var S=C.result,u=S.indexOf(","),z=decodeURIComponent(escape(atob(S.substring(u+1)))),F=mxUtils.parseXml(z).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),G=parseFloat(F[0].getAttribute("height")))}k(C.result,M,G)}catch(J){n(J)}};I.src=C.result};C.onerror=function(B){n(B)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,q=null;n.getModel().beginUpdate();
-try{q=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(q,!0)}finally{n.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,g,k,n,q,p,y,A){p=null!=p?p:!0;y=null!=y?y:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(G){4==
-G.readyState&&200<=G.status&&299>=G.status&&this.editor.graph.setSelectionCells(this.insertTextAt(G.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,A)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B,
-g,k,p,!0,A);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var I=this.importXml(B,g,k,p,!0,A);if(0<I.length)return I}catch(G){}this.loadImage(d,mxUtils.bind(this,function(G){if("data:"==d.substring(0,5))this.resizeImage(G,d,mxUtils.bind(this,function(z,F,J){C.setSelectionCell(C.insertVertex(null,null,
-"",C.snap(g),C.snap(k),F,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),y,this.maxImageSize);else{var S=Math.min(1,Math.min(this.maxImageSize/G.width,this.maxImageSize/G.height)),u=Math.round(G.width*S);G=Math.round(G.height*S);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(g),C.snap(k),u,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var G=null;C.getModel().beginUpdate();try{G=C.insertVertex(C.getDefaultParent(),null,d,C.snap(g),C.snap(k),1,1,"text;"+(n?"html=1;":"")),C.updateCellSize(G),C.fireEvent(new mxEventObject("textInserted","cells",[G]))}finally{C.getModel().endUpdate()}C.setSelectionCell(G)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,p,null,A);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(G){this.editor.graph.setSelectionCells(this.importXml(G,g,k,p,null,A))}),mxUtils.bind(this,function(G){this.handleError(G)}));else{C=this.editor.graph;q=null;C.getModel().beginUpdate();try{q=C.insertVertex(C.getDefaultParent(),null,"",C.snap(g),C.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");q.value=d;C.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var M=C.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=M.width;q.geometry.height=M.height}Graph.isLink(q.value)&&C.setLinkForCell(q,q.value);q.geometry.width+=C.gridSize;q.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
-EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,A){StorageFile.listFiles(this,
-"F",y,A)});window.openBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.getFileContent(this,y,A,C)});window.deleteBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.deleteFile(this,y,A,C)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,A){null!=A&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(A)?(y=new Blob([y],{type:"application/octet-stream"}),
-this.importVisio(y,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,A)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var q=this.dialog,p=q.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=n;p.apply(q,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,g,k){var n=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var y=0,A,C=!1;p.forEach(function(B,I){B=I.name.toLowerCase();"diagram/diagram.xml"==B?(C=!0,I.async("string").then(function(M){0==M.indexOf("<mxfile ")?g(M):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>y&&(y=B,A=I))});0<y?A.async("string").then(function(B){(new XMLHttpRequest).upload&&
-n.isRemoteFileFormat(B,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?g(I.responseText):k())}),d.name):k()}):C||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,g,k,n,q,p,y,A,C,B,I,M){B=null!=
-B?B:!0;var G=!1,S=null,u=mxUtils.bind(this,function(z){var F=null;null!=z&&"<mxlibrary"==z.substring(0,10)?this.loadLibrary(new LocalLibrary(this,z,y)):F=this.importXml(z,k,n,B,null,null!=M?mxEvent.isControlDown(M):null);null!=A&&A(F)});"image"==g.substring(0,5)?(C=!1,"image/png"==g.substring(0,9)&&(g=I?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(S=this.importXml(g,k,n,B,null,null!=M?mxEvent.isControlDown(M):null),C=!0)),C||(g=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
-C)+d.substring(d.indexOf(",",C+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),S=[g.insertVertex(null,null,"",k,n,q,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(G=!0,this.importGraphML(d,u)):null!=C&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(G=!0,this.importVisio(C,u)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,y)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(G=!0,q=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(z.responseText):null!=A&&A(null))}),null!=d?this.parseFileData(d,q,y):this.parseFile(C,q,y)):0==d.indexOf("PK")&&null!=C?(G=!0,this.importZipFile(C,u,mxUtils.bind(this,function(){S=this.insertTextAt(this.validateFileData(d),k,n,!0,null,B);A(S)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(S=this.insertTextAt(this.validateFileData(d),
-k,n,!0,null,B,null,null!=M?mxEvent.isControlDown(M):null));G||null==A||A(S);return S};EditorUi.prototype.importFiles=function(d,g,k,n,q,p,y,A,C,B,I,M,G){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var S=null!=g&&null!=k,u=!0;g=null!=g?g:0;k=null!=k?k:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var F=I||this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>F){z=!0;break}var K=mxUtils.bind(this,function(){var H=
-this.editor.graph,N=H.gridSize;q=null!=q?q:mxUtils.bind(this,function(D,L,T,O,P,R,X,Z,Y){try{return null!=D&&"<mxlibrary"==D.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,D,X)),null):this.isCompatibleString(D)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,D,X,!0)),null):this.importFile(D,L,T,O,P,R,X,Z,Y,S,M,G)}catch(aa){return this.handleError(aa),null}});p=null!=p?p:mxUtils.bind(this,function(D){H.setSelectionCells(D)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=d.length,Q=U,V=[],W=mxUtils.bind(this,function(D,L){V[D]=L;if(0==--Q){this.spinner.stop();if(null!=A)A(V);else{var T=[];H.getModel().beginUpdate();try{for(D=0;D<V.length;D++){var O=V[D]();null!=O&&(T=T.concat(O))}}finally{H.getModel().endUpdate()}}p(T)}}),t=0;t<U;t++)mxUtils.bind(this,function(D){var L=d[D];if(null!=L){var T=new FileReader;T.onload=mxUtils.bind(this,function(O){if(null==y||y(L))if("image/"==L.type.substring(0,
-6))if("image/svg"==L.type.substring(0,9)){var P=Graph.clipSvgDataUri(O.target.result),R=P.indexOf(",");R=decodeURIComponent(escape(atob(P.substring(R+1))));var X=mxUtils.parseXml(R);R=X.getElementsByTagName("svg");if(0<R.length){R=R[0];var Z=M?null:R.getAttribute("content");null!=Z&&"<"!=Z.charAt(0)&&"%"!=Z.charAt(0)&&(Z=unescape(window.atob?atob(Z):Base64.decode(Z,!0)));null!=Z&&"%"==Z.charAt(0)&&(Z=decodeURIComponent(Z));null==Z||"<mxfile "!==Z.substring(0,8)&&"<mxGraphModel "!==Z.substring(0,14)?
-W(D,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],ja=ea.getAttribute("width"),fa=ea.getAttribute("height");ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var ra=ea.getAttribute("viewBox");if(null==ra||0==ra.length)ea.setAttribute("viewBox","0 0 "+ja+" "+fa);else if(isNaN(ja)||isNaN(fa)){var ma=ra.split(" ");3<ma.length&&(ja=parseFloat(ma[2]),fa=parseFloat(ma[3]))}P=
-Editor.createSvgDataUri(mxUtils.getXml(ea));var Ga=Math.min(1,Math.min(n/Math.max(1,ja)),n/Math.max(1,fa)),Fa=q(P,L.type,g+D*N,k+D*N,Math.max(1,Math.round(ja*Ga)),Math.max(1,Math.round(fa*Ga)),L.name);if(isNaN(ja)||isNaN(fa)){var ya=new Image;ya.onload=mxUtils.bind(this,function(){ja=Math.max(1,ya.width);fa=Math.max(1,ya.height);Fa[0].geometry.width=ja;Fa[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+ja+" "+fa);P=Editor.createSvgDataUri(mxUtils.getXml(ea));var Ma=P.indexOf(";");0<Ma&&(P=
-P.substring(0,Ma)+P.substring(P.indexOf(",",Ma+1)));H.setCellStyles("image",P,[Fa[0]])});ya.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Fa}}}catch(Ma){}return null})):W(D,mxUtils.bind(this,function(){return q(Z,"text/xml",g+D*N,k+D*N,0,0,L.name)}))}else W(D,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==L.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var aa=new Image;aa.src=O.target.result;W(D,mxUtils.bind(this,function(){return q(Y,
-"text/xml",g+D*N,k+D*N,aa.width,aa.height,L.name)}));R=!0}}R||(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(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ea,ja,fa){W(D,mxUtils.bind(this,function(){if(null!=
-ea&&ea.length<B){var ra=u&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(n/ja,n/fa)):1;return q(ea,L.type,g+D*N,k+D*N,Math.round(ja*ra),Math.round(fa*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,n,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else P=O.target.result,q(P,L.type,g+D*N,k+D*N,240,160,L.name,function(ba){W(D,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||
-/(\.vs(x|sx?))($|\?)/i.test(L.name)?q(null,L.type,g+D*N,k+D*N,240,160,L.name,function(O){W(D,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?T.readAsDataURL(L):T.readAsText(L)}})(t)});if(z){z=[];for(J=0;J<d.length;J++)z.push(d[J]);d=z;this.confirmImageResize(function(H){u=H;K()},C)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
-[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(p,y){if(p||g)mxSettings.setResizeImages(p?y:null),mxSettings.save();k();d(y)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){q(p,!0)},function(p){q(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"),
-'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,n)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var n=new XMLHttpRequest;n.open("POST",
-OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,q,p,y){q=null!=q?q:this.maxImageSize;var A=Math.max(1,d.width),
-C=Math.max(1,d.height);if(n&&this.isResampleImageSize(null!=y?y:g.length,p))try{var B=Math.max(A/q,C/q);if(1<B){var I=Math.round(A/B),M=Math.round(C/B),G=document.createElement("canvas");G.width=I;G.height=M;G.getContext("2d").drawImage(d,0,0,I,M);var S=G.toDataURL();if(S.length<g.length){var u=document.createElement("canvas");u.width=I;u.height=M;var z=u.toDataURL();S!==z&&(g=S,A=I,C=M)}}}catch(F){}k(g,A,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};
-EditorUi.prototype.loadImage=function(d,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=d}catch(q){if(null!=k)k(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(F){var J=F.getEvent();return null==F.getState()&&
-!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==F.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(F,J,K){var H=JSON.parse(K);J=new TextareaDialog(d,mxResources.get("plantUml")+":",H.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,H.format,function(U,Q,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==H.format)g.labelChanged(F,"<pre>"+
-U+"</pre>"),g.updateCellSize(F,!0);else{g.setCellStyles("image",d.convertDataUri(U),[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Q,W.height=V,g.cellsResized([F],[W],!1))}g.setAttributeForCell(F,"plantUmlData",JSON.stringify({data:N,format:H.format}))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},null,null,400,220);d.showDialog(J.container,420,300,!0,!0);J.init()};g.cellEditor.editMermaidData=function(F,J,K){var H=JSON.parse(K);J=new TextareaDialog(d,mxResources.get("mermaid")+
-":",H.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,H.config,function(U,Q,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Math.max(W.width,Q),W.height=Math.max(W.height,V),g.cellsResized([F],[W],!1));g.setAttributeForCell(F,"mermaidData",JSON.stringify({data:N,config:H.config},null,2))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},
-null,null,400,220);d.showDialog(J.container,420,300,!0,!0);J.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(F,J){try{var K=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=K)this.editPlantUmlData(F,J,K);else if(K=this.graph.getAttributeForCell(F,"mermaidData"),null!=K)this.editMermaidData(F,J,K);else{var H=g.getCellStyle(F);"1"==mxUtils.getValue(H,"metaEdit","0")?d.showDataDialog(F):k.apply(this,arguments)}}catch(N){d.handleError(N)}};g.getLinkTitle=function(F){return d.getLinkTitle(F)};
-g.customLinkClicked=function(F){var J=!1;try{d.handleCustomLink(F),J=!0}catch(K){d.handleError(K)}return J};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(F){var J=n.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var q=g.setBackgroundImage;g.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=d.createImageForPageLink(F.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
-function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(F,J){F=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=F){var K=F.indexOf(",");if(0<K)for(F=F.substring(K+1),J=J.getProperty("patches"),K=0;K<J.length;K++)if(null!=J[K][EditorUi.DIFF_UPDATE]&&null!=J[K][EditorUi.DIFF_UPDATE][F]||null!=J[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[K][EditorUi.DIFF_REMOVE],
-F)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(F,J){var K=p.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!J)K={src:K.originalSrc};else if(J&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,N=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=d.createImageForPageLink(K.originalSrc);
-this.shapeBackgroundColor=U;this.shapeForegroundColor=N;this.stylesheet=H}return K};var y=this.clearDefaultStyle;this.clearDefaultStyle=function(){y.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var A=
-d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return A.apply(this,arguments)};var C=g.addClickHandler;g.addClickHandler=function(F,J,K){var H=J;J=function(N,U){if(null==U){var Q=mxEvent.getSource(N);"a"==Q.nodeName.toLowerCase()&&(U=Q.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(U)&&mxEvent.consume(N);null!=H&&H(N,U)};C.call(this,F,
-J,K)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(F,J,K){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,
-!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var F=I.apply(this,arguments),J=d.getCurrentFile();null!=J&&(F.filename=J.getTitle());F.pagecount=null!=d.pages?d.pages.length:1;F.page=null!=d.currentPage?d.currentPage.getName():"";F.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return F};var M=g.getGlobalVariable;g.getGlobalVariable=function(F){var J=d.getCurrentFile();return"filename"==
-F&&null!=J?J.getTitle():"page"==F&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==F?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==F?null!=d.pages?d.pages.length:1:M.apply(this,arguments)};var G=g.labelLinkClicked;g.labelLinkClicked=function(F,J,K){var H=J.getAttribute("href");if(null==H||!g.isCustomLink(H)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))G.apply(this,arguments);else{if(!g.isEnabled()||null!=F&&g.isCellLocked(F.cell))g.customLinkClicked(H),
-g.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var F=d.defaultFilename,J=d.getCurrentFile();null!=J&&(F=null!=J.getTitle()?J.getTitle():F);return F};var S=this.actions.get("print");S.setEnabled(!mxClient.IS_IOS||!navigator.standalone);S.visible=S.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
-!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var J=g.cellEditor.text2,K=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(H){null!=K&&(K.parentNode.removeChild(K),K=null);H.stopPropagation();H.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(H){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&
-(K=this.highlightElement(J));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(H){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(U,Q,V,W,t,D){g.insertImage(U,t,D)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Q=0;Q<U.length;Q++)U[Q]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var N=
-H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(U){var Q=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,Q)),V/Math.max(1,U));g.insertImage(decodeURIComponent(N),Q*V,U*V)})):document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(S=this.editor.graph.view,S.setUnit(mxSettings.getUnit()),S.addListener("unitChanged",function(F,J){mxSettings.setUnit(J.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,S.unit),this.refresh());if("1"==urlParams.styledev){S=document.getElementById("geFooter");null!=S&&(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)})),S.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,J){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var u=
-this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:u.apply(this,arguments)}}S=document.getElementById("geInfo");null!=S&&S.parentNode.removeChild(S);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(g.container,"dragleave",function(F){g.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,
-function(F){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(F){null!=z&&(z.parentNode.removeChild(z),z=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(F),mxEvent.getClientY(F)),K=F.dataTransfer.files,H=g.view.translate,N=g.view.scale,U=J.x/N-H.x,Q=J.y/N-H.y;if(0<K.length)"1"!=
-urlParams.embed&&mxEvent.isShiftDown(F)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(F)&&(Q=U=null),this.importFiles(K,U,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(Q=U=0);var V=0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(F,null!=this.pages);
-if(null!=J)g.setSelectionCells(this.importXml(J,U,Q,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var W=F.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=g.sanitizeHtml(W);var t=null;K=J.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(t=!0)):(K=J.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(J=J.getElementsByTagName("pre"),
-null!=J&&1==J.length&&(W=mxUtils.getTextContent(J[0]))));var D=!0,L=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(W,U,Q,!0,t,null,D,mxEvent.isControlDown(F)))});t&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(T){D=T;L()},mxEvent.isControlDown(F)):L()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(T){var O=Math.max(1,T.width);T=Math.max(1,T.height);var P=this.maxImageSize;P=Math.min(1,
-Math.min(P/Math.max(1,O)),P/Math.max(1,T));g.setSelectionCell(g.insertVertex(null,null,"",U,Q,O*P,T*P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(T){g.setSelectionCells(this.insertTextAt(V,U,Q,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),U,Q,!0))}}F.stopPropagation();F.preventDefault()}),!1)}g.enableFlowAnimation=
-!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();S=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",S);this.addListener("sketchModeChanged",S);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,q=0;q<k.types.length;q++)if("text/"===
-k.types[q].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var y=p[index];if("file"===y.kind){if(d.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,function(C,B,I,M,G,S){d.insertImage(C,G,S)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var B=0;B<C.length;B++)C[B]()});else{var A=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],A.x,A.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position=
-"absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var y=mxEvent.getSource(p);
-null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",p=g.container.scrollLeft,y=g.container.scrollTop,g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=p,g.container.scrollTop=y)}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var y=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=y&&17!=y&&91!=y&&93!=y||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"cut",
-mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(p){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),!mxEvent.isConsumed(p))){var y=g.container.scrollLeft,A=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){g.container.scrollLeft=y;g.container.scrollTop=A;
-this.pasteCells(p,k,!1,!0)}),0)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function g(I){return""==I||"dark"==I||"kennedy"==I||null==I}var k=Editor.currentTheme;d=g(d)?"default":d;k=g(k)?"default":k;var n=
-"sketch"==k&&"default"==d||"default"==k&&"sketch"==d;if(n&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var q=this.editor.graph.view.translate,p=q.x,y=q.y,A=mxUtils.getOffset(this.editor.graph.container),C=this.editor.graph.container.scrollLeft-A.x,B=this.editor.graph.container.scrollTop-A.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
-function(){"sketch"==k&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==k&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
-"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var I=this.editor.graph.view.scale;A=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=C+A.x+(q.x-p)*I;this.editor.graph.container.scrollTop=
-B+A.y+(q.y-y)*I;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return n};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
-"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
-this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
-(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
-function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
-(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var g=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),k=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){g.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";k.style.display=g.style.display});this.actions.get("undo").addListener("stateChanged",d);
-this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-d=this.sketchFooterMenuElt;var g=this.createPageMenuTab(!1,!0);g.className="geToolbarButton";g.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(g);var k=mxUtils.bind(this,function(){g.innerText="";if(null!=this.currentPage){mxUtils.write(g,this.currentPage.getName());var n=null!=this.pages?this.pages.length:1,q=this.getPageIndex(this.currentPage);q=null!=q?q+1:1;var p=this.currentPage.getId();
-g.setAttribute("title",this.currentPage.getName()+" ("+q+"/"+n+")"+(null!=p?" ["+p+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){g.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
-k);this.editor.addListener("pagesPatched",k);k();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));k=this.createMenu("viewZoom",Editor.plusImage);k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(k);mxUtils.bind(this,function(n){mxEvent.addListener(n,
-"click",mxUtils.bind(this,function(p){mxEvent.isAltDown(p)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(p)):mxEvent.isShiftDown(p)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(p))}));var q=mxUtils.bind(this,function(){n.innerText="";mxUtils.write(n,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",
-q)})(k);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var n=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);n.style.paddingLeft="12px";n.style.backgroundSize="";n.style.width="26px";n.style.height="30px";n.style.opacity="0.7";var q=this.createMenu("insert",Editor.plusImage);q.style.backgroundSize="";q.style.marginBottom="4px";q.style.display="block";q.style.width="30px";q.style.height="30px";q.style.padding="4px";q.style.opacity="0.7";var p=!1,y=mxUtils.bind(this,function(){g.innerText="";if(!p){var A=function(B,I,M,G){null!=I&&B.setAttribute("title",I);B.style.cursor="pointer";B.style.margin="8px 0px";
-B.style.display="block";g.appendChild(B);null!=G&&(B.style.position="relative",B.style.overflow="visible",I=document.createElement("div"),I.style.position="absolute",I.style.fontSize="8px",I.style.left="32px",I.style.top="28px",mxUtils.write(I,G),B.appendChild(I));return B};A(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");A(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");A(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");A(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var C=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,0),!1);C.geometry.points=
-[];C.geometry.relative=!0;C.edge=!0;A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,C.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");C=C.clone();C.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";C.geometry.width=this.editor.graph.defaultEdgeLength+20;C.geometry.setTerminalPoint(new mxPoint(0,20),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,20),!1);
-A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));A(n,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(q)}"1"!=urlParams.embedInline&&g.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){p?(mxUtils.setPrefixedStyle(g.style,"transform","translate(0, -50%)"),g.style.padding="8px 6px 4px",g.style.width="40px",g.style.top="50%",g.style.bottom="",g.style.height="",
-k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",p=!1,y()):(g.innerText="",g.appendChild(k),mxUtils.setPrefixedStyle(g.style,"transform","translate(0, 0)"),g.style.bottom="12px",g.style.padding="0px",g.style.height="24px",g.style.width="24px",g.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",p=!0)}));this.addListener("darkModeChanged",
-y);this.addListener("sketchModeChanged",y);y();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
-"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,g){var k=this.menus.get(d),n=this.menubar.addMenu(mxResources.get(d),k.funct);n.className="geToolbarButton";n.style.display="inline-block";n.style.cursor="pointer";n.style.height="24px";n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(k,n,"geMenuItem");null!=g&&(n.style.backgroundImage="url("+g+")",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize=
-"100% 100%",n.style.width="24px",n.innerText="");return n};EditorUi.prototype.createMenuItem=function(d,g,k){var n=document.createElement("a");n.className="geToolbarButton";n.setAttribute("title",mxResources.get(d));n.style.backgroundImage="url("+g+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width="24px";n.style.height="24px";var q=this.actions.get(d);
-null!=q&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(p){p.preventDefault()})),mxEvent.addListener(n,"click",function(p){"disabled"!=n.getAttribute("disabled")&&q.funct(p);mxEvent.consume(p)}),k||(d=function(){q.isEnabled()?(n.removeAttribute("disabled"),n.style.cursor="pointer"):(n.setAttribute("disabled","disabled"),n.style.cursor="default");n.style.opacity=q.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),q.addListener("stateChanged",
-d),d()));return n};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,g,240,k,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
-"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
-mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};"1"!=urlParams["live-ui"]&&EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(f,g,l,
+q,t,x,E){f=new ImageDialog(this,f,g,l,q,t,x,E);this.showDialog(f.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);f.init()};EditorUi.prototype.showBackgroundImageDialog=function(f,g){f=null!=f?f:mxUtils.bind(this,function(l,q){q||(l=new ChangePageSetup(this,null,l),l.ignoreColor=!0,this.editor.graph.model.execute(l))});f=new BackgroundImageDialog(this,f,g);this.showDialog(f.container,400,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(f,g,l,q,t){f=new LibraryDialog(this,
+f,g,l,q,t);this.showDialog(f.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));f.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(f){var g=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var f=this.createDiv("geSidebarContainer geSidebarFooter");
+f.style.position="absolute";f.style.overflow="hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var l=g.getElementsByTagName("span")[0];l.style.fontSize="18px";l.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(g,
+"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));f.appendChild(g);return f};EditorUi.prototype.handleError=function(f,g,l,q,t,x,E){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=f&&null!=f.error?f.error:f;if(null!=f&&("1"==urlParams.test||null!=f.stack)&&null!=f.message)try{E?null!=window.console&&console.error("EditorUi.handleError:",f):EditorUi.logError("Caught: "+(""==f.message&&null!=f.name)?f.name:f.message,
+f.filename,f.lineNumber,f.columnNumber,f,"INFO")}catch(H){}if(null!=G||null!=g){E=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),T=null;g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(y=mxResources.get("cancel"),T=function(){F();G.retry()});if(404==G.code||404==G.status||403==G.code){E=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=t?null:null!=x?x:window.location.hash;if(null!=n&&("#G"==n.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==n.substring(0,45))&&(null!=f&&null!=f.error&&(null!=f.error.errors&&0<f.error.errors.length&&"fileAccess"==f.error.errors[0].reason||null!=f.error.data&&0<f.error.data.length&&"fileAccess"==f.error.data[0].reason)||404==G.code||404==G.status)){n="#U"==n.substring(0,
+2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(g,E,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+n);this.handleError(f,g,l,q,t)}),T,mxResources.get("changeUser"),mxUtils.bind(this,function(){function H(){M.innerText="";for(var Q=0;Q<K.length;Q++){var P=document.createElement("option");mxUtils.write(P,K[Q].displayName);P.value=Q;M.appendChild(P);P=document.createElement("option");P.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(P,"<"+K[Q].email+">");P.setAttribute("disabled","disabled");M.appendChild(P)}P=document.createElement("option");mxUtils.write(P,mxResources.get("addAccount"));P.value=K.length;M.appendChild(P)}var K=this.drive.getUsersList(),N=document.createElement("div"),I=document.createElement("span");I.style.marginTop="6px";mxUtils.write(I,mxResources.get("changeUser")+": ");N.appendChild(I);var M=document.createElement("select");M.style.width="200px";H();mxEvent.addListener(M,"change",mxUtils.bind(this,
+function(){var Q=M.value,P=K.length!=Q;P&&this.drive.setUser(K[Q]);this.drive.authorize(P,mxUtils.bind(this,function(){P||(K=this.drive.getUsersList(),H())}),mxUtils.bind(this,function(U){this.handleError(U)}),!0)}));N.appendChild(M);N=new CustomDialog(this,N,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(N.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),480,150);return}}null!=G.message?
+E=""==G.message&&null!=G.name?mxUtils.htmlEntities(G.name):mxUtils.htmlEntities(G.message):null!=G.response&&null!=G.response.error?E=mxUtils.htmlEntities(G.response.error):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?E=mxUtils.htmlEntities(mxResources.get("timeout")):G.code==App.ERROR_BUSY?E=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof G&&0<G.length&&(E=mxUtils.htmlEntities(G)))}var v=x=null;null!=G&&null!=G.helpLink?(x=mxResources.get("help"),v=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail&&(x=mxResources.get("contactOwner"),E+=mxUtils.htmlEntities(" ("+x+": "+G.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))}));this.showError(g,E,y,l,T,null,null,x,v,null,null,null,q?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(f,g,l){f=new ErrorDialog(this,null,f,mxResources.get("ok"),g);this.showDialog(f.container,l||340,100,!0,!1);
+f.init()};EditorUi.prototype.confirm=function(f,g,l,q,t,x){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},F=Math.min(200,28*Math.ceil(f.length/50));f=new ConfirmDialog(this,f,function(){E();null!=g&&g()},function(){E();null!=l&&l()},q,t,null,null,null,null,F);this.showDialog(f.container,340,46+F,!0,x);f.init()};EditorUi.prototype.showBanner=function(f,g,l,q){var t=!1;if(!(this.bannerShowing||this["hideBanner"+f]||isLocalStorage&&null!=mxSettings.settings&&null!=
+mxSettings.settings["close"+f])){var x=document.createElement("div");x.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(x.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(x.style,"transition","all 1s ease");x.className="geBtn gePrimaryBtn";
+t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";x.appendChild(t);t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+x.appendChild(t);mxUtils.write(x,g);document.body.appendChild(x);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("id","geDoNotShowAgainCheckbox");E.style.marginRight="6px";if(!q){g.appendChild(E);var F=document.createElement("label");F.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(F,mxResources.get("doNotShowAgain"));g.appendChild(F);
+x.style.paddingBottom="30px";x.appendChild(g)}var G=mxUtils.bind(this,function(){null!=x.parentNode&&(x.parentNode.removeChild(x),this.bannerShowing=!1,E.checked||q)&&(this["hideBanner"+f]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+f]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(T){mxEvent.consume(T);G()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){G()}),1E3)});mxEvent.addListener(x,"click",mxUtils.bind(this,function(T){var n=mxEvent.getSource(T);n!=E&&n!=F?(null!=l&&l(),G(),mxEvent.consume(T)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(f){null!=f&&(f.opened=new Date);this.currentFile=f};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(f,g,l,q){f=f.toDataURL("image/"+l);if(null!=f&&6<f.length)null!=g&&(f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(g))),0<q&&(f=Editor.writeGraphModelToPng(f,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return f};EditorUi.prototype.saveCanvas=function(f,g,l,q,t){var x="jpeg"==l?"jpg":l;q=this.getBaseFilename(q)+(null!=g?".drawio":"")+"."+x;f=this.createImageDataUri(f,
+g,l,t);this.saveData(q,x,f.substring(f.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(f,g){f=new TextareaDialog(this,f,g,null,null,mxResources.get("close"));this.showDialog(f.container,620,460,
+!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(f,g,l,q,t,x){"text/xml"!=l||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)f=q?this.base64ToBlob(f,l):new Blob([f],{type:l}),navigator.msSaveOrOpenBlob(f,g);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(f,!0):(l.document.write(f),
+l.document.close(),l.document.execCommand("SaveAs",!0,g),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(g+":",f):this.openInNewWindow(f,l,q);else{var E=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof E.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var F=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);x=65==(F?parseInt(F[2],10):
+!1)?!1:x}if(x||this.isOffline()){E.href=URL.createObjectURL(q?this.base64ToBlob(f,l):new Blob([f],{type:l}));x?E.download=g:E.setAttribute("target","_blank");document.body.appendChild(E);try{window.setTimeout(function(){URL.revokeObjectURL(E.href)},2E4),E.click(),E.parentNode.removeChild(E)}catch(G){}}else this.createEchoRequest(f,g,l,q,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(f,g,l,q,t,x){f="xml="+encodeURIComponent(f);return new mxXmlRequest(SAVE_URL,f+(null!=
+l?"&mime="+l:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(f,g){g=g||"";f=atob(f);for(var l=f.length,q=Math.ceil(l/1024),t=Array(q),x=0;x<q;++x){for(var E=1024*x,F=Math.min(E+1024,l),G=Array(F-E),y=0;E<F;++y,++E)G[y]=f[E].charCodeAt(0);t[x]=new Uint8Array(G)}return new Blob(t,{type:g})};EditorUi.prototype.saveLocalFile=function(f,g,l,q,t,x,E,F){x=null!=x?x:!1;E=null!=E?E:"vsdx"!=
+t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(x);isLocalStorage&&t++;var G=4>=t?2:6<t?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(y,T){try{if("_blank"==T)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(f,l,q);else if(null!=l&&"text/html"==l.substring(0,9)){var n=new EmbedDialog(this,f);this.showDialog(n.container,450,240,!0,!0);n.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(f,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(f,
+!1)+"</pre>"),v.document.close())}else T==App.MODE_DEVICE||"download"==T?this.doSaveLocalFile(f,y,l,q,null,F):null!=y&&0<y.length&&this.pickFolder(T,mxUtils.bind(this,function(H){try{this.exportFile(f,y,l,q,T,H)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,x,E,null,1<t,G,f,l,q);x=this.isServices(t)?t>G?390:280:160;this.showDialog(g.container,420,x,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
+function(f,g,l){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(f,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||l?(f=l?f:btoa(unescape(encodeURIComponent(f))),q.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+f+'"/></html>')):q.document.write("<html>"+f+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(f,!1)+"</pre></html>"),q.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(f){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=f(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
+"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
+"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=g.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();g.style.display=0<q.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=f(mxUtils.bind(this,function(q){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);
+else{this.exportDialog=document.createElement("div");var x=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var E=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});E.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(F){E.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(F,null,"png");F=document.createElement("img");F.style.maxWidth="140px";F.style.maxHeight="140px";F.style.cursor="pointer";F.style.backgroundColor="white";F.setAttribute("title",mxResources.get("openInNewWindow"));F.setAttribute("border","0");F.setAttribute("src",G);this.exportDialog.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(G.substring(G.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(f,g,l,q,t){this.isLocalFileSave()?
+this.saveLocalFile(l,f,q,t,g):this.saveRequest(f,g,mxUtils.bind(this,function(x,E){return this.createEchoRequest(l,x,q,t,g,E)}),l,t,q)};EditorUi.prototype.saveRequest=function(f,g,l,q,t,x,E){E=null!=E?E:!mxClient.IS_IOS||!navigator.standalone;var F=this.getServiceCount(!1);isLocalStorage&&F++;var G=4>=F?2:6<F?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(y,T){if("_blank"==T||null!=y&&0<y.length){var n=l("_blank"==T?null:y,T==App.MODE_DEVICE||"download"==T||null==T||"_blank"==T?"0":"1");
+null!=n&&(T==App.MODE_DEVICE||"download"==T||"_blank"==T?n.simulate(document,"_blank"):this.pickFolder(T,mxUtils.bind(this,function(v){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=q)try{this.exportFile(q,y,x,!0,T,v)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&n.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=n.getStatus()&&299>=n.getStatus())try{this.exportFile(n.getText(),y,x,!0,T,v)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(H){this.spinner.stop();this.handleError(H)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,E,null,1<F,G,q,x,t);F=this.isServices(F)?4<F?390:280:160;this.showDialog(f.container,420,F,!0,!0);f.init()};EditorUi.prototype.isServices=function(f){return 1!=f};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(f,g,l,q,t,x){};EditorUi.prototype.pickFolder=function(f,
+g,l){g(null)};EditorUi.prototype.exportSvg=function(f,g,l,q,t,x,E,F,G,y,T,n,v,H){if(this.spinner.spin(document.body,mxResources.get("export")))try{var K=this.editor.graph.isSelectionEmpty();l=null!=l?l:K;var N=g?null:this.editor.graph.background;N==mxConstants.NONE&&(N=null);null==N&&0==g&&(N=T?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var I=this.editor.graph.getSvg(N,f,E,F,null,l,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!v,T,n);q&&this.editor.graph.addSvgShadow(I);var M=
+this.getBaseFilename()+(t?".drawio":"")+".svg";H=null!=H?H:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(M,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var Q=mxUtils.bind(this,function(U){this.spinner.stop();t&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,G,null,null,null,!1));H(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(I);var P=mxUtils.bind(this,function(U){x?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,Q,this.thumbImageCache)):Q(U)});v?this.embedFonts(I,P):(this.editor.addFontCss(I),P(I))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(f,g,l,q,t,x,E){return this.addCheckbox(f,l,q,t,x,E,!0,g)};EditorUi.prototype.addCheckbox=function(f,g,l,q,t,x,E,
+F){x=null!=x?x:!0;var G=document.createElement("input");G.style.marginRight="8px";G.style.marginTop="16px";G.setAttribute("type",E?"radio":"checkbox");E="geCheckbox-"+Editor.guid();G.id=E;null!=F&&G.setAttribute("name",F);l&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);q&&G.setAttribute("disabled","disabled");x&&(f.appendChild(G),l=document.createElement("label"),mxUtils.write(l,g),l.setAttribute("for",E),f.appendChild(l),t||mxUtils.br(f));return G};EditorUi.prototype.addEditButton=function(f,
+g){var l=this.addCheckbox(f,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var q=this.getCurrentFile(),t="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));x.appendChild(q);
+q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");x.appendChild(q);f.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var E=new FilenameDialog(this,t,mxResources.get("ok"),function(F){null!=F?t=F:x.value="blank"},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,
+function(){l.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(f);return{getLink:function(){return l.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return l},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(f,g){function l(){var F=document.createElement("div");F.style.width="100%";F.style.height="100%";F.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(F.style.border="1px solid black",
+F.style.backgroundColor=x):(F.style.backgroundPosition="center center",F.style.backgroundRepeat="no-repeat",F.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");E.innerText="";E.appendChild(F)}mxUtils.write(f,mxResources.get("links")+":");var q=document.createElement("select");q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));
+q.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));q.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));q.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(g));f.appendChild(q);mxUtils.write(f,mxResources.get("borderColor")+
+":");var x="#0000ff",E=null;E=mxUtils.button("",mxUtils.bind(this,function(F){this.pickColor(x||"none",function(G){x=G;l()});mxEvent.consume(F)}));l();E.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";E.style.marginLeft="4px";E.style.height="22px";E.style.width="22px";E.style.position="relative";E.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";E.className="geColorBtn";f.appendChild(E);mxUtils.br(f);return{getColor:function(){return x},getTarget:function(){return q.value},
+focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(f,g,l,q,t,x,E){E=null!=E?E:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||E.push("lightbox=1"),"auto"!=f&&E.push("target="+f),null!=g&&g!=mxConstants.NONE&&E.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=t&&0<t.length&&E.push("edit="+encodeURIComponent(t)),x&&E.push("layers=1"),this.editor.graph.foldingEnabled&&E.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&
+this.currentPage!=this.pages[0]&&E.push("page-id="+this.currentPage.getId());return E};EditorUi.prototype.createLink=function(f,g,l,q,t,x,E,F,G,y){G=this.createUrlParameters(f,g,l,q,t,x,G);f=this.getCurrentFile();g=!0;null!=E?l="#U"+encodeURIComponent(E):(f=this.getCurrentFile(),F||null==f||f.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+f.getHash(),g=!1));g&&
+null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(f.getTitle()));y&&1<l.length&&(G.push("open="+l.substring(1)),l="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+l};EditorUi.prototype.createHtml=function(f,g,l,q,t,x,E,F,G,y,T,n){this.getBasenames();var v={};""!=
+t&&t!=mxConstants.NONE&&(v.highlight=t);"auto"!==q&&(v.target=q);y||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(v.zoom=l/100);l=[];E&&(l.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(l.push("zoom"),v.resize=!0);F&&l.push("layers");G&&l.push("tags");0<l.length&&(y&&l.push("lightbox"),v.toolbar=l.join(" "));null!=T&&0<T.length&&(v.edit=T);null!=f?v.url=f:v.xml=this.getFileData(!0,
+null,null,null,null,!E);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';f=null!=f?"&fetch="+encodeURIComponent(f):"";n(g,'<script type="text/javascript" src="'+(0<f.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+f:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(f,g,l,q){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var E=document.createElement("div");E.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var F=document.createElement("input");
+F.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","type-embedhtmldialog");x=F.cloneNode(!0);x.setAttribute("value","copy");E.appendChild(x);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));E.appendChild(G);mxUtils.br(E);E.appendChild(F);G=document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));E.appendChild(G);var y=this.getCurrentFile();
+null==l&&null!=y&&y.constructor==window.DriveFile&&(G=document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),E.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));x.setAttribute("checked","checked");null==l&&F.setAttribute("disabled","disabled");t.appendChild(E);var T=this.addLinkSection(t),n=this.addCheckbox(t,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(t,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";t.appendChild(v);var H=this.addCheckbox(t,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(t,mxResources.get("allPages"),E,!E),N=this.addCheckbox(t,mxResources.get("layers"),!0),I=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,
+mxResources.get("lightbox"),!0),Q=null;E=380;if(EditorUi.enableHtmlEditOption){Q=this.addEditButton(t,M);var P=Q.getEditInput();P.style.marginBottom="16px";E+=50;mxEvent.addListener(M,"change",function(){M.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&M.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")})}f=new CustomDialog(this,t,mxUtils.bind(this,function(){q(F.checked?l:null,n.checked,v.value,T.getTarget(),
+T.getColor(),H.checked,K.checked,N.checked,I.checked,M.checked,null!=Q?Q.getLink():null)}),null,f,g);this.showDialog(f.container,340,E,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(f,g,l,q,t,x,E,F){var G=document.createElement("div");G.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,f||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(y);var T=this.getCurrentFile();f=0;if(null==
+T||T.constructor!=window.DriveFile||g)E=null!=E?E:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{f=80;E=null!=E?E:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));y.appendChild(n);n=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(T.getId())}));n.style.marginTop="12px";n.className="geBtn";y.appendChild(n);G.appendChild(y);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));y.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
+mxUtils.bind(this,function(W){this.spinner.stop();W=new ErrorDialog(this,null,mxResources.get(null!=W?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(W.container,300,80,!0,!1);W.init()}))}))}var v=null,H=null;if(null!=l||null!=q)f+=30,mxUtils.write(G,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",
+v.value="100%",G.appendChild(v),mxUtils.write(G,mxResources.get("height")+":"),H=document.createElement("input"),H.setAttribute("type","text"),H.style.width="50px",H.style.marginLeft="6px",H.style.marginBottom="10px",H.value=q+"px",G.appendChild(H),mxUtils.br(G);var K=this.addLinkSection(G,x);l=null!=this.pages&&1<this.pages.length;var N=null;if(null==T||T.constructor!=window.DriveFile||g)N=this.addCheckbox(G,mxResources.get("allPages"),l,!l);var I=this.addCheckbox(G,mxResources.get("lightbox"),!0,
+null,null,!x),M=this.addEditButton(G,I),Q=M.getEditInput();x&&(Q.style.marginLeft=I.style.marginLeft,I.style.display="none",f-=20);var P=this.addCheckbox(G,mxResources.get("layers"),!0);P.style.marginLeft=Q.style.marginLeft;P.style.marginTop="8px";var U=this.addCheckbox(G,mxResources.get("tags"),!0);U.style.marginLeft=Q.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(P.removeAttribute("disabled"),Q.removeAttribute("disabled")):
+(P.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&I.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,G,mxUtils.bind(this,function(){t(K.getTarget(),K.getColor(),null==N?!0:N.checked,I.checked,M.getLink(),P.checked,null!=v?v.value:null,null!=H?H.value:null,U.checked)}),null,mxResources.get("create"),E,F);this.showDialog(g.container,340,300+f,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(f,g,l,q,t){var x=document.createElement("div");x.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:"+(t?"10":"4")+"px";x.appendChild(E);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var F=document.createElement("input");
+F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=this.lastExportZoom||"100%";x.appendChild(F);mxUtils.write(x,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||"0";x.appendChild(G);mxUtils.br(x)}var y=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),T=q?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);E=this.editor.graph;var n=q?null:this.addCheckbox(x,mxResources.get("transparentBackground"),E.background==mxConstants.NONE||null==E.background);null!=n&&(n.style.marginBottom="16px");f=new CustomDialog(this,x,mxUtils.bind(this,function(){var v=parseInt(F.value)/100||1,H=parseInt(G.value)||0;l(!y.checked,null!=T?T.checked:!1,null!=n?n.checked:!1,v,H)}),null,f,g);
+this.showDialog(f.container,300,(t?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(f,g,l,q,t,x,E,F,G){E=null!=E?E:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var T=this.editor.graph,n="jpeg"==F?220:300,v=document.createElement("h3");mxUtils.write(v,f);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(v);mxUtils.write(y,mxResources.get("zoom")+":");var H=document.createElement("input");
+H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.style.marginRight="12px";H.value=this.lastExportZoom||"100%";y.appendChild(H);mxUtils.write(y,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";y.appendChild(K);mxUtils.br(y);var N=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,
+T.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");var M=document.createElement("select");M.style.marginTop="16px";M.style.marginLeft="8px";f=["selectionOnly","diagram","page"];var Q={};for(v=0;v<f.length;v++)if(!T.isSelectionEmpty()||"selectionOnly"!=f[v]){var P=document.createElement("option");mxUtils.write(P,mxResources.get(f[v]));P.setAttribute("value",
+f[v]);M.appendChild(P);Q[f[v]]=P}G?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(M),mxUtils.br(y),n+=26,mxEvent.addListener(M,"change",function(){"selectionOnly"==M.value&&(N.checked=!0)})):x&&(y.appendChild(I),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),n+=30,mxEvent.addListener(N,"change",function(){N.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));T.isSelectionEmpty()?G&&(N.style.display="none",N.nextSibling.style.display="none",N.nextSibling.nextSibling.style.display=
+"none",n-=30):(M.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(N,"change",function(){M.value=N.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=F),W=null;Editor.isDarkMode()&&(W=this.addCheckbox(y,mxResources.get("dark"),!0),n+=26);var p=this.addCheckbox(y,mxResources.get("shadow"),T.shadowVisible),D=null;if("png"==F||"jpeg"==F)D=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),n+=30;var L=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),E,null,null,"jpeg"!=F);L.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="8px";O.style.marginRight="10px";O.style.marginBottom="16px";
+O.className="geBtn";x=document.createElement("option");x.setAttribute("value","none");mxUtils.write(x,mxResources.get("noChange"));O.appendChild(x);x=document.createElement("option");x.setAttribute("value","embedFonts");mxUtils.write(x,mxResources.get("embedFonts"));O.appendChild(x);x=document.createElement("option");x.setAttribute("value","lblToSvg");mxUtils.write(x,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||O.appendChild(x);mxEvent.addListener(O,"change",mxUtils.bind(this,
+function(){"lblToSvg"==O.value?(V.checked=!0,V.setAttribute("disabled","disabled"),Q.page.style.display="none","page"==M.value&&(M.value="diagram"),p.checked=!1,p.setAttribute("disabled","disabled"),S.style.display="inline-block",R.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),p.removeAttribute("disabled"),Q.page.style.display="",S.style.display="none",R.style.display="")}));g&&(y.appendChild(V),mxUtils.write(y,mxResources.get("embedImages")),
+mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(O),mxUtils.br(y),n+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));R.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));R.appendChild(g);
+g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));R.appendChild(g);var S=document.createElement("div");mxUtils.write(S,mxResources.get("LinksLost"));S.style.margin="7px";S.style.display="none";"svg"==F&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(R),y.appendChild(S),mxUtils.br(y),mxUtils.br(y),n+=50);l=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=K.value;this.lastExportZoom=H.value;
+t(H.value,U.checked,!N.checked,p.checked,L.checked,V.checked,K.value,I.checked,!1,R.value,null!=D?D.checked:null,null!=W?W.checked:null,M.value,"embedFonts"==O.value,"lblToSvg"==O.value)}),null,l,q);this.showDialog(l.container,340,n,!0,!0,null,null,null,null,!0);H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(f,g,l,q,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";
+var E=this.editor.graph;if(null!=g){var F=document.createElement("h3");mxUtils.write(F,g);F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(F)}var G=this.addCheckbox(x,mxResources.get("fit"),!0),y=this.addCheckbox(x,mxResources.get("shadow"),E.shadowVisible&&q,!q),T=this.addCheckbox(x,l),n=this.addCheckbox(x,mxResources.get("lightbox"),!0),v=this.addEditButton(x,n),H=v.getEditInput(),K=1<E.model.getChildCount(E.model.getRoot()),N=this.addCheckbox(x,mxResources.get("layers"),
+K,!K);N.style.marginLeft=H.style.marginLeft;N.style.marginBottom="12px";N.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(K&&N.removeAttribute("disabled"),H.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&n.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){f(G.checked,y.checked,T.checked,
+n.checked,v.getLink(),N.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(f,g,l,q,t,x,E,F){function G(H){var K=" ",N="";q&&(K=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=T?"&page="+T:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",N+="cursor:pointer;");f&&(N+="max-width:100%;");var I="";l&&(I=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');E('<img src="'+H+'"'+I+(""!=N?' style="'+N+'"':"")+K+"/>")}var y=this.editor.graph.getGraphBounds(),T=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(H){var K=q?this.getFileData(!0):null;H=
+this.createImageDataUri(H,K,"png");G(H)}),null,null,null,mxUtils.bind(this,function(H){F({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),y.width*y.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var n="";l&&(n="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+n+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&&
+299>=v.getStatus()?G("data:image/png;base64,"+v.getText()):F({message:mxResources.get("unknownError")})}))}else F({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(f,g,l,q,t,x,E){var F=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l),G=F.getElementsByTagName("a");if(null!=G)for(var y=0;y<G.length;y++){var T=G[y].getAttribute("href");null!=T&&"#"==T.charAt(0)&&"_blank"==G[y].getAttribute("target")&&G[y].removeAttribute("target")}q&&
+F.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(F);if(l){var n=" ",v="";q&&(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.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":
+"")+"');}})(this);\"",v+="cursor:pointer;");f&&(v+="max-width:100%;");this.editor.convertImages(F,mxUtils.bind(this,function(H){E('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(H))+'"'+(""!=v?' style="'+v+'"':"")+n+"/>")}))}else v="",q&&(g=this.getSelectedPageIndex(),F.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),f&&(f=parseInt(F.getAttribute("width")),t=parseInt(F.getAttribute("height")),F.setAttribute("viewBox","-0.5 -0.5 "+f+" "+t),v+="max-width:100%;max-height:"+t+"px;",F.removeAttribute("height")),""!=v&&F.setAttribute("style",v),this.editor.addFontCss(F),this.editor.graph.mathEnabled&&this.editor.addMathCss(F),E(mxUtils.getXml(F))};EditorUi.prototype.timeSince=function(f){f=
+Math.floor((new Date-f)/1E3);var g=Math.floor(f/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(f/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(f/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(f/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(f/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(f,g){if(null!=f){var l=null;if("diagram"==f.nodeName)l=
+f;else if("mxfile"==f.nodeName){var q=f.getElementsByTagName("diagram");if(0<q.length){l=q[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=l&&(f=Editor.parseDiagramNode(l))}q=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(f)}catch(x){}finally{this.editor.graph=q}return f};EditorUi.prototype.getPngFileProperties=function(f){var g=1,l=0;if(null!=
+f){if(f.hasAttribute("scale")){var q=parseFloat(f.getAttribute("scale"));!isNaN(q)&&0<q&&(g=q)}f.hasAttribute("border")&&(q=parseInt(f.getAttribute("border")),!isNaN(q)&&0<q&&(l=q))}return{scale:g,border:l}};EditorUi.prototype.getEmbeddedPng=function(f,g,l,q,t){try{var x=this.editor.graph,E=null!=x.themes&&"darkTheme"==x.defaultThemeName,F=null;if(null!=l&&0<l.length)x=this.createTemporaryGraph(E?x.getDefaultStylesheet():x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
+!0),x),F=l;else if(E||null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(E?x.getDefaultStylesheet():x.getStylesheet());var G=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&x.setBackgroundImage(y.viewState.backgroundImage);x.getGlobalVariable=function(T){return"page"==T?y.getName():"pagenumber"==T?1:G.apply(this,
+arguments)};document.body.appendChild(x.container);x.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(T){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var n=T.toDataURL("image/png");n=Editor.writeGraphModelToPng(n,"tEXt","mxfile",encodeURIComponent(F));f(n.substring(n.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(T){null!=g&&
+g(T)}),null,null,q,null,x.shadowVisible,null,x,t,null,null,null,"diagram",null)}catch(T){null!=g&&g(T)}};EditorUi.prototype.getEmbeddedSvg=function(f,g,l,q,t,x,E,F,G,y,T,n,v){F=null!=F?F:!0;T=null!=T?T:0;E=null!=G?G:g.background;E==mxConstants.NONE&&(E=null);x=g.getSvg(E,y,T,null,null,x,null,null,null,g.shadowVisible||n,null,v,"diagram");(g.shadowVisible||n)&&g.addSvgShadow(x,null,null,0==T);null!=f&&x.setAttribute("content",f);null!=l&&x.setAttribute("resource",l);var H=mxUtils.bind(this,function(K){K=
+(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=t&&t(K);return K});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(K){F?this.editor.convertImages(K,mxUtils.bind(this,function(N){H(N)})):H(K)}));else return H(x)};EditorUi.prototype.embedFonts=function(f,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(f,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(f,l),g(f)}catch(q){g(f)}}))}catch(l){g(f)}}))};EditorUi.prototype.exportImage=function(f,g,l,q,t,x,E,F,G,y,T,n,v){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var H=this.editor.graph.isSelectionEmpty();l=null!=l?l:H;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K,
+t?this.getFileData(!0,null,null,null,l,F):null,G,null==this.pages||0==this.pages.length,T)}catch(N){this.handleError(N)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,l,f||1,g,q,null,null,x,E,y,n,v)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(f){return this.editor.isCorsEnabledForUrl(f)};EditorUi.prototype.importXml=function(f,g,l,q,t,x,E){g=null!=g?g:0;l=null!=l?l:0;var F=[];try{var G=
+this.editor.graph;if(null!=f&&0<f.length){G.model.beginUpdate();try{var y=mxUtils.parseXml(f);f={};var T=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=T&&"mxfile"==T.nodeName&&null!=this.pages){var n=T.getElementsByTagName("diagram");if(1==n.length&&!x){if(T=Editor.parseDiagramNode(n[0]),null!=this.currentPage&&(f[n[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=n[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,v))}}else if(0<n.length){x=[];var H=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(f[n[0].getAttribute("id")]=this.pages[0].getId(),T=Editor.parseDiagramNode(n[0]),q=!1,H=1);for(;H<n.length;H++){var K=n[H].getAttribute("id");n[H].removeAttribute("id");var N=this.updatePageRoot(new DiagramPage(n[H]));f[K]=n[H].getAttribute("id");var I=this.pages.length;null==N.getName()&&N.setName(mxResources.get("pageWithNumber",[I+1]));G.model.execute(new ChangePage(this,N,N,I,
+!0));x.push(N)}this.updatePageLinks(f,x)}}if(null!=T&&"mxGraphModel"===T.nodeName){F=G.importGraphModel(T,g,l,q);if(null!=F)for(H=0;H<F.length;H++)this.updatePageLinksForCell(f,F[H]);var M=G.parseBackgroundImage(T.getAttribute("backgroundImage"));if(null!=M&&null!=M.originalSrc){this.updateBackgroundPageLink(f,M);var Q=new ChangePageSetup(this,null,M);Q.ignoreColor=!0;G.model.execute(Q)}}E&&this.insertHandler(F,null,null,G.defaultVertexStyle,G.defaultEdgeStyle,!1,!0)}finally{G.model.endUpdate()}}}catch(P){if(t)throw P;
+this.handleError(P)}return F};EditorUi.prototype.updatePageLinks=function(f,g){for(var l=0;l<g.length;l++)this.updatePageLinksForCell(f,g[l].root),null!=g[l].viewState&&this.updateBackgroundPageLink(f,g[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(f,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var l=f[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=l&&(g.originalSrc="data:page/id,"+l)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell=
+function(f,g){var l=document.createElement("div"),q=this.editor.graph,t=q.getLinkForCell(g);null!=t&&q.setLinkForCell(g,this.updatePageLink(f,t));if(q.isHtmlLabel(g)){l.innerHTML=q.sanitizeHtml(q.getLabel(g));for(var x=l.getElementsByTagName("a"),E=!1,F=0;F<x.length;F++)t=x[F].getAttribute("href"),null!=t&&(x[F].setAttribute("href",this.updatePageLink(f,t)),E=!0);E&&q.labelChanged(g,l.innerHTML)}for(F=0;F<q.model.getChildCount(g);F++)this.updatePageLinksForCell(f,q.model.getChildAt(g,F))};EditorUi.prototype.updatePageLink=
+function(f,g){if(Graph.isPageLink(g)){var l=f[g.substring(g.indexOf(",")+1)];g=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==g.substring(0,17))try{var q=JSON.parse(g.substring(17));if(null!=q.actions){for(var t=0;t<q.actions.length;t++){var x=q.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var E=x.open.substring(x.open.indexOf(",")+1);l=f[E];null!=l?x.open="data:page/id,"+l:null==this.getPageById(E)&&delete x.open}}g="data:action/json,"+JSON.stringify(q)}}catch(F){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(f){return/(\.v(sd|dx))($|\?)/i.test(f)||/(\.vs(s|x))($|\?)/i.test(f)};EditorUi.prototype.importVisio=function(f,g,l,q,t){q=null!=q?q:f.name;l=null!=l?l:mxUtils.bind(this,function(E){this.handleError(E)});var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(q);try{var F="UNKNOWN-VISIO",G=q.lastIndexOf(".");if(0<=G&&G<q.length)F=q.substring(G+1).toUpperCase();else{var y=q.lastIndexOf("/");0<=
+y&&y<q.length&&(q=q.substring(y+1))}EditorUi.logEvent({category:F+"-MS-IMPORT-FILE",action:"filename_"+q,label:E?"remote":"local"})}catch(n){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())l({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",f,q);var T=new XMLHttpRequest;T.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(q)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
+null!=t&&T.setRequestHeader("x-convert-custom",t);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState)if(200<=T.status&&299>=T.status)try{var n=T.response;if("text/xml"==n.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(H){try{g(H.target.result)}catch(K){l({message:mxResources.get("errorLoadingFile")})}});v.readAsText(n)}else this.doImportVisio(n,g,l,q)}catch(H){l(H)}else try{""==T.responseType||"text"==T.responseType?l({message:T.responseText}):(v=new FileReader,v.onload=
+function(){l({message:JSON.parse(v.result).Message})},v.readAsText(T.response))}catch(H){l({})}});T.send(E)}else try{this.doImportVisio(f,g,l,q)}catch(n){l(n)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importGraphML=function(f,g,l){l=null!=l?l:mxUtils.bind(this,function(t){this.handleError(t)});
+var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(f,g,l)}catch(t){l(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(f){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(f)||
+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)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(f,g,l){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t=
+JSON.parse(f);g(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+f.length}),null!=window.console&&"1"==urlParams.test){var x=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&x.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var E=0;E<t.svgThumbs.length;E++)x.push(Editor.createSvgDataUri(t.svgThumbs[E]));null!=t.thumb&&x.push(t.thumb);console.log.apply(console,x)}}catch(F){}}catch(F){null!=window.console&&console.error(F),l(F)}else l({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",q)})})})}):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generateMermaidImage=function(f,
+g,l,q){var t=this,x=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),f,function(E){try{if(mxClient.IS_IE||mxClient.IS_IE11)E=E.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var F=mxUtils.parseXml(E).getElementsByTagName("svg");
+if(0<F.length){var G=parseFloat(F[0].getAttribute("width")),y=parseFloat(F[0].getAttribute("height"));if(isNaN(G)||isNaN(y))try{var T=F[0].getAttribute("viewBox").split(/\s+/);G=parseFloat(T[2]);y=parseFloat(T[3])}catch(n){G=G||100,y=y||100}l(t.convertDataUri(Editor.createSvgDataUri(E)),G,y)}else q({message:mxResources.get("invalidInput")})}catch(n){q(n)}})}catch(E){q(E)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?x():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+x):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generatePlantUmlImage=function(f,g,l,q){function t(F,G,y){c1=F>>2;c2=(F&3)<<4|G>>4;c3=(G&15)<<2|y>>6;c4=y&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(F){if(10>F)return String.fromCharCode(48+F);F-=10;if(26>F)return String.fromCharCode(65+F);F-=26;if(26>F)return String.fromCharCode(97+F);F-=26;return 0==F?"-":1==F?"_":"?"}var E=new XMLHttpRequest;E.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(F){r="";for(i=0;i<F.length;i+=3)r=i+2==F.length?r+t(F.charCodeAt(i),F.charCodeAt(i+1),0):i+1==F.length?r+t(F.charCodeAt(i),0,0):r+t(F.charCodeAt(i),F.charCodeAt(i+1),F.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(f))),!0);"txt"!=g&&(E.responseType="blob");E.onload=function(F){if(200<=this.status&&300>this.status)if("txt"==g)l(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(y){var T=new Image;T.onload=
+function(){try{var n=T.width,v=T.height;if(0==n&&0==v){var H=G.result,K=H.indexOf(","),N=decodeURIComponent(escape(atob(H.substring(K+1)))),I=mxUtils.parseXml(N).getElementsByTagName("svg");0<I.length&&(n=parseFloat(I[0].getAttribute("width")),v=parseFloat(I[0].getAttribute("height")))}l(G.result,n,v)}catch(M){q(M)}};T.src=G.result};G.onerror=function(y){q(y)}}else q(F)};E.onerror=function(F){q(F)};E.send()};EditorUi.prototype.insertAsPreText=function(f,g,l){var q=this.editor.graph,t=null;q.getModel().beginUpdate();
+try{t=q.insertVertex(null,null,"<pre>"+f+"</pre>",g,l,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(t,!0)}finally{q.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(f,g,l,q,t,x,E,F){x=null!=x?x:!0;E=null!=E?E:!0;if(null!=f)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(f.replace(/\s+/g," "),mxUtils.bind(this,function(v){4==
+v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,l,!0))}));else if("data:"==f.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f))){var G=this.editor.graph;if("data:application/pdf;base64,"==f.substring(0,28)){var y=Editor.extractGraphModelFromPdf(f);if(null!=y&&0<y.length)return this.importXml(y,g,l,x,!0,F)}if(Editor.isPngDataUrl(f)&&(y=Editor.extractGraphModelFromPng(f),null!=y&&0<y.length))return this.importXml(y,
+g,l,x,!0,F);if("data:image/svg+xml;"==f.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==f.substring(0,26)?(y=f.substring(f.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(f.substring(f.indexOf(",")+1));var T=this.importXml(y,g,l,x,!0,F);if(0<T.length)return T}catch(v){}this.loadImage(f,mxUtils.bind(this,function(v){if("data:"==f.substring(0,5))this.resizeImage(v,f,mxUtils.bind(this,function(N,I,M){G.setSelectionCell(G.insertVertex(null,null,
+"",G.snap(g),G.snap(l),I,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(N)+";"))}),E,this.maxImageSize);else{var H=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),K=Math.round(v.width*H);v=Math.round(v.height*H);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(g),G.snap(l),K,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+f+";"))}}),mxUtils.bind(this,function(){var v=null;G.getModel().beginUpdate();try{v=G.insertVertex(G.getDefaultParent(),null,f,G.snap(g),G.snap(l),1,1,"text;"+(q?"html=1;":"")),G.updateCellSize(v),G.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{G.getModel().endUpdate()}G.setSelectionCell(v)}))}else{f=Graph.zapGremlins(mxUtils.trim(f));if(this.isCompatibleString(f))return this.importXml(f,g,l,x,null,F);if(0<f.length)if(this.isLucidChartData(f))this.convertLucidChart(f,mxUtils.bind(this,
+function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,l,x,null,F))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{G=this.editor.graph;t=null;G.getModel().beginUpdate();try{t=G.insertVertex(G.getDefaultParent(),null,"",G.snap(g),G.snap(l),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==f.charAt(0)&&f.indexOf(">")==f.length-1&&(f=mxUtils.htmlEntities(f));f.length>this.maxTextBytes&&(f=f.substring(0,this.maxTextBytes)+
+"...");t.value=f;G.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var n=G.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=n.width;t.geometry.height=n.height}Graph.isLink(t.value)&&G.setLinkForCell(t,t.value);t.geometry.width+=G.gridSize;t.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(f){var g=-1;do f/=1024,g++;while(1024<f);return Math.max(f,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+EditorUi.prototype.convertDataUri=function(f){if("data:"==f.substring(0,5)){var g=f.indexOf(";");0<g&&(f=f.substring(0,g)+f.substring(f.indexOf(",",g+1)))}return f};EditorUi.prototype.isRemoteFileFormat=function(f,g){return/("contentType":\s*"application\/gliffy\+json")/.test(f)};EditorUi.prototype.isLucidChartData=function(f){return null!=f&&('{"state":"{\\"Properties\\":'==f.substring(0,26)||'{"Properties":'==f.substring(0,14))};EditorUi.prototype.importLocalFile=function(f,g){if(f&&Graph.fileSupport){if(null==
+this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(E,F){StorageFile.listFiles(this,
+"F",E,F)});window.openBrowserFile=mxUtils.bind(this,function(E,F,G){StorageFile.getFileContent(this,E,F,G)});window.deleteBrowserFile=mxUtils.bind(this,function(E,F,G){StorageFile.deleteFile(this,E,F,G)});if(!g){var q=Editor.useLocalStorage;Editor.useLocalStorage=!f}window.openFile=new OpenFile(mxUtils.bind(this,function(E){this.hideDialog(E)}));window.openFile.setConsumer(mxUtils.bind(this,function(E,F){null!=F&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(F)?(E=new Blob([E],{type:"application/octet-stream"}),
+this.importVisio(E,mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,F)):this.editor.graph.setSelectionCells(this.importXml(E,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=q;x.apply(t,arguments);E&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(f,g,l){var q=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(f).then(function(x){if(mxUtils.isEmptyObject(x.files))l();else{var E=0,F,G=!1;x.forEach(function(y,T){y=T.name.toLowerCase();"diagram/diagram.xml"==y?(G=!0,T.async("string").then(function(n){0==n.indexOf("<mxfile ")?g(n):l()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>E&&(E=y,F=T))});0<E?F.async("string").then(function(y){(new XMLHttpRequest).upload&&
+q.isRemoteFileFormat(y,f.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):q.parseFileData(y,mxUtils.bind(this,function(T){4==T.readyState&&(200<=T.status&&299>=T.status?g(T.responseText):l())}),f.name):l()}):G||l()}},function(x){l(x)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(f,g,l,q,t,x,E,F,G,y,T,n){y=null!=
+y?y:!0;var v=!1,H=null,K=mxUtils.bind(this,function(N){var I=null;null!=N&&"<mxlibrary"==N.substring(0,10)?this.loadLibrary(new LocalLibrary(this,N,E)):I=this.importXml(N,l,q,y,null,null!=n?mxEvent.isControlDown(n):null);null!=F&&F(I)});"image"==g.substring(0,5)?(G=!1,"image/png"==g.substring(0,9)&&(g=T?null:this.extractGraphModelFromPng(f),null!=g&&0<g.length&&(H=this.importXml(g,l,q,y,null,null!=n?mxEvent.isControlDown(n):null),G=!0)),G||(g=this.editor.graph,G=f.indexOf(";"),0<G&&(f=f.substring(0,
+G)+f.substring(f.indexOf(",",G+1))),y&&g.isGridEnabled()&&(l=g.snap(l),q=g.snap(q)),H=[g.insertVertex(null,null,"",l,q,t,x,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+f+";")])):/(\.*<graphml )/.test(f)?(v=!0,this.importGraphML(f,K)):null!=G&&null!=E&&(/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E))?(v=!0,this.importVisio(G,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,E)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,t=mxUtils.bind(this,function(N){4==N.readyState&&(200<=N.status&&299>=N.status?K(N.responseText):null!=F&&F(null))}),null!=f?this.parseFileData(f,t,E):this.parseFile(G,t,E)):0==f.indexOf("PK")&&null!=G?(v=!0,this.importZipFile(G,K,mxUtils.bind(this,function(){H=this.insertTextAt(this.validateFileData(f),l,q,!0,null,y);F(H)}))):/(\.v(sd|dx))($|\?)/i.test(E)||/(\.vs(s|x))($|\?)/i.test(E)||(H=this.insertTextAt(this.validateFileData(f),
+l,q,!0,null,y,null,null!=n?mxEvent.isControlDown(n):null));v||null==F||F(H);return H};EditorUi.prototype.importFiles=function(f,g,l,q,t,x,E,F,G,y,T,n,v){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var H=null!=g&&null!=l,K=!0;g=null!=g?g:0;l=null!=l?l:0;var N=!1;if(!mxClient.IS_CHROMEAPP&&null!=f)for(var I=T||this.resampleThreshold,M=0;M<f.length;M++)if("image/svg"!==f[M].type.substring(0,9)&&"image/"===f[M].type.substring(0,6)&&f[M].size>I){N=!0;break}var Q=mxUtils.bind(this,function(){var P=
+this.editor.graph,U=P.gridSize;t=null!=t?t:mxUtils.bind(this,function(O,R,S,X,Y,aa,ba,da,Z){try{return null!=O&&"<mxlibrary"==O.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,O,ba)),null):this.isCompatibleString(O)&&1==f.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,O,ba,!0)),null):this.importFile(O,R,S,X,Y,aa,ba,da,Z,H,n,v)}catch(ha){return this.handleError(ha),null}});x=null!=x?x:mxUtils.bind(this,function(O){P.setSelectionCells(O)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var W=f.length,p=W,D=[],L=mxUtils.bind(this,function(O,R){D[O]=R;if(0==--p){this.spinner.stop();if(null!=F)F(D);else{var S=[];P.getModel().beginUpdate();try{for(O=0;O<D.length;O++){var X=D[O]();null!=X&&(S=S.concat(X))}}finally{P.getModel().endUpdate()}}x(S)}}),V=0;V<W;V++)mxUtils.bind(this,function(O){var R=f[O];if(null!=R){var S=new FileReader;S.onload=mxUtils.bind(this,function(X){if(null==E||E(R))if("image/"==R.type.substring(0,
+6))if("image/svg"==R.type.substring(0,9)){var Y=Graph.clipSvgDataUri(X.target.result),aa=Y.indexOf(",");aa=decodeURIComponent(escape(atob(Y.substring(aa+1))));var ba=mxUtils.parseXml(aa);aa=ba.getElementsByTagName("svg");if(0<aa.length){aa=aa[0];var da=n?null:aa.getAttribute("content");null!=da&&"<"!=da.charAt(0)&&"%"!=da.charAt(0)&&(da=unescape(window.atob?atob(da):Base64.decode(da,!0)));null!=da&&"%"==da.charAt(0)&&(da=decodeURIComponent(da));null==da||"<mxfile "!==da.substring(0,8)&&"<mxGraphModel "!==
+da.substring(0,14)?L(O,mxUtils.bind(this,function(){try{if(null!=ba){var ea=ba.getElementsByTagName("svg");if(0<ea.length){var ua=ea[0],ya=ua.getAttribute("width"),xa=ua.getAttribute("height");ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var va=ua.getAttribute("viewBox");if(null==va||0==va.length)ua.setAttribute("viewBox","0 0 "+ya+" "+xa);else if(isNaN(ya)||isNaN(xa)){var ka=va.split(" ");3<ka.length&&(ya=parseFloat(ka[2]),
+xa=parseFloat(ka[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(ua));var Na=Math.min(1,Math.min(q/Math.max(1,ya)),q/Math.max(1,xa)),Ia=t(Y,R.type,g+O*U,l+O*U,Math.max(1,Math.round(ya*Na)),Math.max(1,Math.round(xa*Na)),R.name);if(isNaN(ya)||isNaN(xa)){var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){ya=Math.max(1,Ca.width);xa=Math.max(1,Ca.height);Ia[0].geometry.width=ya;Ia[0].geometry.height=xa;ua.setAttribute("viewBox","0 0 "+ya+" "+xa);Y=Editor.createSvgDataUri(mxUtils.getXml(ua));var oa=
+Y.indexOf(";");0<oa&&(Y=Y.substring(0,oa)+Y.substring(Y.indexOf(",",oa+1)));P.setCellStyles("image",Y,[Ia[0]])});Ca.src=Editor.createSvgDataUri(mxUtils.getXml(ua))}return Ia}}}catch(oa){}return null})):L(O,mxUtils.bind(this,function(){return t(da,"text/xml",g+O*U,l+O*U,0,0,R.name)}))}else L(O,mxUtils.bind(this,function(){return null}))}else{aa=!1;if("image/png"==R.type){var Z=n?null:this.extractGraphModelFromPng(X.target.result);if(null!=Z&&0<Z.length){var ha=new Image;ha.src=X.target.result;L(O,
+mxUtils.bind(this,function(){return t(Z,"text/xml",g+O*U,l+O*U,ha.width,ha.height,R.name)}));aa=!0}}aa||(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(X.target.result,mxUtils.bind(this,function(ea){this.resizeImage(ea,X.target.result,mxUtils.bind(this,function(ua,
+ya,xa){L(O,mxUtils.bind(this,function(){if(null!=ua&&ua.length<y){var va=K&&this.isResampleImageSize(R.size,T)?Math.min(1,Math.min(q/ya,q/xa)):1;return t(ua,R.type,g+O*U,l+O*U,Math.round(ya*va),Math.round(xa*va),R.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),K,q,T,R.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=X.target.result,t(Y,R.type,g+O*U,l+O*U,240,160,R.name,function(ea){L(O,function(){return ea})},
+R)});/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name)?t(null,R.type,g+O*U,l+O*U,240,160,R.name,function(X){L(O,function(){return X})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?S.readAsDataURL(R):S.readAsText(R)}})(V)});if(N){N=[];for(M=0;M<f.length;M++)N.push(f[M]);f=N;this.confirmImageResize(function(P){K=P;Q()},G)}else Q()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==
+mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(f,g){g=null!=g?g:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,E){if(x||g)mxSettings.setResizeImages(x?E:null),mxSettings.save();l();f(E)};null==q||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!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):t(!1,q)};EditorUi.prototype.parseFile=function(f,g,l){l=null!=l?l:f.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,g,l)});q.readAsText(f)};EditorUi.prototype.parseFileData=function(f,g,l){var q=new XMLHttpRequest;
+q.open("POST",OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){g(q)};q.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(f));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(f,g){g=null!=g?g:this.resampleThreshold;return f>g};EditorUi.prototype.resizeImage=function(f,g,l,q,t,x,E){t=null!=t?t:this.maxImageSize;var F=Math.max(1,
+f.width),G=Math.max(1,f.height);if(q&&this.isResampleImageSize(null!=E?E:g.length,x))try{var y=Math.max(F/t,G/t);if(1<y){var T=Math.round(F/y),n=Math.round(G/y),v=document.createElement("canvas");v.width=T;v.height=n;v.getContext("2d").drawImage(f,0,0,T,n);var H=v.toDataURL();if(H.length<g.length){var K=document.createElement("canvas");K.width=T;K.height=n;var N=K.toDataURL();H!==N&&(g=H,F=T,G=n)}}}catch(I){}l(g,F,G)};EditorUi.prototype.extractGraphModelFromPng=function(f){return Editor.extractGraphModelFromPng(f)};
+EditorUi.prototype.loadImage=function(f,g,l){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;g(q)};null!=l&&(q.onerror=l);q.src=f}catch(t){if(null!=l)l(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var f="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:f)};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var f=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(I){var M=I.getEvent();return null==I.getState()&&
+!mxEvent.isMouseEvent(M)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(M)&&(null==I.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))});g.cellEditor.editPlantUmlData=function(I,M,Q){var P=JSON.parse(Q);M=new TextareaDialog(f,mxResources.get("plantUml")+":",P.data,function(U){null!=U&&f.spinner.spin(document.body,mxResources.get("inserting"))&&f.generatePlantUmlImage(U,P.format,function(W,p,D){f.spinner.stop();g.getModel().beginUpdate();try{if("txt"==P.format)g.labelChanged(I,"<pre>"+
+W+"</pre>"),g.updateCellSize(I,!0);else{g.setCellStyles("image",f.convertDataUri(W),[I]);var L=g.model.getGeometry(I);null!=L&&(L=L.clone(),L.width=p,L.height=D,g.cellsResized([I],[L],!1))}g.setAttributeForCell(I,"plantUmlData",JSON.stringify({data:U,format:P.format}))}finally{g.getModel().endUpdate()}},function(W){f.handleError(W)})},null,null,400,220);f.showDialog(M.container,420,300,!0,!0);M.init()};g.cellEditor.editMermaidData=function(I,M,Q){var P=JSON.parse(Q);M=new TextareaDialog(f,mxResources.get("mermaid")+
+":",P.data,function(U){null!=U&&f.spinner.spin(document.body,mxResources.get("inserting"))&&f.generateMermaidImage(U,P.config,function(W,p,D){f.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",W,[I]);var L=g.model.getGeometry(I);null!=L&&(L=L.clone(),L.width=Math.max(L.width,p),L.height=Math.max(L.height,D),g.cellsResized([I],[L],!1));g.setAttributeForCell(I,"mermaidData",JSON.stringify({data:U,config:P.config},null,2))}finally{g.getModel().endUpdate()}},function(W){f.handleError(W)})},
+null,null,400,220);f.showDialog(M.container,420,300,!0,!0);M.init()};var l=g.cellEditor.startEditing;g.cellEditor.startEditing=function(I,M){try{var Q=this.graph.getAttributeForCell(I,"plantUmlData");if(null!=Q)this.editPlantUmlData(I,M,Q);else if(Q=this.graph.getAttributeForCell(I,"mermaidData"),null!=Q)this.editMermaidData(I,M,Q);else{var P=g.getCellStyle(I);"1"==mxUtils.getValue(P,"metaEdit","0")?f.showDataDialog(I):l.apply(this,arguments)}}catch(U){f.handleError(U)}};g.getLinkTitle=function(I){return f.getLinkTitle(I)};
+g.customLinkClicked=function(I){var M=!1;try{f.handleCustomLink(I),M=!0}catch(Q){f.handleError(Q)}return M};var q=g.parseBackgroundImage;g.parseBackgroundImage=function(I){var M=q.apply(this,arguments);null!=M&&null!=M.src&&Graph.isPageLink(M.src)&&(M={originalSrc:M.src});return M};var t=g.setBackgroundImage;g.setBackgroundImage=function(I){null!=I&&null!=I.originalSrc&&(I=f.createImageForPageLink(I.originalSrc,f.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
+function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(I,M){I=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=I){var Q=I.indexOf(",");if(0<Q)for(I=I.substring(Q+1),M=M.getProperty("patches"),Q=0;Q<M.length;Q++)if(null!=M[Q][EditorUi.DIFF_UPDATE]&&null!=M[Q][EditorUi.DIFF_UPDATE][I]||null!=M[Q][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(M[Q][EditorUi.DIFF_REMOVE],
+I)){g.refreshBackgroundImage();break}}}));var x=g.getBackgroundImageObject;g.getBackgroundImageObject=function(I,M){var Q=x.apply(this,arguments);if(null!=Q&&null!=Q.originalSrc)if(!M)Q={src:Q.originalSrc};else if(M&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var P=this.stylesheet,U=this.shapeForegroundColor,W=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";Q=f.createImageForPageLink(Q.originalSrc);
+this.shapeBackgroundColor=W;this.shapeForegroundColor=U;this.stylesheet=P}return Q};var E=this.clearDefaultStyle;this.clearDefaultStyle=function(){E.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var F=
+f.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(I){I=null!=I?I:"";"1"==urlParams.dev&&(I+=(0<I.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(I,M,Q){var P=M;M=function(U,W){if(null==W){var p=mxEvent.getSource(U);"a"==p.nodeName.toLowerCase()&&(W=p.getAttribute("href"))}null!=W&&g.isCustomLink(W)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&g.customLinkClicked(W)&&mxEvent.consume(U);null!=P&&P(U,W)};G.call(this,I,
+M,Q)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(I,M,Q){f.editor.graph.isSelectionEmpty()?y.apply(this,arguments):f.menus.addMenuItems(I,"delete - cut copy copyAsImage - duplicate".split(" "),null,Q)}}f.actions.get("print").funct=function(){f.showDialog((new PrintDialog(f)).container,360,null!=f.pages&&1<f.pages.length?470:390,
+!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var T=g.getExportVariables;g.getExportVariables=function(){var I=T.apply(this,arguments),M=f.getCurrentFile();null!=M&&(I.filename=M.getTitle());I.pagecount=null!=f.pages?f.pages.length:1;I.page=null!=f.currentPage?f.currentPage.getName():"";I.pagenumber=null!=f.pages&&null!=f.currentPage?mxUtils.indexOf(f.pages,f.currentPage)+1:1;return I};var n=g.getGlobalVariable;g.getGlobalVariable=function(I){var M=f.getCurrentFile();return"filename"==
+I&&null!=M?M.getTitle():"page"==I&&null!=f.currentPage?f.currentPage.getName():"pagenumber"==I?null!=f.currentPage&&null!=f.pages?mxUtils.indexOf(f.pages,f.currentPage)+1:1:"pagecount"==I?null!=f.pages?f.pages.length:1:n.apply(this,arguments)};var v=g.labelLinkClicked;g.labelLinkClicked=function(I,M,Q){var P=M.getAttribute("href");if(null==P||!g.isCustomLink(P)||!mxEvent.isTouchEvent(Q)&&mxEvent.isPopupTrigger(Q))v.apply(this,arguments);else{if(!g.isEnabled()||null!=I&&g.isCellLocked(I.cell))g.customLinkClicked(P),
+g.getRubberband().reset();mxEvent.consume(Q)}};this.editor.getOrCreateFilename=function(){var I=f.defaultFilename,M=f.getCurrentFile();null!=M&&(I=null!=M.getTitle()?M.getTitle():I);return I};var H=this.actions.get("print");H.setEnabled(!mxClient.IS_IOS||!navigator.standalone);H.visible=H.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),
+this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(I){var M=g.cellEditor.text2,Q=null;null!=M&&(mxEvent.addListener(M,"dragleave",function(P){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);P.stopPropagation();P.preventDefault()}),mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(P){null==
+Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(M));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(M,"drop",mxUtils.bind(this,function(P){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<P.dataTransfer.files.length)this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,function(W,p,D,L,V,O){g.insertImage(W,V,O)},function(){},function(W){return"image/"==W.type.substring(0,6)},function(W){for(var p=0;p<W.length;p++)W[p]()},mxEvent.isControlDown(P));else if(0<=
+mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var U=P.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(W){var p=Math.max(1,W.width);W=Math.max(1,W.height);var D=this.maxImageSize;D=Math.min(1,Math.min(D/Math.max(1,p)),D/Math.max(1,W));g.insertImage(decodeURIComponent(U),p*D,W*D)})):document.execCommand("insertHTML",!1,P.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(P.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,P.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(P.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,P.dataTransfer.getData("text/plain"));P.stopPropagation();P.preventDefault()})))}));this.isSettingsEnabled()&&(H=this.editor.graph.view,H.setUnit(mxSettings.getUnit()),H.addListener("unitChanged",function(I,M){mxSettings.setUnit(M.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,H.unit),this.refresh());if("1"==urlParams.styledev){H=document.getElementById("geFooter");null!=H&&(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)})),H.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,M){0<this.editor.graph.getSelectionCount()?(I=this.editor.graph.getSelectionCell(),I=this.editor.graph.getModel().getStyle(I),this.styleInput.value=I||"",this.styleInput.style.visibility=
+"visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(I){return mxEvent.getSource(I)==this.styleInput?!0:K.apply(this,arguments)}}H=document.getElementById("geInfo");null!=H&&H.parentNode.removeChild(H);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var N=null;mxEvent.addListener(g.container,"dragleave",function(I){g.isEnabled()&&(null!=N&&(N.parentNode.removeChild(N),N=null),I.stopPropagation(),I.preventDefault())});
+mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();I.stopPropagation();I.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(g.isEnabled()){var M=mxUtils.convertPoint(g.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),Q=I.dataTransfer.files,P=g.view.translate,
+U=g.view.scale,W=M.x/U-P.x,p=M.y/U-P.y;if(0<Q.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(I)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(Q,!0)):(mxEvent.isAltDown(I)&&(p=W=null),this.importFiles(Q,W,p,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(I),null,null,mxEvent.isShiftDown(I),I));else{mxEvent.isAltDown(I)&&(p=W=0);var D=0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")?I.dataTransfer.getData("text/uri-list"):
+null;M=this.extractGraphModelFromEvent(I,null!=this.pages);if(null!=M)g.setSelectionCells(this.importXml(M,W,p,!0));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")){var L=I.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=g.sanitizeHtml(L);var V=null;Q=M.getElementsByTagName("img");null!=Q&&1==Q.length?(L=Q[0].getAttribute("src"),null==L&&(L=Q[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(L)||(V=!0)):(Q=M.getElementsByTagName("a"),null!=
+Q&&1==Q.length?L=Q[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(L=mxUtils.getTextContent(M[0]))));var O=!0,R=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(L,W,p,!0,V,null,O,mxEvent.isControlDown(I)))});V&&null!=L&&L.length>this.resampleThreshold?this.confirmImageResize(function(S){O=S;R()},mxEvent.isControlDown(I)):R()}else null!=D&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)?this.loadImage(decodeURIComponent(D),mxUtils.bind(this,function(S){var X=
+Math.max(1,S.width);S=Math.max(1,S.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,X)),Y/Math.max(1,S));g.setSelectionCell(g.insertVertex(null,null,"",W,p,X*Y,S*Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+D+";"))}),mxUtils.bind(this,function(S){g.setSelectionCells(this.insertTextAt(D,W,p,!0))})):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(I.dataTransfer.getData("text/plain"),
+W,p,!0))}}I.stopPropagation();I.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();H=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",H);this.addListener("sketchModeChanged",H);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):
+("1"==urlParams["live-ui"]||"min"==uiTheme&&"1"!=urlParams.embedInline)&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var f=this.editor.graph;f.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var l=
+g.clipboardData||g.originalEvent.clipboardData,q=!1,t=0;t<l.types.length;t++)if("text/"===l.types[t].substring(0,5)){q=!0;break}if(!q){var x=l.items;for(index in x){var E=x[index];if("file"===E.kind){if(f.isEditing())this.importFiles([E.getAsFile()],0,0,this.maxImageSize,function(G,y,T,n,v,H){f.insertImage(G,v,H)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var y=0;y<G.length;y++)G[y]()});else{var F=this.editor.graph.getInsertPoint();this.importFiles([E.getAsFile()],
+F.x,F.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function f(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily=
+"monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var E=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==E.nodeName||"TEXTAREA"==E.nodeName||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||q||(l.style.left=g.container.scrollLeft+10+"px",l.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,E=g.container.scrollTop,g.container.appendChild(l),q=!0,
+l.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=E)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(x){var E=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=E&&17!=E&&91!=E&&93!=E||(q=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),
+this.copyCells(l),f()}catch(E){this.handleError(E)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(l,!0),f()}catch(E){this.handleError(E)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(l.innerHTML="&nbsp;",l.focus(),null!=x.clipboardData&&this.pasteCells(x,l,!0,!0),!mxEvent.isConsumed(x))){var E=g.container.scrollLeft,F=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,
+function(){g.container.scrollLeft=E;g.container.scrollTop=F;this.pasteCells(x,l,!1,!0)}),0)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==l?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(f,g){mxSettings.setUi(f);(g=this.doSetCurrentTheme(f)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(f,g){function l(n){return""==n||"dark"==n||"kennedy"==n||null==n}var q=
+Editor.currentTheme;f=l(f)?"default":f;q=l(q)?"default":q;var t="sketch"==q&&"default"==f||"default"==q&&"sketch"==f;if(t&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=f;this.themeSwitching=!0;var x=this.editor.graph.view.translate,E=x.x,F=x.y,G=mxUtils.getOffset(this.editor.graph.container),y=this.editor.graph.container.scrollLeft-G.x,T=this.editor.graph.container.scrollTop-G.y;g=null!=g?g:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms");0==g&&
+(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"sketch"==q&&"default"==f?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,
+this.formatWidth=EditorUi.prototype.formatWidth):"default"==q&&"sketch"==f&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(f);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var n=
+this.editor.graph.view.scale;G=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=y+G.x+(x.x-E)*n;this.editor.graph.container.scrollTop=T+G.y+(x.y-F)*n;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),g)}),g)}),g)}),0)}return t};EditorUi.prototype.switchTheme=function(f){this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
+this.switchThemeConstants(f);this.switchCssForTheme(f);this.createWrapperForTheme(f);this.createPickerMenuForTheme(f);this.createMainMenuForTheme(f);this.createMenubarForTheme(f);this.createFooterMenuForTheme(f);this.sidebarContainer.style.display="";"sketch"==f?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",
+this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==f&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
+this.formatContainer));null!=this.format&&(f="default"==f||"atlas"==f,this.format.showCloseButton!=f&&(this.format.showCloseButton=f,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=
+null)};EditorUi.prototype.switchThemeConstants=function(f){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;"sketch"==f?(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="none"/>').src,
+mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),g.defaultEdgeLength=120,null==urlParams.grid&&(g.defaultGridEnabled=!1),null==urlParams.pv&&(g.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+
+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(f){"sketch"==f?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=
+function(f){"sketch"==f?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(f){if("sketch"==f&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var g=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),l=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));f=mxUtils.bind(this,function(){g.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";l.style.display=g.style.display});this.actions.get("undo").addListener("stateChanged",f);
+this.actions.get("redo").addListener("stateChanged",f);f();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(f){if("sketch"==f&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+f=this.sketchFooterMenuElt;var g=this.createPageMenuTab(!1,!0);g.className="geToolbarButton";g.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";f.appendChild(g);var l=mxUtils.bind(this,function(){g.innerText="";if(null!=this.currentPage){mxUtils.write(g,this.currentPage.getName());var q=null!=this.pages?this.pages.length:1,t=this.getPageIndex(this.currentPage);t=null!=t?t+1:1;var x=this.currentPage.getId();
+g.setAttribute("title",this.currentPage.getName()+" ("+t+"/"+q+")"+(null!=x?" ["+x+"]":""))}});this.editor.addListener("pagesPatched",l);this.editor.addListener("pageSelected",l);this.editor.addListener("pageRenamed",l);this.editor.addListener("fileLoaded",l);l();l=mxUtils.bind(this,function(){g.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",l);this.addListener("pagesVisibleChanged",
+l);this.editor.addListener("pagesPatched",l);l();f.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));l=this.createMenu("viewZoom",Editor.plusImage);l.setAttribute("title",mxResources.get("zoom"));l.innerHTML="100%";l.className="geToolbarButton";l.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";f.appendChild(l);mxUtils.bind(this,function(q){mxEvent.addListener(q,
+"click",mxUtils.bind(this,function(x){mxEvent.isAltDown(x)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(x)):mxEvent.isShiftDown(x)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(x))}));var t=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);this.editor.addListener("resetGraphView",t);this.editor.addListener("pageSelected",
+t)})(l);f.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(f){if("sketch"==f&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var l=document.createElement("a");l.style.padding="0px";l.style.boxShadow="none";l.className="geMenuItem";l.style.display="block";l.style.width="100%";l.style.height="14px";l.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";l.style.backgroundPosition="top center";l.style.backgroundRepeat="no-repeat";l.setAttribute("title","Minimize");var q=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);q.style.paddingLeft="12px";q.style.backgroundSize="";q.style.width="26px";q.style.height="30px";q.style.opacity="0.7";var t=this.createMenu("insert",Editor.plusImage);t.style.backgroundSize="";t.style.marginBottom="4px";t.style.display="block";t.style.width="30px";t.style.height="30px";t.style.padding="4px";t.style.opacity="0.7";var x=!1,E=mxUtils.bind(this,function(){g.innerText="";if(!x){var F=function(y,T,n,v){null!=T&&y.setAttribute("title",T);y.style.cursor="pointer";y.style.margin="8px 0px";
+y.style.display="block";g.appendChild(y);null!=v&&(y.style.position="relative",y.style.overflow="visible",T=document.createElement("div"),T.style.position="absolute",T.style.fontSize="8px",T.style.left="32px",T.style.top="28px",mxUtils.write(T,v),y.appendChild(T));return y};F(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");F(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");F(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");F(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var G=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.setTerminalPoint(new mxPoint(G.geometry.width,0),!1);G.geometry.points=
+[];G.geometry.relative=!0;G.edge=!0;F(this.sidebar.createEdgeTemplateFromCells([G],G.geometry.width,G.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");G=G.clone();G.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";G.geometry.width=this.editor.graph.defaultEdgeLength+20;G.geometry.setTerminalPoint(new mxPoint(0,20),!0);G.geometry.setTerminalPoint(new mxPoint(G.geometry.width,20),!1);
+F(this.sidebar.createEdgeTemplateFromCells([G],G.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));F(q,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(t)}"1"!=urlParams.embedInline&&g.appendChild(l)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(){x?(mxUtils.setPrefixedStyle(g.style,"transform","translate(0, -50%)"),g.style.padding="8px 6px 4px",g.style.width="40px",g.style.top="50%",g.style.bottom="",g.style.height="",
+l.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",l.setAttribute("title","Minimize"),l.style.height="14px",x=!1,E()):(g.innerText="",g.appendChild(l),mxUtils.setPrefixedStyle(g.style,"transform","translate(0, 0)"),g.style.bottom="12px",g.style.padding="0px",g.style.height="24px",g.style.width="24px",g.style.top="",l.style.backgroundImage="url("+Editor.plusImage+")",l.setAttribute("title",mxResources.get("insert")),l.style.height="24px",x=!0)}));this.addListener("darkModeChanged",
+E);this.addListener("sketchModeChanged",E);E();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(f){"sketch"==f?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="4px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),f=this.menubar.langIcon,null!=f&&(f.style.position="relative",f.style.height="21px",f.style.width="21px",f.style.right="0px",f.style.top="3px",this.sketchMenubarElt.appendChild(f))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),
+this.statusContainer.style.marginTop=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),f=this.menubar.langIcon,null!=f&&(f.style.position="absolute",f.style.height="18px",f.style.width="18px",f.style.right="14px",f.style.top="5px",document.body.appendChild(f)))};EditorUi.prototype.createMenu=function(f,g){var l=this.menus.get(f),q=this.menubar.addMenu(mxResources.get(f),l.funct);q.className="geToolbarButton";q.style.display="inline-block";q.style.cursor="pointer";q.style.height=
+"24px";q.setAttribute("title",mxResources.get(f));this.menus.menuCreated(l,q,"geMenuItem");null!=g&&(q.style.backgroundImage="url("+g+")",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",q.style.backgroundSize="100% 100%",q.style.width="24px",q.innerText="");return q};EditorUi.prototype.createMenuItem=function(f,g,l){var q=document.createElement("a");q.className="geToolbarButton";q.setAttribute("title",mxResources.get(f));q.style.backgroundImage="url("+g+")";q.style.backgroundPosition=
+"center center";q.style.backgroundRepeat="no-repeat";q.style.backgroundSize="100% 100%";q.style.display="inline-block";q.style.cursor="pointer";q.style.marginLeft="6px";q.style.width="24px";q.style.height="24px";var t=this.actions.get(f);null!=t&&(mxEvent.addListener(q,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(q,"click",function(x){"disabled"!=q.getAttribute("disabled")&&t.funct(x);mxEvent.consume(x)}),l||(f=function(){t.isEnabled()?
+(q.removeAttribute("disabled"),q.style.cursor="pointer"):(q.setAttribute("disabled","disabled"),q.style.cursor="default");q.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",f),t.addListener("stateChanged",f),f()));return q};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,l="1"==urlParams.embedInline?580:"1"==urlParams.sketch?
+580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),f,g,240,l,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var m=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=
+function(f){var g=this.formatWindow;null!=g?g.window.setVisible(null!=f?f:!this.isFormatPanelVisible()):m.apply(this,arguments)};var u=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var f=this.formatWindow;return null!=f?f.window.isVisible():u.apply(this,arguments)};var z=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(f){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top=
+"0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=f?f:1)&&this.editor.graph.sizeDidChange()):z.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var f=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?
+66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,f-6,g-6,mxUtils.bind(this,function(l){l.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(f){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(f);null==urlParams.rough&&(mxSettings.settings.sketchMode=f,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }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); "+
@@ -11764,203 +11767,204 @@ mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var m=document.createElement("link");m.setAttribute("rel","stylesheet");m.setAttribute("href",STYLE_PATH+"/dark.css");
-m.setAttribute("charset","UTF-8");m.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var g=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";g.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;g.view.gridColor=g.view.defaultGridColor;g.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(f){this.doSetDarkMode(f);null==urlParams.dark&&(mxSettings.settings.darkMode=f,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var C=document.createElement("link");C.setAttribute("rel","stylesheet");C.setAttribute("href",STYLE_PATH+"/dark.css");
+C.setAttribute("charset","UTF-8");C.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(f){if(Editor.darkMode!=f){var g=this.editor.graph;Editor.darkMode=f;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";g.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;g.view.gridColor=g.view.defaultGridColor;g.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
"#ffffff";g.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";g.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";g.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";g.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.loadStylesheet();null!=this.actions.layersWindow&&
-(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=g.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
+(f=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,f&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=g.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
g.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=g.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=g.shapeForegroundColor;Graph.prototype.defaultThemeName=g.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==m.parentNode&&document.getElementsByTagName("head")[0].appendChild(m):
-null!=m.parentNode&&m.parentNode.removeChild(m)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
-d){var g=function(n,q,p){null==n[q]&&(n[q]=p)},k=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,
-"jettySize","auto");g(k.defaultEdgeStyle,"orthogonalLoop","1");g(k.defaultEdgeStyle,"endArrow","open");g(k.defaultEdgeStyle,"endSize","14");g(k.defaultEdgeStyle,"startSize","14");d&&(g(k.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultVertexStyle,"fontSource",Editor.sketchFontSource),g(k.defaultVertexStyle,"hachureGap","4"),g(k.defaultVertexStyle,"sketch","1"),g(k.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
-g(k.defaultEdgeStyle,"sketch","1"),g(k.defaultEdgeStyle,"hachureGap","4"),g(k.defaultEdgeStyle,"sourcePerimeterSpacing","8"),g(k.defaultEdgeStyle,"targetPerimeterSpacing","8"));k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),
-g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
-mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=g.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
-this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,q){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),y=parseInt(q.getAttribute("width")),A=parseInt(q.getAttribute("height"));this.writeImageToClipboard(p,y,A,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
-function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,n){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](n)};
-EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),q=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(q));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=q,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;
-g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n){var q=this.editor.graph,p=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var y=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(d))p=this.importXml(d,y,y),q.setSelectionCells(p);else if(g&&1==q.getSelectionCount()){y=q.getStartEditingCell(q.getSelectionCell(),
-n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[y]);else{q.model.beginUpdate();try{q.labelChanged(y,d),Graph.isLink(d)&&q.setLinkForCell(y,d)}finally{q.model.endUpdate()}}q.setSelectionCell(y)}else p=q.getInsertPoint(),q.isMouseInsertPoint()&&(y=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),p=this.insertTextAt(d,p.x+y,p.y+y,!0),q.setSelectionCells(p);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var q=g,p=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var y=d.clipboardData.getData("text/plain"),A=!1;if(null!=y&&0<y.length&&"%3CmxGraphModel%3E"==y.substring(0,18))try{var C=decodeURIComponent(y);this.isCompatibleString(C)&&(A=!0,y=C)}catch(u){}A=A?null:d.clipboardData.getData("text/html");null!=A&&0<A.length?(q=
-this.parseHtmlData(A),p="text/plain"!=q.getAttribute("data-type")):null!=y&&0<y.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,A))}y=q.getElementsByTagName("span");if(null!=y&&0<y.length&&"application/vnd.lucid.chart.objects"===y[0].getAttribute("data-lucid-type"))k=y[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(u){var z=this.editor.graph;z.lastPasteXml==u?z.pasteCounter++:(z.lastPasteXml=u,z.pasteCounter=0);var F=
-z.pasteCounter*z.gridSize;z.setSelectionCells(this.importXml(u,F,F));z.scrollCellToVisible(z.getSelectionCell())}),mxUtils.bind(this,function(u){this.handleError(u)})),mxEvent.consume(d));else{var B=p?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),I=!1;try{var M=B.lastIndexOf("%3E");0<=M&&M<B.length-3&&(B=B.substring(0,M+3))}catch(u){}try{y=q.getElementsByTagName("span"),(C=null!=y&&0<y.length?mxUtils.trim(decodeURIComponent(y[0].textContent)):decodeURIComponent(B))&&
-(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,B=C)}catch(u){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var G=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,I,d)}catch(u){console.log("Miro import error:",u)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",G):G()}else this.pasteXml(B,n,I,d);try{mxEvent.consume(d)}catch(u){}}else if(!k){var S=
-this.editor.graph;S.lastPasteXml=null;S.pasteCounter=0}}catch(u){this.handleError(u)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<
-document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,
-!0);else{var q=this.extractGraphModelFromEvent(n);if(null==q){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?q=p.getData("Text"):(q=null,q=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&&
-(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()&&this.openLocalFile(y.getText(),
-null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var n=document.body;var q=document.documentElement;var p=(n.clientWidth||q.clientWidth)-3;n=
-Math.max(n.clientHeight||0,q.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,p=d.clientWidth,n=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=g+"px";q.style.left=k+"px";q.style.width=Math.max(0,p-3)+"px";q.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);
-return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)d.push(n.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,n,q){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=
-g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(A){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==A.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,A,g))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(A,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,
-mxUtils.bind(this,function(A){this.spinner.stop();p(A)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(A){this.spinner.stop();p(A)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(A){4==A.readyState&&(this.spinner.stop(),200<=A.status&&299>=A.status?p(A.responseText):this.handleError({message:mxResources.get(413==
-A.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(A){this.spinner.stop();this.openLocalFile(A,g,n)}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(A){this.spinner.stop();p(A)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var y=Editor.extractGraphModelFromPdf(d);null!=y&&(q=null,n=!0,
-d=y)}this.spinner.stop();this.openLocalFile(d,g,n,q,null!=q?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var q=new FileReader;q.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(y){this.handleError(y)}});q.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0,
-5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?q.readAsText(n):q.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,q){var p=this.getCurrentFile(),y=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var A=mxUtils.parseXml(d);null!=A&&(this.editor.setGraphXml(A.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,n,q))});if(null!=
-d&&0<d.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?y():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(y){if(null!=
-y){var A=y.lastIndexOf(".");0<A&&(y=y.substring(A+1,y.length));null==g[y]&&(g[y]=!0)}}var n=this.editor.graph,q=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=n.model.getChildCount(d);for(var p=0;p<q;p++)this.addBasenamesForCell(n.model.getChildAt(d,p),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=
-d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
-null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=
-!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(q)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var y=p.model.cells,A;for(A in y){var C=y[A];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(q){k.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(d){var g=null,k=!1,n=!1,q=null,p=mxUtils.bind(this,function(C,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,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(C){if(C.source==(window.opener||window.parent)){var B=C.data,I=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
-"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(aa){}return Y});if("json"==urlParams.proto){var G=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[B])}catch(Y){B=null}try{if(null==B)return;
-if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var S=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Y){null!=
-Y?y.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(S.container,300,80,!0,!1);S.init();return}if("draft"==B.action){var u=M(B.xml);this.spinner.stop();S=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),u,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"edit",
-message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(S.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{S.init()}catch(Y){y.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var z=1==B.enableRecent,F=1==B.enableSearch,J=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var K=this.getCurrentUser(),H=new TemplatesDialog(this,function(Y,aa,ba){Y=Y||this.emptyDiagramXml;y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:aa,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}),
-"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,z?mxUtils.bind(this,function(Y,aa,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,aa)}):null,F?mxUtils.bind(this,function(Y,aa,ba,ea){this.remoteInvoke("searchDiagrams",[Y,ea],null,aa,ba)}):null,mxUtils.bind(this,function(Y,aa,ba){this.remoteInvoke("getFileContent",[Y.url],null,aa,ba)}),null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):
-null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}S=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,aa,ba,ea){Y=Y||this.emptyDiagramXml;null!=B.callback?y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:aa,tempUrl:ba,libs:ea,builtIn:!0,message:B}),"*"):(d(Y,C,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,
-null,null,null,z?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(Y,aa){this.remoteInvoke("searchDiagrams",[Y,null],null,aa,function(){aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,aa,ba){y.postMessage(JSON.stringify({event:"template",docUrl:Y,info:aa,name:ba}),"*")}),null,null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},
-0)})}):null,1==B.withoutType);this.showDialog(S.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));S.init();return}if("textContent"==B.action){var N=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:N,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));
-null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var U=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,U):this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null==
-B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var Q=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var aa=this.createLoadMessage("export");aa.format=B.format;aa.message=B;aa.data=Y;aa.xml=Q;y.postMessage(JSON.stringify(aa),"*")}),t=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&&
-(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(Q)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),D=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=D){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var aa,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
-D){aa=this.updatePageRoot(this.pages[ba]);break}null==aa&&(aa=this.currentPage);V.getGlobalVariable=function(ra){return"page"==ra?aa.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(aa.root)}if(null!=B.layerIds){var ea=V.model,ja=ea.getChildCells(ea.getRoot()),fa={};for(ba=0;ba<B.layerIds.length;ba++)fa[B.layerIds[ba]]=!0;for(ba=0;ba<ja.length;ba++)ea.setVisible(ja[ba],fa[ja[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){t(ra.toDataURL("image/png"))}),
-B.width,null,B.background,mxUtils.bind(this,function(){t(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(Q),k=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=D?"&pageId="+D:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,
-function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();Y.xml=mxUtils.getXml(aa);Y.data=this.getFileData(null,null,!0,null,null,null,aa);Y.format=B.format}else if("html"==B.format)aa=this.editor.getGraphXml(),
-Y.data=this.getHtml(aa,this.editor.graph),Y.xml=mxUtils.getXml(aa),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;aa=null!=B.background?B.background:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ea);y.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==
-B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,B.embedImages,aa,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),aa=this.editor.graph.getSvg(aa,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,
-null,B.keepTheme),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(aa),this.embedFonts(aa,mxUtils.bind(this,function(ea){B.embedImages||null==B.embedImages?this.editor.convertImages(ea,mxUtils.bind(this,function(ja){ba(mxUtils.getXml(ja))})):ba(mxUtils.getXml(ea))}));return}y.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var T=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){T.apply(this,arguments);L()}}k=!0;this.setFileData(B.xml);
-k=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==B.action){G=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-B.dark&&(O=Editor.darkMode,this.doSetDarkMode(B.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var P=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+
-"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,aa=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*P);Y.maxFitScale=aa;Y.container.scrollTop-=2*P;Y.container.scrollLeft-=2*P;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&(u=document.createElement("span"),mxUtils.write(u,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(u),this.embedFilenameSpan=u);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var R=this.getCurrentFile();null!=R&&(u=M(B.xml),
-null!=u&&""!=u&&R.mergeFile(new LocalFile(this,u),function(){y.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){y.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,C.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Z=mxUtils.bind(this,function(Y,aa){k=!0;try{d(Y,aa,null,G)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");q=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,ea){ba=X();ba==q||k||(ea=this.createLoadMessage("autosave"),ea.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ea),"*"));q=ba}),
-this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",
-g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)aa=this.createLoadMessage("load"),aa.xml=Y,y.postMessage(JSON.stringify(aa),"*");null!=I&&I()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(M="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){Z(Y,C)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&Z(Y.responseText,C)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){Z(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B||
-null==B.format||null==B.data&&null==B.url?(B=M(B),Z(B,C)):this.loadDescriptor(B,mxUtils.bind(this,function(Y){Z(X(),C)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(p,"*");if("json"==urlParams.proto){var A=this.editor.graph.openLink;this.editor.graph.openLink=function(C,B,I){A.apply(this,arguments);y.postMessage(JSON.stringify({event:"openLink",
-href:C,target:B,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var g=document.createElement("button");g.className="geBigButton";if("1"==
-urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,k);g.setAttribute("title",k);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g));"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),
-null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),
-n=[],q=[],p=[],y={};if(0<k.length){var A={},C=this.editor.graph,B=null,I=null,M=null,G=null,S=null,u=null,z=null,F="whiteSpace=wrap;html=1;",J=null,K=null,H="",N="auto",U="auto",Q=!1,V=null,W=null,t=40,D=40,L=100,T=0,O=mxUtils.bind(this,function(){null!=g?g(da):(C.setSelectionCells(da),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),P=C.getFreeInsertPoint(),R=P.x,X=P.y;P=X;var Z=null,Y="auto";
-K=null;for(var aa=[],ba=null,ea=null,ja=0;ja<k.length&&"#"==k[ja].charAt(0);){d=k[ja].replace(/\r$/,"");for(ja++;ja<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ja].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ja].substring(1)),ja++;if("#"!=d.charAt(1)){var fa=d.indexOf(":");if(0<fa){var ra=mxUtils.trim(d.substring(1,fa)),ma=mxUtils.trim(d.substring(fa+1));"label"==ra?Z=C.sanitizeHtml(ma):"labelname"==ra&&0<ma.length&&"-"!=ma?S=ma:"labels"==ra&&0<ma.length&&"-"!=ma?z=JSON.parse(ma):"style"==
-ra?I=ma:"parentstyle"==ra?F=ma:"unknownStyle"==ra&&"-"!=ma?u=ma:"stylename"==ra&&0<ma.length&&"-"!=ma?G=ma:"styles"==ra&&0<ma.length&&"-"!=ma?M=JSON.parse(ma):"vars"==ra&&0<ma.length&&"-"!=ma?B=JSON.parse(ma):"identity"==ra&&0<ma.length&&"-"!=ma?J=ma:"parent"==ra&&0<ma.length&&"-"!=ma?K=ma:"namespace"==ra&&0<ma.length&&"-"!=ma?H=ma:"width"==ra?N=ma:"height"==ra?U=ma:"collapsed"==ra&&"-"!=ma?Q="true"==ma:"left"==ra&&0<ma.length?V=ma:"top"==ra&&0<ma.length?W=ma:"ignore"==ra?ea=ma.split(","):"connect"==
-ra?aa.push(JSON.parse(ma)):"link"==ra?ba=ma:"padding"==ra?T=parseFloat(ma):"edgespacing"==ra?t=parseFloat(ma):"nodespacing"==ra?D=parseFloat(ma):"levelspacing"==ra?L=parseFloat(ma):"layout"==ra&&(Y=ma)}}}if(null==k[ja])throw Error(mxResources.get("invalidOrMissingFile"));var Ga=this.editor.csvToArray(k[ja].replace(/\r$/,""));fa=d=null;ra=[];for(ma=0;ma<Ga.length;ma++)J==Ga[ma]&&(d=ma),K==Ga[ma]&&(fa=ma),ra.push(mxUtils.trim(Ga[ma]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==Z&&(Z="%"+ra[0]+"%");if(null!=aa)for(var Fa=0;Fa<aa.length;Fa++)null==A[aa[Fa].to]&&(A[aa[Fa].to]={});J=[];for(ma=ja+1;ma<k.length;ma++){var ya=this.editor.csvToArray(k[ma].replace(/\r$/,""));if(null==ya){var Ma=40<k[ma].length?k[ma].substring(0,40)+"...":k[ma];throw Error(Ma+" ("+ma+"):\n"+mxResources.get("containsValidationErrors"));}0<ya.length&&J.push(ya)}C.model.beginUpdate();try{for(ma=0;ma<J.length;ma++){ya=J[ma];var xa=null,Ca=null!=d?H+ya[d]:null;k=!1;null!=Ca&&(xa=C.model.getCell(Ca),
-k=null==xa||0<=mxUtils.indexOf(n,xa));var oa=new mxCell(Z,new mxGeometry(R,P,0,0),I||"whiteSpace=wrap;html=1;");oa.collapsed=Q;oa.vertex=!0;oa.id=Ca;null==xa||k||C.model.setCollapsed(xa,Q);for(var Aa=0;Aa<ya.length;Aa++)C.setAttributeForCell(oa,ra[Aa],ya[Aa]),null==xa||k||C.setAttributeForCell(xa,ra[Aa],ya[Aa]);if(null!=S&&null!=z){var La=z[oa.getAttribute(S)];null!=La&&(C.labelChanged(oa,La),null==xa||k||C.cellLabelChanged(xa,La))}if(null!=G&&null!=M){var ta=M[oa.getAttribute(G)];null!=ta&&(oa.style=
-ta)}C.setAttributeForCell(oa,"placeholders","1");oa.style=C.replacePlaceholders(oa,oa.style,B);null==xa||k?C.fireEvent(new mxEventObject("cellsInserted","cells",[oa])):(C.model.setStyle(xa,oa.style),0>mxUtils.indexOf(p,xa)&&p.push(xa),C.fireEvent(new mxEventObject("cellsInserted","cells",[xa])));k=null!=xa;xa=oa;if(!k)for(Fa=0;Fa<aa.length;Fa++)A[aa[Fa].to][xa.getAttribute(aa[Fa].to)]=xa;null!=ba&&"link"!=ba&&(C.setLinkForCell(xa,xa.getAttribute(ba)),C.setAttributeForCell(xa,ba,null));var Da=this.editor.graph.getPreferredSizeForCell(xa);
-K=null!=fa?C.model.getCell(H+ya[fa]):null;if(xa.vertex){Ma=null!=K?0:R;ja=null!=K?0:X;null!=V&&null!=xa.getAttribute(V)&&(xa.geometry.x=Ma+parseFloat(xa.getAttribute(V)));null!=W&&null!=xa.getAttribute(W)&&(xa.geometry.y=ja+parseFloat(xa.getAttribute(W)));var wa="@"==N.charAt(0)?xa.getAttribute(N.substring(1)):null;xa.geometry.width=null!=wa&&"auto"!=wa?parseFloat(xa.getAttribute(N.substring(1))):"auto"==N||"auto"==wa?Da.width+T:parseFloat(N);var Ja="@"==U.charAt(0)?xa.getAttribute(U.substring(1)):
-null;xa.geometry.height=null!=Ja&&"auto"!=Ja?parseFloat(Ja):"auto"==U||"auto"==Ja?Da.height+T:parseFloat(U);P+=xa.geometry.height+D}k?(null==y[Ca]&&(y[Ca]=[]),y[Ca].push(xa)):(n.push(xa),null!=K?(K.style=C.replacePlaceholders(K,F,B),C.addCell(xa,K),q.push(K)):p.push(C.addCell(xa)))}for(ma=0;ma<q.length;ma++)wa="@"==N.charAt(0)?q[ma].getAttribute(N.substring(1)):null,Ja="@"==U.charAt(0)?q[ma].getAttribute(U.substring(1)):null,"auto"!=N&&"auto"!=wa||"auto"!=U&&"auto"!=Ja||C.updateGroupBounds([q[ma]],
-T,!0);var ka=p.slice(),da=p.slice();for(Fa=0;Fa<aa.length;Fa++){var ca=aa[Fa];for(ma=0;ma<n.length;ma++){xa=n[ma];var na=mxUtils.bind(this,function(Ha,Na,Ra){var Ia=Na.getAttribute(Ra.from);if(null!=Ia&&""!=Ia){Ia=Ia.split(",");for(var Pa=0;Pa<Ia.length;Pa++){var Qa=A[Ra.to][Ia[Pa]];if(null==Qa&&null!=u){Qa=new mxCell(Ia[Pa],new mxGeometry(R,X,0,0),u);Qa.style=C.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Oa.width+T;Qa.geometry.height=
-Oa.height+T;A[Ra.to][Ia[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ia[Pa];p.push(C.addCell(Qa))}if(null!=Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=C.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+C.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa=null!=Ra.style?C.replacePlaceholders(Sa,Ra.style,
-B):C.createCurrentEdgeStyle();Oa=C.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ha,Ra.invert?Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=C.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,B));if(null!=Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=
-Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Oa.insert(Ka)}da.push(Oa);mxUtils.remove(Ra.invert?Ha:Qa,ka)}}}});na(xa,xa,ca);if(null!=y[xa.id])for(Aa=0;Aa<y[xa.id].length;Aa++)na(xa,y[xa.id][Aa],ca)}}if(null!=ea)for(ma=0;ma<n.length;ma++)for(xa=n[ma],Aa=0;Aa<ea.length;Aa++)C.setAttributeForCell(xa,mxUtils.trim(ea[Aa]),null);if(0<p.length){var la=new mxParallelEdgeLayout(C);la.spacing=t;la.checkOverlap=!0;var qa=function(){0<la.spacing&&la.execute(C.getDefaultParent());for(var Ha=0;Ha<p.length;Ha++){var Na=C.getCellGeometry(p[Ha]);
-Na.x=Math.round(C.snap(Na.x));Na.y=Math.round(C.snap(Na.y));"auto"==N&&(Na.width=Math.round(C.snap(Na.width)));"auto"==U&&(Na.height=Math.round(C.snap(Na.height)))}};if("["==Y.charAt(0)){var ha=O;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(Y)),function(){qa();ha()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(C);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var pa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};
-this.executeLayout(function(){ia.execute(C.getDefaultParent());qa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&da.length==2*p.length-1&&1==ka.length){C.view.validate();var va=new mxCompactTreeLayout(C,"horizontaltree"==Y);va.levelDistance=D;va.edgeRouting=!1;va.resetEdges=!1;this.executeLayout(function(){va.execute(C.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){C.view.validate();var za=
-new mxHierarchicalLayout(C,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=D;za.parallelEdgeSpacing=t;za.interRankCellSpacing=L;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(C.getDefaultParent(),da);C.moveCells(da,R,X)},!0,O);O=null}else if("orgchart"==Y){C.view.validate();var Ea=new mxOrgChartLayout(C,2,L,D),Ba=Ea.isVertexIgnored;Ea.isVertexIgnored=function(Ha){return Ba.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){Ea.execute(C.getDefaultParent());
-qa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&da.length>p.length){C.view.validate();var ua=new mxFastOrganicLayout(C);ua.forceConstant=3*D;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var sa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ha){return sa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){ua.execute(C.getDefaultParent());qa()},!0,O);O=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
-function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,n,q){d=new LinkDialog(this,d,g,k,!0,n,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);
-this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
-this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var v=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(d){var g=v.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
-g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);
-this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=
-d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,q,p,y,A){var C=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
-else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(C.getSvg(n,q,p)),"image/svg+xml");else{var B=d.getFileData(!0,null,null,null,null,!0),I=C.getGraphBounds(),M=Math.floor(I.width*q/C.view.scale),G=Math.floor(I.height*q/C.view.scale);if(B.length<=MAX_REQUEST_SIZE&&M*G<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var S={globalVars:C.getExportVariables()};A&&(S.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(g,k,function(u,
-z){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(z||"0")+(null!=u?"&filename="+encodeURIComponent(u):"")+"&extras="+encodeURIComponent(JSON.stringify(S))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+M+"&h="+G+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,A,y):d.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",A);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var n=d;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=
-document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var y=mxSettings.getCustomLibraries();for(d=0;d<y.length;d++){var A=y[d];if("R"==A.substring(0,1)){var C=JSON.parse(decodeURIComponent(A.substring(1)));
-p[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){q.innerText="";if(0==B.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<B.length;I++){var M=B[I];p[M.id]&&(g[M.id]=M);var G=this.addCheckbox(q,M.title,p[M.id]);(function(S,u){mxEvent.addListener(u,"change",function(){this.checked?g[S.id]=S:delete g[S.id]})})(M,G)}},mxUtils.bind(this,
-function(B){q.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));q.appendChild(I)}));k.appendChild(q);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,I;for(I in g)null==p[I]&&(B++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],
-null,mxUtils.bind(this,function(G){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,G,M))}catch(S){this.handleError(S,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[I]));for(I in p)g[I]||this.closeLibrary(new RemoteLibrary(this,null,p[I]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,
-340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,q){var p=!0,y=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),A=mxUtils.bind(this,function(){window.clearTimeout(y);p&&n.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(y);p&&q.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:A,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,
-g){var k=mxUtils.bind(this,function(B,I){var M={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=I?M.error={errResp:I}:null!=B&&(M.resp=B);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var n=d.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,y=0;y<q.allowedDomains.length;y++)if(g=="https://"+q.allowedDomains[y]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var A=d.functionArgs;Array.isArray(A)||
-(A=[]);if(q.isAsync)A.push(function(){k(Array.prototype.slice.apply(arguments))}),A.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,A);else{var C=this[n].apply(this,A);k([C])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=
-function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=g&&g(y)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var A=document.createElement("iframe");A.style.display="none";A.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(A);var C=!0,B=!1,I,M=0,G=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),S=mxUtils.bind(this,function(){M++;u()}),u=mxUtils.bind(this,function(){try{if(M>=I.length)G();else{var F=I[M];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(J){null==J||".scratchpad"==F&&J==this.emptyLibraryXml?A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):S()}),S)}}catch(J){console.log(J)}}),z=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title,
-size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],S,S,["filesInfo","files"])}catch(J){console.log(J)}});y=mxUtils.bind(this,function(F){try{if(F.source==A.contentWindow){var J={};try{J=JSON.parse(F.data)}catch(K){}"init"==J.event?(A.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||B||
-(C?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(I=J.resp[0],C=!1,u()):G():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?z(J.resp[0]):S())}}catch(K){console.log(K)}});window.addEventListener("message",y)}})));d(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(q){null!=g&&g(q)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=
-[q],d=[d],g=[g]);var y=p.transaction(q,"readwrite");y.oncomplete=k;y.onerror=n;for(p=0;p<q.length;p++)y.objectStore(q[p]).put(null!=d&&null!=d[p]?{key:d[p],data:g[p]}:g[p])}catch(A){null!=n&&n(A)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);q=q.transaction(n,"readwrite");q.oncomplete=g;q.onerror=k;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(d[p])}),k)};EditorUi.prototype.getDatabaseItem=
-function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(d);p.onsuccess=function(){g(p.result)};p.onerror=k}catch(y){null!=k&&k(y)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(y){null==y.target.result?d(p):(p.push(y.target.result.value),
-y.target.result.continue())};q.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=
-this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var n=this.getCurrentFile();null!=n?n.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?
-d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=
-k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,q,p,y,A){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(d,g,k,n,q,p,y,A)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,q,p,y,A,C,B,I,M,G,S,u,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,n,q,p,y,A,C,B,I,M,G,S,u,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(d,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var q=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||n)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,l,m){function v(){for(var F=B.getElementsByTagName("div"),J=0,K=0;K<F.length;K++)"none"!=F[K].style.display&&F[K].parentNode==B&&J++;I.style.display=0==J?"block":"none"}function x(F,J,K,H){function N(){J.removeChild(V);J.removeChild(W);Q.style.display="block";U.style.display="block"}y={div:J,comment:F,saveCallback:K,deleteOnCancel:H};var U=J.querySelector(".geCommentTxt"),Q=J.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=F.content;J.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){H?(J.parentNode.removeChild(J),v()):N();y=null});t.className="geCommentEditBtn";W.appendChild(t);var D=mxUtils.button(mxResources.get("save"),function(){U.innerText="";F.content=V.value;mxUtils.write(U,F.content);N();K(F);y=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(t.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);J.insertBefore(W,U);Q.style.display="none";U.style.display="none";V.focus()}function E(F,J){J.innerText="";F=new Date(F.modifiedDate);var K=b.timeSince(F);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
-[K],"{1} ago"));J.setAttribute("title",F.toLocaleDateString()+" "+F.toLocaleTimeString())}function d(F){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";F.appendChild(J);F.busyImg=J}function g(F){F.style.border="1px solid red";F.removeChild(F.busyImg)}function k(F){F.style.border="";F.removeChild(F.busyImg)}function n(F,J,K,H,N){function U(O,P,R){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
-"geCommentActionLnk";mxUtils.write(Z,O);X.appendChild(Z);mxEvent.addListener(Z,"click",function(Y){P(Y,F);Y.preventDefault();mxEvent.consume(Y)});T.appendChild(X);R&&(X.style.display="none")}function Q(){function O(X){P.push(R);if(null!=X.replies)for(var Z=0;Z<X.replies.length;Z++)R=R.nextSibling,O(X.replies[Z])}var P=[],R=W;O(F);return{pdiv:R,replies:P}}function V(O,P,R,X,Z){function Y(){d(ja);F.addReply(ea,function(fa){ea.id=fa;F.replies.push(ea);k(ja);R&&R()},function(fa){aa();g(ja);b.handleError(fa,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Z)}function aa(){x(ea,ja,function(fa){Y()},!0)}var ba=Q().pdiv,ea=b.newComment(O,b.getCurrentUser());ea.pCommentId=F.id;null==F.replies&&(F.replies=[]);var ja=n(ea,F.replies,ba,H+1);P?aa():Y()}if(N||!F.isResolved){I.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",F.id);W.style.marginLeft=20*H+5+"px";F.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
-"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=F.user.pictureUrl||Editor.userImage;t.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";t.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,F.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
-F.id);E(F,L);D.appendChild(L);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,F.content||"");W.appendChild(t);F.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);q||F.isLocked||0!=H&&!p||U(mxResources.get("reply"),function(){V("",!0)},F.isResolved);D=b.getCurrentUser();null==D||D.id!=F.user.id||q||F.isLocked||(U(mxResources.get("edit"),
-function(){function O(){x(F,W,function(){d(W);F.editComment(F.content,function(){k(W)},function(P){g(W);O();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},F.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(W);F.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var P=W.querySelectorAll(".geCommentAction");for(O=
-0;O<P.length;O++)P[O].parentNode.removeChild(P[O]);k(W);W.style.opacity="0.5"}else{P=Q(F).replies;for(O=0;O<P.length;O++)B.removeChild(P[O]);for(O=0;O<J.length;O++)if(J[O]==F){J.splice(O,1);break}I.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},F.isResolved));q||F.isLocked||0!=H||U(F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function P(){var R=
-O.target;R.innerText="";F.isResolved=!F.isResolved;mxUtils.write(R,F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=F.isResolved?"none":"",Z=Q(F).replies,Y=Editor.isDarkMode()?"transparent":F.isResolved?"ghostWhite":"white",aa=0;aa<Z.length;aa++){Z[aa].style.backgroundColor=Y;for(var ba=Z[aa].querySelectorAll(".geCommentAction"),ea=0;ea<ba.length;ea++)ba[ea]!=R.parentNode&&(ba[ea].style.display=X);S||(Z[aa].style.display="none")}v()}F.isResolved?V(mxResources.get("reOpened")+
-": ",!0,P,!1,!0):V(mxResources.get("markedAsResolved"),!1,P,!0)});W.appendChild(t);null!=K?B.insertBefore(W,K.nextSibling):B.appendChild(W);for(K=0;null!=F.replies&&K<F.replies.length;K++)t=F.replies[K],t.isResolved=F.isResolved,n(t,F.replies,null,H+1,N);null!=y&&(y.comment.id==F.id?(N=F.content,F.content=y.comment.content,x(F,W,y.saveCallback,y.deleteOnCancel),F.content=N):null==y.comment.id&&y.comment.pCommentId==F.id&&(B.appendChild(y.div),x(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return W}}
-var q=!b.canComment(),p=b.canReplyToReplies(),y=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(C)+7+"px";A.appendChild(B);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(I,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=C;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");C.className="geButton";if(!q){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(G,"click",function(F){function J(){x(K,H,function(N){d(H);b.addComment(N,function(U){N.id=U;u.push(N);k(H)},function(U){g(H);J();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),H=n(K,u,null,0);J();F.preventDefault();mxEvent.consume(F)});M.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));
-G.className="geAdaptiveAsset";var S=!1;mxEvent.addListener(G,"click",function(F){this.className=(S=!S)?"geButton geCheckedBtn":"geButton";z();F.preventDefault();mxEvent.consume(F)});M.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(F){z();F.preventDefault();mxEvent.consume(F)}),M.appendChild(G));
-b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(F){m();F.preventDefault();mxEvent.consume(F)}),M.appendChild(C));A.appendChild(M);var u=[],z=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var F=y.div.querySelector(".geCommentEditTxtArea"),J=y.div.querySelector(".geCommentEditBtns");
-y.comment.content=F.value;F.parentNode.removeChild(F);J.parentNode.removeChild(J)}catch(K){b.handleError(K)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function H(N){if(null!=N){N.sort(function(Q,V){return new Date(Q.modifiedDate)-new Date(V.modifiedDate)});for(var U=0;U<N.length;U++)H(N[U].replies)}}
-K.sort(function(N,U){return new Date(N.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(I);I.style.display="block";u=K;for(K=0;K<u.length;K++)H(u[K].replies),n(u[K],u,null,0,S);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(B.appendChild(y.div),x(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(K){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-z();this.refreshComments=z;M=mxUtils.bind(this,function(){function F(U){var Q=K[U.id];if(null!=Q)for(E(U,Q),Q=0;null!=U.replies&&Q<U.replies.length;Q++)F(U.replies[Q])}if(this.window.isVisible()){for(var J=B.querySelectorAll(".geCommentDate"),K={},H=0;H<J.length;H++){var N=J[H];K[N.getAttribute("data-commentId")]=N}for(H=0;H<u.length;H++)F(u[H])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),A,e,f,c,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,m,v,x,E,d,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+
-"px";n.style.lineHeight="1.2em";mxUtils.write(n,e);k.appendChild(n);null!=d&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),n.appendChild(e),k.appendChild(n));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";
-null!=x&&(m.innerHTML=x+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&d.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(q.checked)});d.appendChild(p);null!=v?(p.innerHTML=v+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-d.appendChild(m);k.appendChild(d);E?(d.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(y){q.checked=!q.checked;mxEvent.consume(y)})):d.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");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,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var m=0;m<e.length;m++)null!=e[m]&&(b=this.patchPages(b,e[m],f,c,l));return b};
-EditorUi.prototype.patchPages=function(b,e,f,c,l){var m={},v=[],x={},E={},d={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)E[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)x[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(k in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var q=b[c].getId();d[q]=b[c];null!=g[n]||E[q]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][q]&&null!=e[EditorUi.DIFF_UPDATE][q].previous||(g[n]=q);n=q}}var p={},y=mxUtils.bind(this,function(C){var B=null!=C?C.getId():"";if(null!=C&&!p[B]){p[B]=!0;v.push(C);var I=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][B]:null;null!=I&&(this.updatePageRoot(C),null!=I.name&&C.setName(I.name),
-null!=I.view&&this.patchViewState(C,I.view),null!=I.cells&&this.patchPage(C,I.cells,m[C.getId()],l),!f||null==I.cells&&null==I.view||(C.needsUpdate=!0))}C=g[B];null!=C&&(delete g[B],y(d[C]));C=x[B];null!=C&&(delete x[B],A(C))}),A=mxUtils.bind(this,function(C){C=mxUtils.parseXml(C.data).documentElement;C=new DiagramPage(C);this.updatePageRoot(C);var B=d[C.getId()];null==B?y(C):(this.patchPage(B,this.diffPages([B],[C]),m[B.getId()],l),f&&(B.needsUpdate=!0))});y();for(k in g)y(d[g[k]]),delete g[k];for(k in x)A(x[k]),
-delete x[k];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
-EditorUi.prototype.createParentLookup=function(b,e){function f(d){var g=c[d];null==g&&(g={inserted:[],moved:{}},c[d]=g);return g}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var m=e[EditorUi.DIFF_INSERT][l],v=null!=m.parent?m.parent:"",x=null!=m.previous?m.previous:"";f(v).inserted[x]=m}if(null!=e[EditorUi.DIFF_UPDATE])for(var E in e[EditorUi.DIFF_UPDATE])m=e[EditorUi.DIFF_UPDATE][E],null!=m.previous&&(v=m.parent,null==v&&(l=b.getCell(E),null!=l&&(l=
-b.getParent(l),null!=l&&(v=l.getId()))),null!=v&&(f(v).moved[m.previous]=E));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,e);l.beginUpdate();try{var v=l.updateEdgeParent,x=new mxDictionary,E=[];l.updateEdgeParent=function(A,C){!x.get(A)&&c&&(x.put(A,!0),E.push(A))};var d=m[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=d&&null!=d.moved?d.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k),
-b.root=k);this.patchCellRecursive(b,l,l.root,m,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var q=0;q<e[EditorUi.DIFF_REMOVE].length;q++){var p=l.getCell(e[EditorUi.DIFF_REMOVE][q]);null!=p&&l.remove(p)}if(null!=e[EditorUi.DIFF_UPDATE]){var y=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in e[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),e[EditorUi.DIFF_UPDATE][n],null!=y?y[n]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(q=0;q<e[EditorUi.DIFF_INSERT].length;q++)g=e[EditorUi.DIFF_INSERT][q],
-p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=v;if(c&&0<E.length)for(q=0;q<E.length;q++)l.contains(E[q])&&l.updateEdgeParent(E[q])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var m=c[f.getId()],v=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var x=0,E=e.getChildCount(f),d="",g=0;g<E;g++){var k=e.getChildAt(f,g).getId();null==m[d]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[d]=k);d=k}E=mxUtils.bind(this,function(n,q){var p=null!=n?n.getId():"";null!=n&&q&&(q=
-e.getCell(p),null!=q&&q!=n&&(n=null));null!=n&&(e.getChildAt(f,x)!=n&&e.add(f,n,x),this.patchCellRecursive(b,e,n,c,l),x++);return p});for(d=[null];0<d.length;)if(g=d.shift(),g=E(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],d.push({child:e.getCell(k)})),k=v[g],null!=k&&(delete v[g],d.push({child:this.getCellForJson(k),insert:!0})),0==d.length){for(g in m)d.push({child:e.getCell(m[g])}),delete m[g];for(g in v)d.push({child:this.getCellForJson(v[g]),insert:!0}),delete v[g]}}};
-EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=
-1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};
-EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),f.push(c));return f};
-EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},m={},v={},x=null;if(null!=b&&null!=e){for(var E=0;E<e.length;E++)m[e[E].getId()]={page:e[E],prev:x},x=e[E];x=null;for(E=0;E<b.length;E++){var d=b[E].getId();e=m[d];if(null==e)c.push(d);else{var g=this.diffPage(b[E],e.page),k={};mxUtils.isEmptyObject(g)||(k.cells=g);g=this.diffViewState(b[E],e.page);mxUtils.isEmptyObject(g)||(k.view=g);if((null!=e.prev?null==x:null!=x)||null!=x&&null!=e.prev&&x.getId()!=e.prev.getId())k.previous=null!=e.prev?
-e.prev.getId():"";null!=e.page.getName()&&b[E].getName()!=e.page.getName()&&(k.name=e.page.getName());mxUtils.isEmptyObject(k)||(v[d]=k)}delete m[b[E].getId()];x=b[E]}for(d in m)e=m[d],f.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(v)||(l[EditorUi.DIFF_UPDATE]=v);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
-EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var m=b.getChildAt(l);this.createCellLookup(m,e,f);e=m}return f};
-EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var v=this.diffCell(b,m.cell);if(null!=v.parent||(null!=m.prev?null==e:null!=e)||null!=e&&null!=m.prev&&e.getId()!=m.prev.getId())v.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(v)||(c[b.getId()]=v)}m=b.getChildCount();e=null;for(v=0;v<m;v++){var x=b.getChildAt(v);this.diffCellRecursive(x,e,f,c,l);e=x}return c};
-EditorUi.prototype.diffPage=function(b,e){var f=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(e);e=this.createCellLookup(e.root);var m=this.diffCellRecursive(b.root,null,e,m,c),v;for(v in e)b=e[v],f.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f);return l};
-EditorUi.prototype.diffViewState=function(b,e){b=b.viewState;var f=e.viewState,c={};e==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var l in this.viewStateProperties)this.diffViewStateProperty(b,f,l,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)};
-EditorUi.prototype.getViewStateProperty=function(b,e){b=b[e];"backgroundImage"==e&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==e&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var e=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,f=b.value;null!=b.xmlValue&&(f=mxUtils.parseXml(b.xmlValue).documentElement);e=new mxCell(f,e,b.style);e.connectable=0!=b.connectable;e.collapsed=1==b.collapsed;e.visible=0!=b.visible;e.vertex=1==b.vertex;e.edge=1==b.edge;e.id=b.id;for(var c in b)this.cellProperties[c]||(e[c]=b[c]);return e};
-EditorUi.prototype.getJsonForCell=function(b,e){var f={id:b.getId()};b.vertex&&(f.vertex=1);b.edge&&(f.edge=1);b.connectable||(f.connectable=0);null!=b.parent&&(f.parent=b.parent.getId());null!=e&&(f.previous=e.getId());null!=b.source&&(f.source=b.source.getId());null!=b.target&&(f.target=b.target.getId());null!=b.style&&(f.style=b.style);null!=b.geometry&&(f.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(f.collapsed=1);b.visible||(f.visible=0);null!=b.value&&("object"===typeof b.value&&
-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?f.xmlValue=mxUtils.getXml(b.value):f.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(f[c]=b[c]);return f};
-EditorUi.prototype.diffCell=function(b,e){function f(v){return null!=v&&"object"===typeof v&&"number"===typeof v.nodeType&&"string"===typeof v.nodeName&&"function"===typeof v.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";
-if((null!=b.source?null==e.source:null!=e.source)||null!=b.source&&null!=e.source&&b.source.getId()!=e.source.getId())c.source=null!=e.source?e.source.getId():"";if((null!=b.target?null==e.target:null!=e.target)||null!=b.target&&null!=e.target&&b.target.getId()!=e.target.getId())c.target=null!=e.target?e.target.getId():"";f(b.value)&&f(e.value)?b.value.isEqualNode(e.value)||(c.xmlValue=mxUtils.getXml(e.value)):b.value!=e.value&&(f(e.value)?c.xmlValue=mxUtils.getXml(e.value):c.value=null!=e.value?
-e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var l=this.codec.encode(e.geometry);null!=l&&(c.geometry=mxUtils.getXml(l))}for(var m in b)this.cellProperties[m]||"function"===typeof b[m]||"function"===typeof e[m]||b[m]==e[m]||(c[m]=void 0===e[m]?null:e[m]);for(m in e)m in b||this.cellProperties[m]||"function"===typeof b[m]||"function"===
-typeof e[m]||b[m]==e[m]||(c[m]=void 0===e[m]?null:e[m]);return c};EditorUi.prototype.isObjectEqual=function(b,e,f){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(l,m){return null==f||f[l]!=m?!0===m?1:m:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var e=mxSettings.getMainSettings();e.ui=b;"kennedy"==b&&(e.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(e))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
-mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,e){e?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
-b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],e=0;e<b.length;e++)"string"===typeof b[e]&&(b[e]={name:b[e],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==C.parentNode&&document.getElementsByTagName("head")[0].appendChild(C):
+null!=C.parentNode&&C.parentNode.removeChild(C)}};EditorUi.prototype.setPagesVisible=function(f){Editor.pagesVisible!=f&&(Editor.pagesVisible=f,mxSettings.settings.pagesVisible=f,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(f,g){this.sidebar.sidebarTitles!=f&&(this.sidebar.sidebarTitles=f,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=f,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(f){Editor.inlineFullscreen!=f&&(Editor.inlineFullscreen=f,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(f){Editor.sketchMode!=
+f&&(Editor.sketchMode=f,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var f=this.editor.graph;f.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"sketch"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)f.defaultEdgeStyle.fontSize=null,f.defaultVertexStyle.fontSize=
+null;else{f.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var g=parseInt(this.menus.defaultFontSize)-4;f.defaultEdgeStyle.fontSize=g}"sketch"==Editor.currentTheme&&(f.defaultEdgeStyle.edgeStyle="none",f.defaultEdgeStyle.curved="1",f.defaultEdgeStyle.rounded="0",f.defaultEdgeStyle.jettySize="auto",f.defaultEdgeStyle.orthogonalLoop="1",f.defaultEdgeStyle.endArrow="open",f.defaultEdgeStyle.endSize="14",f.defaultEdgeStyle.startSize="14",f.defaultEdgeStyle.sourcePerimeterSpacing="8",f.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),f.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,f.defaultVertexStyle.fontSource=Editor.sketchFontSource,f.defaultVertexStyle.hachureGap="4",f.defaultVertexStyle.sketch="1",f.defaultVertexStyle.jiggle="2",f.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,f.defaultEdgeStyle.fontSource=Editor.sketchFontSource,f.defaultEdgeStyle.sketch="1",f.defaultEdgeStyle.jiggle="2",f.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(f){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(f)){var l=f.indexOf(",");0<l&&(g=this.getPageById(f.substring(l+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==f.substring(0,5)&&(g=mxResources.get("action"));return g};
+EditorUi.prototype.handleCustomLink=function(f){if(Graph.isPageLink(f)){var g=f.indexOf(",");if(f=this.getPageById(f.substring(g+1)))this.selectPage(f);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(f)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,
+g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(f=g.getProperty("customFonts"),this.menus.customFonts=f,mxSettings.setCustomFonts(f));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(f,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(f,g,l){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(q,t){try{this.spinner.stop();var x=this.createImageDataUri(q,g,"png"),E=parseInt(t.getAttribute("width")),F=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,E,F,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<f.length?f:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(f,g,l,q){var t=this.base64ToBlob(f.substring(f.indexOf(",")+1),"image/png");f=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+f+'" width="'+g+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([f])["catch"](q)};EditorUi.prototype.copyCells=function(f,g){var l=this.editor.graph;if(l.isSelectionEmpty())f.innerText="";else{var q=
+mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),t=mxUtils.getXml(l.encodeCells(q));mxUtils.setTextContent(f,encodeURIComponent(t));g?(l.removeCells(q,!1),l.lastPasteXml=null):(l.lastPasteXml=t,l.pasteCounter=0);f.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var f=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(f=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
+g=mxUtils.getXml(g.encodeCells(f)),navigator.clipboard.writeText(g))}return f};EditorUi.prototype.pasteXml=function(f,g,l,q){var t=this.editor.graph,x=null;t.lastPasteXml==f?t.pasteCounter++:(t.lastPasteXml=f,t.pasteCounter=0);var E=t.pasteCounter*t.gridSize;if(l||this.isCompatibleString(f))x=this.importXml(f,E,E),t.setSelectionCells(x);else if(g&&1==t.getSelectionCount()){E=t.getStartEditingCell(t.getSelectionCell(),q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==t.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,
+f,[E]);else{t.model.beginUpdate();try{t.labelChanged(E,f),Graph.isLink(f)&&t.setLinkForCell(E,f)}finally{t.model.endUpdate()}}t.setSelectionCell(E)}else x=t.getInsertPoint(),t.isMouseInsertPoint()&&(E=0,t.lastPasteXml==f&&0<t.pasteCounter&&t.pasteCounter--),x=this.insertTextAt(f,x.x+E,x.y+E,!0),t.setSelectionCells(x);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return x};EditorUi.prototype.pasteCells=
+function(f,g,l,q){if(!mxEvent.isConsumed(f)){var t=g,x=!1;if(l&&null!=f.clipboardData&&f.clipboardData.getData){var E=f.clipboardData.getData("text/plain"),F=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==E.substring(0,18))try{var G=decodeURIComponent(E);this.isCompatibleString(G)&&(F=!0,E=G)}catch(K){}F=F?null:f.clipboardData.getData("text/html");null!=F&&0<F.length?(t=this.parseHtmlData(F),x="text/plain"!=t.getAttribute("data-type")):null!=E&&0<E.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,
+F))}E=t.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))l=E[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(K){var N=this.editor.graph;N.lastPasteXml==K?N.pasteCounter++:(N.lastPasteXml=K,N.pasteCounter=0);var I=N.pasteCounter*N.gridSize;N.setSelectionCells(this.importXml(K,I,I));N.scrollCellToVisible(N.getSelectionCell())}),mxUtils.bind(this,function(K){this.handleError(K)})),
+mxEvent.consume(f));else{var y=x?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),T=!1;try{var n=y.lastIndexOf("%3E");0<=n&&n<y.length-3&&(y=y.substring(0,n+3))}catch(K){}try{E=t.getElementsByTagName("span"),(G=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(G)||0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(T=!0,y=G)}catch(K){}try{if(null!=y&&0<y.length){if(0==y.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,T,f)}catch(K){console.log("Miro import error:",K)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(y,q,T,f);try{mxEvent.consume(f)}catch(K){}}else if(!l){var H=this.editor.graph;H.lastPasteXml=null;H.pasteCounter=0}}catch(K){this.handleError(K)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
+function(f){if(Graph.fileSupport)for(var g=null,l=0;l<f.length;l++)mxEvent.addListener(f[l],"dragleave",function(q){null!=g&&(g.parentNode.removeChild(g),g=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(f[l],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(f[l],"drop",
+mxUtils.bind(this,function(q){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(q);if(null==t){var x=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=x&&(10==
+document.documentMode||11==document.documentMode?t=x.getData("Text"):(t=null,t=0<=mxUtils.indexOf(x.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=t&&0<t.length?(x=document.createElement("div"),x.innerHTML=this.editor.graph.sanitizeHtml(t),x=x.getElementsByTagName("img"),0<x.length&&(t=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(t=x.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?
+(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()&&this.openLocalFile(E.getText(),null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?
+EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(f){var g=0,l=0;if(null==f){var q=document.body;var t=document.documentElement;var x=(q.clientWidth||t.clientWidth)-3;q=Math.max(q.clientHeight||0,t.clientHeight)-3}else g=f.offsetTop,l=f.offsetLeft,x=f.clientWidth,q=f.clientHeight;t=document.createElement("div");t.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=l+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,q-3)+"px";null!=f&&f.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(f){f=mxUtils.parseXml(f);var g=this.editor.extractGraphModel(f.documentElement);f=
+[];if(null!=g){var l=new mxCodec(g.ownerDocument),q=new mxGraphModel;l.decode(g,q);g=q.getChildAt(q.getRoot(),0);for(l=0;l<q.getChildCount(g);l++)f.push(q.getChildAt(g,l))}return f};EditorUi.prototype.openFileHandle=function(f,g,l,q,t){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=g.substring(0,g.length-4)+".drawio");var x=mxUtils.bind(this,function(F){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":
+g+".drawio";if("<mxlibrary"==F.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,F,g))}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(F,g,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(l,mxUtils.bind(this,function(F){this.spinner.stop();x(F)}));else if(/(\.*<graphml )/.test(f))this.importGraphML(f,
+mxUtils.bind(this,function(F){this.spinner.stop();x(F)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(F){4==F.readyState&&(this.spinner.stop(),200<=F.status&&299>=F.status?x(F.responseText):this.handleError({message:mxResources.get(413==F.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
+else if(this.isLucidChartData(f))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(f,mxUtils.bind(this,function(F){this.spinner.stop();this.openLocalFile(F,g,q)}),mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}));else if("<mxlibrary"==f.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,f,l.name))}catch(F){this.handleError(F,
+mxResources.get("errorLoadingFile"))}}else if(0==f.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(F){this.spinner.stop();x(F)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(f,g,q)}));else{if("image/png"==l.type.substring(0,9))f=this.extractGraphModelFromPng(f);else if("application/pdf"==l.type){var E=Editor.extractGraphModelFromPdf(f);null!=E&&(t=null,q=!0,f=E)}this.spinner.stop();this.openLocalFile(f,g,q,t,null!=t?l:null)}}};EditorUi.prototype.openFiles=function(f,
+g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<f.length;l++)mxUtils.bind(this,function(q){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,q.name,q,g)}catch(E){this.handleError(E)}});t.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==q.type.substring(0,5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?t.readAsText(q):t.readAsDataURL(q)})(f[l])};
+EditorUi.prototype.openLocalFile=function(f,g,l,q,t){var x=this.getCurrentFile(),E=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var F=mxUtils.parseXml(f);null!=F&&(this.editor.setGraphXml(F.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,f,g||this.defaultFilename,l,q,t))});if(null!=f&&0<f.length)null==x||!x.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?E():(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||null!=q)&&null!=x&&x.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(f,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=x&&x.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 f={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,f);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),f);g=[];for(var l in f)g.push(l);return g};EditorUi.prototype.addBasenamesForCell=function(f,g){function l(E){if(null!=E){var F=E.lastIndexOf(".");0<F&&(E=E.substring(F+1,E.length));null==g[E]&&(g[E]=!0)}}var q=this.editor.graph,t=q.getCellStyle(f);
+l(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));q.model.isEdge(f)&&(l(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=q.model.getChildCount(f);for(var x=0;x<t;x++)this.addBasenamesForCell(q.model.getChildAt(f,x),g)};EditorUi.prototype.setGraphEnabled=function(f){this.diagramContainer.style.visibility=f?"":"hidden";this.formatContainer.style.visibility=f?"":"hidden";this.sidebarFooterContainer.style.display=
+f?"":"none";this.sidebarContainer.style.display=f?"":"none";this.hsplit.style.display=f?"":"none";this.editor.graph.setEnabled(f);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=f?"":"hidden",this.ruler.vRuler.container.style.visibility=f?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=f?"":"hidden");f||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
+null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var f=!1;this.installMessageHandler(mxUtils.bind(this,function(g,
+l,q,t){f||(f=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var E=x.model.cells,F;for(F in E){var G=E[F];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=q?q:!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(f,g){null!=f?f.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(f){var g=this.editor.graph;return{event:f,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(f){var g=this.editor.graph;
+g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var q=g.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(t){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=f?!f:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else f||
+l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");f||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(f){var g=null,l=!1,q=!1,t=null,x=mxUtils.bind(this,function(G,y){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,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var y=G.data,T=null,n=mxUtils.bind(this,function(Z){if(null!=Z&&"function"===typeof Z.charAt&&"<"!=Z.charAt(0))try{Editor.isPngDataUrl(Z)?Z=Editor.extractGraphModelFromPng(Z):"data:image/svg+xml;base64,"==Z.substring(0,
+26)?Z=atob(Z.substring(26)):"data:image/svg+xml;utf8,"==Z.substring(0,24)&&(Z=Z.substring(24)),null!=Z&&("%"==Z.charAt(0)?Z=decodeURIComponent(Z):"<"!=Z.charAt(0)&&(Z=Graph.decompress(Z)))}catch(ha){}return Z});if("json"==urlParams.proto){var v=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[y])}catch(Z){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):
+y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var H=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(Z){null!=Z?E.postMessage(JSON.stringify({event:"prompt",value:Z,message:y}),"*"):E.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),
+"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(H.container,300,80,!0,!1);H.init();return}if("draft"==y.action){var K=n(y.xml);this.spinner.stop();H=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),K,mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),
+"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(H.container,640,480,!0,!1,mxUtils.bind(this,function(Z){Z&&this.actions.get("exit").funct()}));try{H.init()}catch(Z){E.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();
+var N=1==y.enableRecent,I=1==y.enableSearch,M=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var Q=this.getCurrentUser(),P=new TemplatesDialog(this,function(Z,ha,ea){Z=Z||this.emptyDiagramXml;E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ha,tempUrl:ea.url,libs:ea.libs,builtIn:null!=ea.info&&null!=ea.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
+Q?Q.id:null,N?mxUtils.bind(this,function(Z,ha,ea){this.remoteInvoke("getRecentDiagrams",[ea],null,Z,ha)}):null,I?mxUtils.bind(this,function(Z,ha,ea,ua){this.remoteInvoke("searchDiagrams",[Z,ua],null,ha,ea)}):null,mxUtils.bind(this,function(Z,ha,ea){this.remoteInvoke("getFileContent",[Z.url],null,ha,ea)}),null,M?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):null,!1,!1,!0,!0);this.showDialog(P.container,window.innerWidth,window.innerHeight,!0,
+!1,null,!1,!0);return}H=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Z,ha,ea,ua){Z=Z||this.emptyDiagramXml;null!=y.callback?E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ha,tempUrl:ea,libs:ua,builtIn:!0,message:y}),"*"):(f(Z,G,Z!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,N?mxUtils.bind(this,function(Z){this.remoteInvoke("getRecentDiagrams",
+[null],null,Z,function(){Z(null,"Network Error!")})}):null,I?mxUtils.bind(this,function(Z,ha){this.remoteInvoke("searchDiagrams",[Z,null],null,ha,function(){ha(null,"Network Error!")})}):null,mxUtils.bind(this,function(Z,ha,ea){E.postMessage(JSON.stringify({event:"template",docUrl:Z,info:ha,name:ea}),"*")}),null,null,M?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):null,1==y.withoutType);this.showDialog(H.container,620,460,!0,!1,mxUtils.bind(this,
+function(Z){this.sidebar.hideTooltip();Z&&this.actions.get("exit").funct()}));H.init();return}if("textContent"==y.action){var U=this.getDiagramTextContent();E.postMessage(JSON.stringify({event:"textContent",data:U,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var W=
+null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):
+y.spin)){var p=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,L=mxUtils.bind(this,function(Z){this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=y.format;ha.message=y;ha.data=Z;ha.xml=p;E.postMessage(JSON.stringify(ha),"*")}),V=mxUtils.bind(this,function(Z){null==Z&&(Z=Editor.blankImage);"xmlpng"==y.format&&(Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(p)));D!=this.editor.graph&&
+D.container.parentNode.removeChild(D.container);L(Z)}),O=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var Z=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());for(var ha,ea=0;ea<this.pages.length;ea++)if(this.pages[ea].getId()==O){ha=this.updatePageRoot(this.pages[ea]);break}null==ha&&(ha=this.currentPage);D.getGlobalVariable=
+function(va){return"page"==va?ha.getName():"pagenumber"==va?1:Z.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(ha.root)}if(null!=y.layerIds){var ua=D.model,ya=ua.getChildCells(ua.getRoot()),xa={};for(ea=0;ea<y.layerIds.length;ea++)xa[y.layerIds[ea]]=!0;for(ea=0;ea<ya.length;ea++)ua.setVisible(ya[ea],xa[ya[ea].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(va){V(va.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){V(null)}),
+null,null,y.scale,y.transparent,y.shadow,null,D,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(l=!0,this.setFileData(p),l=!1);R()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(p))).send(mxUtils.bind(this,function(Z){200<=Z.getStatus()&&
+299>=Z.getStatus()?L("data:image/png;base64,"+Z.getText()):V(null)}),mxUtils.bind(this,function(){V(null)}))}}else if(R=mxUtils.bind(this,function(){var Z=this.createLoadMessage("export");Z.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();Z.xml=mxUtils.getXml(ha);Z.data=this.getFileData(null,null,!0,null,null,null,ha);Z.format=y.format}else if("html"==y.format)ha=this.editor.getGraphXml(),Z.data=this.getHtml(ha,
+this.editor.graph),Z.xml=mxUtils.getXml(ha),Z.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;ha=null!=y.background?y.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);Z.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Z.format="svg";var ea=mxUtils.bind(this,function(ua){this.editor.graph.setEnabled(!0);this.spinner.stop();Z.data=Editor.createSvgDataUri(ua);E.postMessage(JSON.stringify(Z),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||
+this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(Z.xml,this.editor.graph,null,!0,ea,null,null,y.embedImages,ha,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),ha=this.editor.graph.getSvg(ha,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||
+y.shadow)&&this.editor.graph.addSvgShadow(ha),this.embedFonts(ha,mxUtils.bind(this,function(ua){y.embedImages||null==y.embedImages?this.editor.convertImages(ua,mxUtils.bind(this,function(ya){ea(mxUtils.getXml(ya))})):ea(mxUtils.getXml(ua))}));return}E.postMessage(JSON.stringify(Z),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var S=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){S.apply(this,arguments);R()}}l=!0;this.setFileData(y.xml);l=!1;this.editor.graph.mathEnabled||
+R()}else R();return}if("load"==y.action){v=y.toSketch;q=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var X=Editor.sketchMode;this.doSetSketchMode(y.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(X=Editor.darkMode,
+this.doSetDarkMode(y.dark),X!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var Y=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=
+y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";T=mxUtils.bind(this,function(){var Z=this.editor.graph,ha=Z.maxFitScale;Z.maxFitScale=y.maxFitScale;Z.fit(2*Y);Z.maxFitScale=ha;Z.container.scrollTop-=2*Y;Z.container.scrollLeft-=2*Y;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&
+(K=document.createElement("span"),mxUtils.write(K,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(K),this.embedFilenameSpan=K);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(Z){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var aa=this.getCurrentFile();null!=aa&&(K=n(y.xml),null!=K&&""!=K&&aa.mergeFile(new LocalFile(this,K),function(){E.postMessage(JSON.stringify({event:"merge",
+message:y}),"*")},function(Z){E.postMessage(JSON.stringify({event:"merge",message:y,error:Z}),"*")}))}else"remoteInvokeReady"==y.action?this.handleRemoteInvokeReady(E):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,G.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):E.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(Z){this.handleError(Z)}}var ba=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<
+this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),da=mxUtils.bind(this,function(Z,ha){l=!0;try{f(Z,ha,null,v)}catch(ea){this.handleError(ea)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");t=ba();q&&null==g&&(g=mxUtils.bind(this,function(ea,ua){ea=ba();ea==t||l||(ua=this.createLoadMessage("autosave"),ua.xml=ea,(window.opener||window.parent).postMessage(JSON.stringify(ua),"*"));t=ea}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",
+g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ha=this.createLoadMessage("load"),
+ha.xml=Z,E.postMessage(JSON.stringify(ha),"*");null!=T&&T()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(n="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(Z){da(Z,G)},mxUtils.bind(this,function(Z){this.handleError(Z)}),n)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),
+mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(Z){4==Z.readyState&&200<=Z.status&&299>=Z.status&&"<mxGraphModel"==Z.responseText.substring(0,13)&&da(Z.responseText,G)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(Z){da(Z)}),mxUtils.bind(this,function(Z){this.handleError(Z)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=n(y),da(y,G)):this.loadDescriptor(y,
+mxUtils.bind(this,function(Z){da(ba(),G)}),mxUtils.bind(this,function(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}))}}));var E=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";E.postMessage(x,"*");if("json"==urlParams.proto){var F=this.editor.graph.openLink;this.editor.graph.openLink=function(G,y,T){F.apply(this,arguments);E.postMessage(JSON.stringify({event:"openLink",href:G,target:y,allowOpener:T}),"*")}}};EditorUi.prototype.addEmbedButtons=
+function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var f=document.createElement("div");f.style.display="inline-block";f.style.position="absolute";f.style.paddingTop="2px";f.style.paddingLeft="8px";f.style.paddingBottom="2px";f.style.marginRight="12px";f.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var g=document.createElement("button");g.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,l);g.setAttribute("title",l);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));f.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),f.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),
+mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),f.appendChild(g));"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),l="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,l),g.setAttribute("title",l),g.className="geBigButton geBigStandardButton",
+g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),f.appendChild(g));this.toolbar.container.appendChild(f);this.toolbar.staticElements.push(f)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(f){this.importCsv(f)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
+null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(f){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();f()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(f,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(f,g)}))};EditorUi.prototype.doImportCsv=function(f,g){try{var l=f.split("\n"),q=[],t=[],x=[],E={};if(0<l.length){var F={},G=this.editor.graph,y=null,T=null,
+n=null,v=null,H=null,K=null,N=null,I="whiteSpace=wrap;html=1;",M=null,Q=null,P="",U="auto",W="auto",p=!1,D=null,L=null,V=40,O=40,R=100,S=0,X=mxUtils.bind(this,function(){null!=g?g(la):(G.setSelectionCells(la),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),aa=Y.x,ba=Y.y;Y=ba;var da=null,Z="auto";Q=null;for(var ha=[],ea=null,ua=null,ya=0;ya<l.length&&"#"==l[ya].charAt(0);){f=
+l[ya].replace(/\r$/,"");for(ya++;ya<l.length&&"\\"==f.charAt(f.length-1)&&"#"==l[ya].charAt(0);)f=f.substring(0,f.length-1)+mxUtils.trim(l[ya].substring(1)),ya++;if("#"!=f.charAt(1)){var xa=f.indexOf(":");if(0<xa){var va=mxUtils.trim(f.substring(1,xa)),ka=mxUtils.trim(f.substring(xa+1));"label"==va?da=G.sanitizeHtml(ka):"labelname"==va&&0<ka.length&&"-"!=ka?H=ka:"labels"==va&&0<ka.length&&"-"!=ka?N=JSON.parse(ka):"style"==va?T=ka:"parentstyle"==va?I=ka:"unknownStyle"==va&&"-"!=ka?K=ka:"stylename"==
+va&&0<ka.length&&"-"!=ka?v=ka:"styles"==va&&0<ka.length&&"-"!=ka?n=JSON.parse(ka):"vars"==va&&0<ka.length&&"-"!=ka?y=JSON.parse(ka):"identity"==va&&0<ka.length&&"-"!=ka?M=ka:"parent"==va&&0<ka.length&&"-"!=ka?Q=ka:"namespace"==va&&0<ka.length&&"-"!=ka?P=ka:"width"==va?U=ka:"height"==va?W=ka:"collapsed"==va&&"-"!=ka?p="true"==ka:"left"==va&&0<ka.length?D=ka:"top"==va&&0<ka.length?L=ka:"ignore"==va?ua=ka.split(","):"connect"==va?ha.push(JSON.parse(ka)):"link"==va?ea=ka:"padding"==va?S=parseFloat(ka):
+"edgespacing"==va?V=parseFloat(ka):"nodespacing"==va?O=parseFloat(ka):"levelspacing"==va?R=parseFloat(ka):"layout"==va&&(Z=ka)}}}if(null==l[ya])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(l[ya].replace(/\r$/,""));xa=f=null;va=[];for(ka=0;ka<Na.length;ka++)M==Na[ka]&&(f=ka),Q==Na[ka]&&(xa=ka),va.push(mxUtils.trim(Na[ka]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==da&&(da="%"+va[0]+"%");if(null!=ha)for(var Ia=0;Ia<ha.length;Ia++)null==
+F[ha[Ia].to]&&(F[ha[Ia].to]={});M=[];for(ka=ya+1;ka<l.length;ka++){var Ca=this.editor.csvToArray(l[ka].replace(/\r$/,""));if(null==Ca){var oa=40<l[ka].length?l[ka].substring(0,40)+"...":l[ka];throw Error(oa+" ("+ka+"):\n"+mxResources.get("containsValidationErrors"));}0<Ca.length&&M.push(Ca)}G.model.beginUpdate();try{for(ka=0;ka<M.length;ka++){Ca=M[ka];var qa=null,Ja=null!=f?P+Ca[f]:null;l=!1;null!=Ja&&(qa=G.model.getCell(Ja),l=null==qa||0<=mxUtils.indexOf(q,qa));var ra=new mxCell(da,new mxGeometry(aa,
+Y,0,0),T||"whiteSpace=wrap;html=1;");ra.collapsed=p;ra.vertex=!0;ra.id=Ja;null==qa||l||G.model.setCollapsed(qa,p);for(var Ba=0;Ba<Ca.length;Ba++)G.setAttributeForCell(ra,va[Ba],Ca[Ba]),null==qa||l||G.setAttributeForCell(qa,va[Ba],Ca[Ba]);if(null!=H&&null!=N){var Aa=N[ra.getAttribute(H)];null!=Aa&&(G.labelChanged(ra,Aa),null==qa||l||G.cellLabelChanged(qa,Aa))}if(null!=v&&null!=n){var Ka=n[ra.getAttribute(v)];null!=Ka&&(ra.style=Ka)}G.setAttributeForCell(ra,"placeholders","1");ra.style=G.replacePlaceholders(ra,
+ra.style,y);null==qa||l?G.fireEvent(new mxEventObject("cellsInserted","cells",[ra])):(G.model.setStyle(qa,ra.style),0>mxUtils.indexOf(x,qa)&&x.push(qa),G.fireEvent(new mxEventObject("cellsInserted","cells",[qa])));l=null!=qa;qa=ra;if(!l)for(Ia=0;Ia<ha.length;Ia++)F[ha[Ia].to][qa.getAttribute(ha[Ia].to)]=qa;null!=ea&&"link"!=ea&&(G.setLinkForCell(qa,qa.getAttribute(ea)),G.setAttributeForCell(qa,ea,null));var ma=this.editor.graph.getPreferredSizeForCell(qa);Q=null!=xa?G.model.getCell(P+Ca[xa]):null;
+if(qa.vertex){oa=null!=Q?0:aa;ya=null!=Q?0:ba;null!=D&&null!=qa.getAttribute(D)&&(qa.geometry.x=oa+parseFloat(qa.getAttribute(D)));null!=L&&null!=qa.getAttribute(L)&&(qa.geometry.y=ya+parseFloat(qa.getAttribute(L)));var fa="@"==U.charAt(0)?qa.getAttribute(U.substring(1)):null;qa.geometry.width=null!=fa&&"auto"!=fa?parseFloat(qa.getAttribute(U.substring(1))):"auto"==U||"auto"==fa?ma.width+S:parseFloat(U);var ca="@"==W.charAt(0)?qa.getAttribute(W.substring(1)):null;qa.geometry.height=null!=ca&&"auto"!=
+ca?parseFloat(ca):"auto"==W||"auto"==ca?ma.height+S:parseFloat(W);Y+=qa.geometry.height+O}l?(null==E[Ja]&&(E[Ja]=[]),E[Ja].push(qa)):(q.push(qa),null!=Q?(Q.style=G.replacePlaceholders(Q,I,y),G.addCell(qa,Q),t.push(Q)):x.push(G.addCell(qa)))}for(ka=0;ka<t.length;ka++)fa="@"==U.charAt(0)?t[ka].getAttribute(U.substring(1)):null,ca="@"==W.charAt(0)?t[ka].getAttribute(W.substring(1)):null,"auto"!=U&&"auto"!=fa||"auto"!=W&&"auto"!=ca||G.updateGroupBounds([t[ka]],S,!0);var na=x.slice(),la=x.slice();for(Ia=
+0;Ia<ha.length;Ia++){var sa=ha[Ia];for(ka=0;ka<q.length;ka++){qa=q[ka];var ia=mxUtils.bind(this,function(Ga,La,Ma){var Pa=La.getAttribute(Ma.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ra=0;Ra<Pa.length;Ra++){var Ua=F[Ma.to][Pa[Ra]];if(null==Ua&&null!=K){Ua=new mxCell(Pa[Ra],new mxGeometry(aa,ba,0,0),K);Ua.style=G.replacePlaceholders(La,Ua.style,y);var Ha=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ha.width+S;Ua.geometry.height=Ha.height+S;F[Ma.to][Pa[Ra]]=Ua;Ua.vertex=
+!0;Ua.id=Pa[Ra];x.push(G.addCell(Ua))}if(null!=Ua){Ha=Ma.label;null!=Ma.fromlabel&&(Ha=(La.getAttribute(Ma.fromlabel)||"")+(Ha||""));null!=Ma.sourcelabel&&(Ha=G.replacePlaceholders(La,Ma.sourcelabel,y)+(Ha||""));null!=Ma.tolabel&&(Ha=(Ha||"")+(Ua.getAttribute(Ma.tolabel)||""));null!=Ma.targetlabel&&(Ha=(Ha||"")+G.replacePlaceholders(Ua,Ma.targetlabel,y));var Ta="target"==Ma.placeholders==!Ma.invert?Ua:Ga;Ta=null!=Ma.style?G.replacePlaceholders(Ta,Ma.style,y):G.createCurrentEdgeStyle();Ha=G.insertEdge(null,
+null,Ha||"",Ma.invert?Ua:Ga,Ma.invert?Ga:Ua,Ta);if(null!=Ma.labels)for(Ta=0;Ta<Ma.labels.length;Ta++){var Sa=Ma.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=G.replacePlaceholders("target"==Sa.placeholders==!Ma.invert?Ua:Ga,Wa.value,y));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ha.insert(Wa)}la.push(Ha);
+mxUtils.remove(Ma.invert?Ga:Ua,na)}}}});ia(qa,qa,sa);if(null!=E[qa.id])for(Ba=0;Ba<E[qa.id].length;Ba++)ia(qa,E[qa.id][Ba],sa)}}if(null!=ua)for(ka=0;ka<q.length;ka++)for(qa=q[ka],Ba=0;Ba<ua.length;Ba++)G.setAttributeForCell(qa,mxUtils.trim(ua[Ba]),null);if(0<x.length){var ja=new mxParallelEdgeLayout(G);ja.spacing=V;ja.checkOverlap=!0;var pa=function(){0<ja.spacing&&ja.execute(G.getDefaultParent());for(var Ga=0;Ga<x.length;Ga++){var La=G.getCellGeometry(x[Ga]);La.x=Math.round(G.snap(La.x));La.y=Math.round(G.snap(La.y));
+"auto"==U&&(La.width=Math.round(G.snap(La.width)));"auto"==W&&(La.height=Math.round(G.snap(La.height)))}};if("["==Z.charAt(0)){var za=X;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(Z)),function(){pa();za()});X=null}else if("circle"==Z){var Da=new mxCircleLayout(G);Da.disableEdgeStyle=!1;Da.resetEdges=!1;var Fa=Da.isVertexIgnored;Da.isVertexIgnored=function(Ga){return Fa.apply(this,arguments)||0>mxUtils.indexOf(x,Ga)};this.executeLayout(function(){Da.execute(G.getDefaultParent());
+pa()},!0,X);X=null}else if("horizontaltree"==Z||"verticaltree"==Z||"auto"==Z&&la.length==2*x.length-1&&1==na.length){G.view.validate();var Ea=new mxCompactTreeLayout(G,"horizontaltree"==Z);Ea.levelDistance=O;Ea.edgeRouting=!1;Ea.resetEdges=!1;this.executeLayout(function(){Ea.execute(G.getDefaultParent(),0<na.length?na[0]:null)},!0,X);X=null}else if("horizontalflow"==Z||"verticalflow"==Z||"auto"==Z&&1==na.length){G.view.validate();var wa=new mxHierarchicalLayout(G,"horizontalflow"==Z?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=O;wa.parallelEdgeSpacing=V;wa.interRankCellSpacing=R;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(G.getDefaultParent(),la);G.moveCells(la,aa,ba)},!0,X);X=null}else if("orgchart"==Z){G.view.validate();var ta=new mxOrgChartLayout(G,2,R,O),Oa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ga){return Oa.apply(this,arguments)||0>mxUtils.indexOf(x,Ga)};this.executeLayout(function(){ta.execute(G.getDefaultParent());pa()},!0,X);X=null}else if("organic"==
+Z||"auto"==Z&&la.length>x.length){G.view.validate();var Qa=new mxFastOrganicLayout(G);Qa.forceConstant=3*O;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(x,Ga)};this.executeLayout(function(){Qa.execute(G.getDefaultParent());pa()},!0,X);X=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=X&&X()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(f){var g="";if("1"!=urlParams.offline&&
+"1"!=urlParams.demo&&null!=f&&0<window.location.search.length){var l="?",q;for(q in urlParams)0>mxUtils.indexOf(f,q)&&null!=urlParams[q]&&(g+=l+q+"="+urlParams[q],l="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(f){f=null!=f?f:window.location.pathname;var g=0<f.indexOf("?")?1:0;if("1"==urlParams.offline)f+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),q;for(q in urlParams)0>mxUtils.indexOf(l,
+q)&&(f=0==g?f+"?":f+"&",null!=urlParams[q]&&(f+=q+"="+urlParams[q],g++))}return f};EditorUi.prototype.showLinkDialog=function(f,g,l,q,t){f=new LinkDialog(this,f,g,l,!0,q,t);this.showDialog(f.container,560,130,!0,!0);f.init()};EditorUi.prototype.getServiceCount=function(f){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=
+this.gitLab&&g++;f&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var f=this.getCurrentFile(),g=null!=f||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var l=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==f||f.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);
+this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));f="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("resetView").setEnabled(g);
+this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&f);this.actions.get("redo").setEnabled(this.canRedo()&&f);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(f);this.menus.get("arrange").setEnabled(f);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(f),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(f));
+this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var f=this.getCurrentFile();return null!=f&&f.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var A=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(f){var g=A.apply(this,arguments);
+this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var B=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){B.apply(this,arguments);var f=this.editor.graph,g=this.getCurrentFile(),l=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());
+this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(f.isEnabled());this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!f.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(q&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(q);this.actions.get("createRevision").setEnabled(q);
+this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(f.isEnabled()?"/"+mxResources.get("replace"):"");f=f.view.getState(f.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!=f&&null!=f.shape&&null!=f.shape.stencil)};
+var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(f,g,l,q,t,x,E,F){var G=f.editor.graph;if("xml"==l)f.hideDialog(),f.saveData(g,"xml",mxUtils.getXml(f.editor.getGraphXml()),"text/xml");else if("svg"==l)f.hideDialog(),f.saveData(g,
+"svg",mxUtils.getXml(G.getSvg(q,t,x)),"image/svg+xml");else{var y=f.getFileData(!0,null,null,null,null,!0),T=G.getGraphBounds(),n=Math.floor(T.width*t/G.view.scale),v=Math.floor(T.height*t/G.view.scale);if(y.length<=MAX_REQUEST_SIZE&&n*v<MAX_AREA)if(f.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!f.isExportToCanvas()){var H={globalVars:G.getExportVariables()};F&&(H.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});f.saveRequest(g,l,function(K,N){return new mxXmlRequest(EXPORT_URL,
+"format="+l+"&base64="+(N||"0")+(null!=K?"&filename="+encodeURIComponent(K):"")+"&extras="+encodeURIComponent(JSON.stringify(H))+(0<E?"&dpi="+E:"")+"&bg="+(null!=q?q:"none")+"&w="+n+"&h="+v+"&border="+x+"&xml="+encodeURIComponent(y))})}else"png"==l?f.exportImage(t,null==q||"none"==q,!0,!1,!1,x,!0,!1,null,F,E):f.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",F);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var f=
+this.editor.graph,g="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var q=f;this.currentPage!=this.pages[l]&&(q=this.createTemporaryGraph(f.getStylesheet()),this.updatePageRoot(this.pages[l]),q.model.setRoot(this.pages[l].root));g+=this.pages[l].getName()+" "+q.getIndexableText()+" "}else g=f.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(f){var g={},l=document.createElement("div");l.style.whiteSpace="nowrap";var q=document.createElement("h3");
+mxUtils.write(q,mxUtils.htmlEntities(f));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(q);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var E=mxSettings.getCustomLibraries();for(f=0;f<E.length;f++){var F=E[f];if("R"==F.substring(0,1)){var G=JSON.parse(decodeURIComponent(F.substring(1)));
+x[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){t.innerText="";if(0==y.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var T=0;T<y.length;T++){var n=y[T];x[n.id]&&(g[n.id]=n);var v=this.addCheckbox(t,n.title,x[n.id]);(function(H,K){mxEvent.addListener(K,"change",function(){this.checked?g[H.id]=H:delete g[H.id]})})(n,v)}},mxUtils.bind(this,
+function(y){t.innerText="";var T=document.createElement("div");T.style.padding="8px";T.style.textAlign="center";mxUtils.write(T,mxResources.get("error")+": ");mxUtils.write(T,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));t.appendChild(T)}));l.appendChild(t);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,T;for(T in g)null==x[T]&&(y++,mxUtils.bind(this,function(n){this.remoteInvoke("getFileContent",[n.downloadUrl],
+null,mxUtils.bind(this,function(v){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,v,n))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[T]));for(T in x)g[T]||this.closeLibrary(new RemoteLibrary(this,null,x[T]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,
+340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(f){this.remoteWin=f;for(var g=0;g<this.remoteInvokeQueue.length;g++)f.postMessage(this.remoteInvokeQueue[g],
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(f){var g=f.msgMarkers,l=this.remoteInvokeCallbacks[g.callbackId];if(null==l)throw Error("No callback for "+(null!=g?g.callbackId:"null"));f.error?l.error&&l.error(f.error.errResp):l.callback&&l.callback.apply(this,f.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(f,g,l,q,t){var x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),F=mxUtils.bind(this,function(){window.clearTimeout(E);x&&q.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(E);x&&t.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:F,error:G});f=JSON.stringify({event:"remoteInvoke",funtionName:f,functionArgs:g,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(f,"*"):this.remoteInvokeQueue.push(f)};EditorUi.prototype.handleRemoteInvoke=function(f,
+g){var l=mxUtils.bind(this,function(y,T){var n={event:"remoteInvokeResponse",msgMarkers:f.msgMarkers};null!=T?n.error={errResp:T}:null!=y&&(n.resp=y);this.remoteWin.postMessage(JSON.stringify(n),"*")});try{var q=f.funtionName,t=this.remoteInvokableFns[q];if(null!=t&&"function"===typeof this[q]){if(t.allowedDomains){for(var x=!1,E=0;E<t.allowedDomains.length;E++)if(g=="https://"+t.allowedDomains[E]){x=!0;break}if(!x){l(null,"Invalid Call: "+q+" is not allowed.");return}}var F=f.functionArgs;Array.isArray(F)||
+(F=[]);if(t.isAsync)F.push(function(){l(Array.prototype.slice.apply(arguments))}),F.push(function(y){l(null,y||"Unkown Error")}),this[q].apply(this,F);else{var G=this[q].apply(this,F);l([G])}}else l(null,"Invalid Call: "+q+" is not found.")}catch(y){l(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(f,g){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var q=l.open("database",2);q.onupgradeneeded=
+function(t){try{var x=q.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(E){null!=g&&g(E)}};q.onsuccess=mxUtils.bind(this,function(t){var x=q.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(E){if(!E||"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display="none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var G=!0,y=!1,T,n=0,v=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),H=mxUtils.bind(this,function(){n++;K()}),K=mxUtils.bind(this,function(){try{if(n>=T.length)v();else{var I=T[n];StorageFile.getFileContent(this,I,mxUtils.bind(this,function(M){null==M||".scratchpad"==I&&M==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[I]}),"*"):H()}),H)}}catch(M){console.log(M)}}),N=mxUtils.bind(this,function(I){try{this.setDatabaseItem(null,[{title:I.title,
+size:I.data.length,lastModified:Date.now(),type:I.isLib?"L":"F"},{title:I.title,data:I.data}],H,H,["filesInfo","files"])}catch(M){console.log(M)}});E=mxUtils.bind(this,function(I){try{if(I.source==F.contentWindow){var M={};try{M=JSON.parse(I.data)}catch(Q){}"init"==M.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=M.event||y||
+(G?null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?(T=M.resp[0],G=!1,K()):v():null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?N(M.resp[0]):H())}}catch(Q){console.log(Q)}});window.addEventListener("message",E)}})));f(x);x.onversionchange=function(){x.close()}});q.onerror=g;q.onblocked=function(){}}catch(t){null!=g&&g(t)}else null!=g&&g()}else f(this.database)};EditorUi.prototype.setDatabaseItem=function(f,g,l,q,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=
+[t],f=[f],g=[g]);var E=x.transaction(t,"readwrite");E.oncomplete=l;E.onerror=q;for(x=0;x<t.length;x++)E.objectStore(t[x]).put(null!=f&&null!=f[x]?{key:f[x],data:g[x]}:g[x])}catch(F){null!=q&&q(F)}}),q)};EditorUi.prototype.removeDatabaseItem=function(f,g,l,q){this.openDatabase(mxUtils.bind(this,function(t){q=q||"objects";Array.isArray(q)||(q=[q],f=[f]);t=t.transaction(q,"readwrite");t.oncomplete=g;t.onerror=l;for(var x=0;x<q.length;x++)t.objectStore(q[x]).delete(f[x])}),l)};EditorUi.prototype.getDatabaseItem=
+function(f,g,l,q){this.openDatabase(mxUtils.bind(this,function(t){try{q=q||"objects";var x=t.transaction([q],"readonly").objectStore(q).get(f);x.onsuccess=function(){g(x.result)};x.onerror=l}catch(E){null!=l&&l(E)}}),l)};EditorUi.prototype.getDatabaseItems=function(f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var t=q.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(E){null==E.target.result?f(x):(x.push(E.target.result.value),
+E.target.result.continue())};t.onerror=g}catch(E){null!=g&&g(E)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var t=q.transaction([l],"readonly").objectStore(l).getAllKeys();t.onsuccess=function(){f(t.result)};t.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=function(){var f=this.getCurrentFile();return null!=f?f.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var f=
+this.getCurrentFile();return null!=f?f.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var f=this.getCurrentFile();return null!=f?f.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(f,g){var l=this.getCurrentFile();null!=l?l.getComments(f,g):f([])};EditorUi.prototype.addComment=function(f,g,l){var q=this.getCurrentFile();null!=q?q.addComment(f,g,l):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var f=this.getCurrentFile();return null!=f?
+f.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var f=this.getCurrentFile();return null!=f?f.canComment():!0};EditorUi.prototype.newComment=function(f,g){var l=this.getCurrentFile();return null!=l?l.newComment(f,g):new DrawioComment(this,null,f,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var f=this.getCurrentFile();return null!=f&&f.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(f,g){var l=this.getCurrentFile();null!=
+l&&l.getRevisions?l.getRevisions(f,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var f=this.getCurrentFile();return null!=f&&(f.constructor==DriveFile&&f.isEditable()||f.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(f){f.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(f,g,l,q,t,x,E,F){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(f,g,l,q,t,x,E,F)};EditorUi.prototype.loadFonts=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(f)};EditorUi.prototype.createSvgDataUri=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(f)};EditorUi.prototype.embedCssFonts=function(f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(f,g)};EditorUi.prototype.embedExtFonts=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(f)};EditorUi.prototype.exportToCanvas=function(f,g,l,q,t,x,E,F,G,y,T,n,v,H,K,N){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(f,g,l,q,t,x,E,F,G,y,T,n,v,H,K,N)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(f,g,l,q)};EditorUi.prototype.convertImageToDataUri=function(f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(f,g)};EditorUi.prototype.base64Encode=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(f)};EditorUi.prototype.updateCRC=function(f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(f,g,l,q)};EditorUi.prototype.crc32=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(f)};EditorUi.prototype.writeGraphModelToPng=function(f,g,l,q,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(f,g,l,q,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var f=[],g=0;g<localStorage.length;g++){var l=localStorage.key(g),q=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<q.length){var t=
+"<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(t||q)&&f.push(l)}}return f};EditorUi.prototype.getLocalStorageFile=function(f){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(f);return{title:f,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,e,c,k,m){function u(){for(var H=E.getElementsByTagName("div"),K=0,N=0;N<H.length;N++)"none"!=H[N].style.display&&H[N].parentNode==E&&K++;F.style.display=0==K?"block":"none"}function z(H,K,N,I){function M(){K.removeChild(U);K.removeChild(W);P.style.display="block";Q.style.display="block"}q={div:K,comment:H,saveCallback:N,deleteOnCancel:I};var Q=K.querySelector(".geCommentTxt"),P=K.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=Q.offsetHeight+"px";U.value=H.content;K.insertBefore(U,Q);var W=document.createElement("div");W.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){I?(K.parentNode.removeChild(K),u()):M();q=null});p.className="geCommentEditBtn";W.appendChild(p);var D=mxUtils.button(mxResources.get("save"),function(){Q.innerText="";H.content=U.value;mxUtils.write(Q,H.content);M();N(H);q=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(p.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,Q);P.style.display="none";Q.style.display="none";U.focus()}function C(H,K){K.innerText="";H=new Date(H.modifiedDate);var N=b.timeSince(H);null==N&&(N=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo",
+[N],"{1} ago"));K.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function A(H){var K=document.createElement("img");K.className="geCommentBusyImg";K.src=IMAGE_PATH+"/spin.gif";H.appendChild(K);H.busyImg=K}function B(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function J(H){H.style.border="";H.removeChild(H.busyImg)}function f(H,K,N,I,M){function Q(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var Y=document.createElement("a");Y.className=
+"geCommentActionLnk";mxUtils.write(Y,O);X.appendChild(Y);mxEvent.addListener(Y,"click",function(aa){R(aa,H);aa.preventDefault();mxEvent.consume(aa)});V.appendChild(X);S&&(X.style.display="none")}function P(){function O(X){R.push(S);if(null!=X.replies)for(var Y=0;Y<X.replies.length;Y++)S=S.nextSibling,O(X.replies[Y])}var R=[],S=W;O(H);return{pdiv:S,replies:R}}function U(O,R,S,X,Y){function aa(){A(ha);H.addReply(Z,function(ea){Z.id=ea;H.replies.push(Z);J(ha);S&&S()},function(ea){ba();B(ha);b.handleError(ea,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Y)}function ba(){z(Z,ha,function(ea){aa()},!0)}var da=P().pdiv,Z=b.newComment(O,b.getCurrentUser());Z.pCommentId=H.id;null==H.replies&&(H.replies=[]);var ha=f(Z,H.replies,da,I+1);R?ba():aa()}if(M||!H.isResolved){F.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",H.id);W.style.marginLeft=20*I+5+"px";H.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
+"ghostWhite");var p=document.createElement("div");p.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=H.user.pictureUrl||Editor.userImage;p.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";p.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,H.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
+H.id);C(H,L);D.appendChild(L);W.appendChild(p);p=document.createElement("div");p.className="geCommentTxt";mxUtils.write(p,H.content||"");W.appendChild(p);H.isLocked&&(W.style.opacity="0.5");p=document.createElement("div");p.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";p.appendChild(V);g||H.isLocked||0!=I&&!l||Q(mxResources.get("reply"),function(){U("",!0)},H.isResolved);D=b.getCurrentUser();null==D||D.id!=H.user.id||g||H.isLocked||(Q(mxResources.get("edit"),
+function(){function O(){z(H,W,function(){A(W);H.editComment(H.content,function(){J(W)},function(R){B(W);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},H.isResolved),Q(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){A(W);H.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=W.querySelectorAll(".geCommentAction");for(O=
+0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);J(W);W.style.opacity="0.5"}else{R=P(H).replies;for(O=0;O<R.length;O++)E.removeChild(R[O]);for(O=0;O<K.length;O++)if(K[O]==H){K.splice(O,1);break}F.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(O){B(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));g||H.isLocked||0!=I||Q(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
+O.target;S.innerText="";H.isResolved=!H.isResolved;mxUtils.write(S,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=H.isResolved?"none":"",Y=P(H).replies,aa=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",ba=0;ba<Y.length;ba++){Y[ba].style.backgroundColor=aa;for(var da=Y[ba].querySelectorAll(".geCommentAction"),Z=0;Z<da.length;Z++)da[Z]!=S.parentNode&&(da[Z].style.display=X);T||(Y[ba].style.display="none")}u()}H.isResolved?U(mxResources.get("reOpened")+
+": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});W.appendChild(p);null!=N?E.insertBefore(W,N.nextSibling):E.appendChild(W);for(N=0;null!=H.replies&&N<H.replies.length;N++)p=H.replies[N],p.isResolved=H.isResolved,f(p,H.replies,null,I+1,M);null!=q&&(q.comment.id==H.id?(M=H.content,H.content=q.comment.content,z(H,W,q.saveCallback,q.deleteOnCancel),H.content=M):null==q.comment.id&&q.comment.pCommentId==H.id&&(E.appendChild(q.div),z(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return W}}
+var g=!b.canComment(),l=b.canReplyToReplies(),q=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var x=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E.style.bottom=parseInt(x)+7+"px";t.appendChild(E);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(F,mxResources.get("noCommentsFound"));var G=document.createElement("div");G.className="geToolbarContainer geCommentsToolbar";G.style.height=x;G.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x=document.createElement("a");x.className="geButton";if(!g){var y=x.cloneNode();y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(y,"click",function(H){function K(){z(N,I,function(M){A(I);b.addComment(M,function(Q){M.id=Q;n.push(M);J(I)},function(Q){B(I);K();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var N=b.newComment("",b.getCurrentUser()),I=f(N,n,null,0);K();H.preventDefault();mxEvent.consume(H)});G.appendChild(y)}y=x.cloneNode();y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';y.setAttribute("title",mxResources.get("showResolved"));
+y.className="geAdaptiveAsset";var T=!1;mxEvent.addListener(y,"click",function(H){this.className=(T=!T)?"geButton geCheckedBtn":"geButton";v();H.preventDefault();mxEvent.consume(H)});G.appendChild(y);b.commentsRefreshNeeded()&&(y=x.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',y.setAttribute("title",mxResources.get("refresh")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(H){v();H.preventDefault();mxEvent.consume(H)}),G.appendChild(y));
+b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geAdaptiveAsset",mxEvent.addListener(x,"click",function(H){m();H.preventDefault();mxEvent.consume(H)}),G.appendChild(x));t.appendChild(G);var n=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var H=q.div.querySelector(".geCommentEditTxtArea"),K=q.div.querySelector(".geCommentEditBtns");
+q.comment.content=H.value;H.parentNode.removeChild(H);K.parentNode.removeChild(K)}catch(N){b.handleError(N)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(N){function I(M){if(null!=M){M.sort(function(P,U){return new Date(P.modifiedDate)-new Date(U.modifiedDate)});for(var Q=0;Q<M.length;Q++)I(M[Q].replies)}}
+N.sort(function(M,Q){return new Date(M.modifiedDate)-new Date(Q.modifiedDate)});E.innerText="";E.appendChild(F);F.style.display="block";n=N;for(N=0;N<n.length;N++)I(n[N].replies),f(n[N],n,null,0,T);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(E.appendChild(q.div),z(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(N){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(N&&N.message?": "+N.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+v();this.refreshComments=v;G=mxUtils.bind(this,function(){function H(Q){var P=N[Q.id];if(null!=P)for(C(Q,P),P=0;null!=Q.replies&&P<Q.replies.length;P++)H(Q.replies[P])}if(this.window.isVisible()){for(var K=E.querySelectorAll(".geCommentDate"),N={},I=0;I<K.length;I++){var M=K[I];N[M.getAttribute("data-commentId")]=M}for(I=0;I<n.length;I++)H(n[I])}});setInterval(G,6E4);this.refreshCommentsTime=G;this.window=new mxWindow(mxResources.get("comments"),t,d,e,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,
+0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,e,c,k,m,u,z,C,A,B){var J=document.createElement("div");J.style.textAlign="center";B=null!=B?B:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=B+
+"px";f.style.lineHeight="1.2em";mxUtils.write(f,d);J.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",A),f.appendChild(d),J.appendChild(f));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});m.className="geBtn";
+null!=z&&(m.innerHTML=z+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&A.appendChild(m);var l=mxUtils.button(k||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(g.checked)});A.appendChild(l);null!=u?(l.innerHTML=u+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+A.appendChild(m);J.appendChild(A);C?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom="0px",f.appendChild(g),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),f.appendChild(k),J.appendChild(f),mxEvent.addListener(k,"click",function(q){g.checked=!g.checked;mxEvent.consume(q)})):A.style.marginTop="12px";this.init=function(){l.focus()};this.container=J};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");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,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,d,e,c,k){if(null!=d)for(var m=0;m<d.length;m++)null!=d[m]&&(b=this.patchPages(b,d[m],e,c,k));return b};
+EditorUi.prototype.patchPages=function(b,d,e,c,k){var m={},u=[],z={},C={},A={},B={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var J in c[EditorUi.DIFF_UPDATE])m[J]=c[EditorUi.DIFF_UPDATE][J];if(null!=d[EditorUi.DIFF_REMOVE])for(c=0;c<d[EditorUi.DIFF_REMOVE].length;c++)C[d[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(c=0;c<d[EditorUi.DIFF_INSERT].length;c++)z[d[EditorUi.DIFF_INSERT][c].previous]=d[EditorUi.DIFF_INSERT][c];if(null!=d[EditorUi.DIFF_UPDATE])for(J in d[EditorUi.DIFF_UPDATE])c=
+d[EditorUi.DIFF_UPDATE][J],null!=c.previous&&(B[c.previous]=J);if(null!=b){var f="";for(c=0;c<b.length;c++){var g=b[c].getId();A[g]=b[c];null!=B[f]||C[g]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][g]&&null!=d[EditorUi.DIFF_UPDATE][g].previous||(B[f]=g);f=g}}var l={},q=mxUtils.bind(this,function(x){var E=null!=x?x.getId():"";if(null!=x&&!l[E]){l[E]=!0;u.push(x);var F=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][E]:null;null!=F&&(this.updatePageRoot(x),null!=F.name&&x.setName(F.name),
+null!=F.view&&this.patchViewState(x,F.view),null!=F.cells&&this.patchPage(x,F.cells,m[x.getId()],k),!e||null==F.cells&&null==F.view||(x.needsUpdate=!0))}x=B[E];null!=x&&(delete B[E],q(A[x]));x=z[E];null!=x&&(delete z[E],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var E=A[x.getId()];null==E?q(x):(this.patchPage(E,this.diffPages([E],[x]),m[E.getId()],k),e&&(E.needsUpdate=!0))});q();for(J in B)q(A[B[J]]),delete B[J];for(J in z)t(z[J]),
+delete z[J];return u};EditorUi.prototype.patchViewState=function(b,d){if(null!=b.viewState&&null!=d){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var e in d)try{this.patchViewStateProperty(b,d,e)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,d,e){b.viewState[e]=JSON.parse(d[e])};
+EditorUi.prototype.createParentLookup=function(b,d){function e(A){var B=c[A];null==B&&(B={inserted:[],moved:{}},c[A]=B);return B}var c={};if(null!=d[EditorUi.DIFF_INSERT])for(var k=0;k<d[EditorUi.DIFF_INSERT].length;k++){var m=d[EditorUi.DIFF_INSERT][k],u=null!=m.parent?m.parent:"",z=null!=m.previous?m.previous:"";e(u).inserted[z]=m}if(null!=d[EditorUi.DIFF_UPDATE])for(var C in d[EditorUi.DIFF_UPDATE])m=d[EditorUi.DIFF_UPDATE][C],null!=m.previous&&(u=m.parent,null==u&&(k=b.getCell(C),null!=k&&(k=
+b.getParent(k),null!=k&&(u=k.getId()))),null!=u&&(e(u).moved[m.previous]=C));return c};
+EditorUi.prototype.patchPage=function(b,d,e,c){var k=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(k,d);k.beginUpdate();try{var u=k.updateEdgeParent,z=new mxDictionary,C=[];k.updateEdgeParent=function(t,x){!z.get(t)&&c&&(z.put(t,!0),C.push(t))};var A=m[""],B=null!=A&&null!=A.inserted?A.inserted[""]:null,J=null;null!=B&&(J=this.getCellForJson(B));if(null==J){var f=null!=A&&null!=A.moved?A.moved[""]:null;null!=f&&(J=k.getCell(f))}null!=J&&(k.setRoot(J),
+b.root=J);this.patchCellRecursive(b,k,k.root,m,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var g=0;g<d[EditorUi.DIFF_REMOVE].length;g++){var l=k.getCell(d[EditorUi.DIFF_REMOVE][g]);null!=l&&k.remove(l)}if(null!=d[EditorUi.DIFF_UPDATE]){var q=null!=e&&null!=e.cells?e.cells[EditorUi.DIFF_UPDATE]:null;for(f in d[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(f),d[EditorUi.DIFF_UPDATE][f],null!=q?q[f]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(g=0;g<d[EditorUi.DIFF_INSERT].length;g++)B=d[EditorUi.DIFF_INSERT][g],
+l=k.getCell(B.id),null!=l&&(k.setTerminal(l,k.getCell(B.source),!0),k.setTerminal(l,k.getCell(B.target),!1));k.updateEdgeParent=u;if(c&&0<C.length)for(g=0;g<C.length;g++)k.contains(C[g])&&k.updateEdgeParent(C[g])}finally{k.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,d,e,c,k){if(null!=e){var m=c[e.getId()],u=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var z=0,C=d.getChildCount(e),A="",B=0;B<C;B++){var J=d.getChildAt(e,B).getId();null==m[A]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][J]||null==k[EditorUi.DIFF_UPDATE][J].previous&&null==k[EditorUi.DIFF_UPDATE][J].parent)&&(m[A]=J);A=J}C=mxUtils.bind(this,function(f,g){var l=null!=f?f.getId():"";null!=f&&g&&(g=
+d.getCell(l),null!=g&&g!=f&&(f=null));null!=f&&(d.getChildAt(e,z)!=f&&d.add(e,f,z),this.patchCellRecursive(b,d,f,c,k),z++);return l});for(A=[null];0<A.length;)if(B=A.shift(),B=C(null!=B?B.child:null,null!=B?B.insert:!1),J=m[B],null!=J&&(delete m[B],A.push({child:d.getCell(J)})),J=u[B],null!=J&&(delete u[B],A.push({child:this.getCellForJson(J),insert:!0})),0==A.length){for(B in m)A.push({child:d.getCell(m[B])}),delete m[B];for(B in u)A.push({child:this.getCellForJson(u[B]),insert:!0}),delete u[B]}}};
+EditorUi.prototype.patchCell=function(b,d,e,c){if(null!=d&&null!=e){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in e?b.setValue(d,e.value):null!=e.xmlValue&&b.setValue(d,mxUtils.parseXml(e.xmlValue).documentElement);null!=c&&null!=c.style||null==e.style||b.setStyle(d,e.style);null!=e.visible&&b.setVisible(d,1==e.visible);null!=e.collapsed&&b.setCollapsed(d,1==e.collapsed);null!=e.vertex&&(d.vertex=1==e.vertex);null!=e.edge&&(d.edge=1==e.edge);null!=e.connectable&&(d.connectable=
+1==e.connectable);null!=e.geometry&&b.setGeometry(d,this.codec.decode(mxUtils.parseXml(e.geometry).documentElement));null!=e.source&&b.setTerminal(d,b.getCell(e.source),!0);null!=e.target&&b.setTerminal(d,b.getCell(e.target),!1);for(var k in e)this.cellProperties[k]||(d[k]=e[k])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var d=null;null!=b&&(d=mxUtils.getXml(b));return d};
+EditorUi.prototype.getNodeForPages=function(b){var d=null;if(null!=this.fileNode&&null!=b){d=this.fileNode.cloneNode(!1);for(var e=0;e<b.length;e++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[e].root));this.editor.graph.saveViewState(b[e].viewState,c);var k=b[e].node.cloneNode(!1);k.appendChild(c);d.appendChild(k)}}return d};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,d){var e=this.editor.extractGraphModel(b,!0,!0);null!=e&&(b=e);d=b.getElementsByTagName(d||"diagram");e=[];if(0<d.length)for(b=0;b<d.length;b++){var c=new DiagramPage(d[b]);this.updatePageRoot(c,!0);e.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),e.push(c));return e};
+EditorUi.prototype.diffPages=function(b,d){var e=[],c=[],k={},m={},u={},z=null;if(null!=b&&null!=d){for(var C=0;C<d.length;C++)m[d[C].getId()]={page:d[C],prev:z},z=d[C];z=null;for(C=0;C<b.length;C++){var A=b[C].getId();d=m[A];if(null==d)c.push(A);else{var B=this.diffPage(b[C],d.page),J={};mxUtils.isEmptyObject(B)||(J.cells=B);B=this.diffViewState(b[C],d.page);mxUtils.isEmptyObject(B)||(J.view=B);if((null!=d.prev?null==z:null!=z)||null!=z&&null!=d.prev&&z.getId()!=d.prev.getId())J.previous=null!=d.prev?
+d.prev.getId():"";null!=d.page.getName()&&b[C].getName()!=d.page.getName()&&(J.name=d.page.getName());mxUtils.isEmptyObject(J)||(u[A]=J)}delete m[b[C].getId()];z=b[C]}for(A in m)d=m[A],e.push({data:mxUtils.getXml(d.page.node),previous:null!=d.prev?d.prev.getId():""});mxUtils.isEmptyObject(u)||(k[EditorUi.DIFF_UPDATE]=u);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<e.length&&(k[EditorUi.DIFF_INSERT]=e)}return k};
+EditorUi.prototype.createCellLookup=function(b,d,e){e=null!=e?e:{};e[b.getId()]={cell:b,prev:d};var c=b.getChildCount();d=null;for(var k=0;k<c;k++){var m=b.getChildAt(k);this.createCellLookup(m,d,e);d=m}return e};
+EditorUi.prototype.diffCellRecursive=function(b,d,e,c,k){c=null!=c?c:{};var m=e[b.getId()];delete e[b.getId()];if(null==m)k.push(b.getId());else{var u=this.diffCell(b,m.cell);if(null!=u.parent||(null!=m.prev?null==d:null!=d)||null!=d&&null!=m.prev&&d.getId()!=m.prev.getId())u.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(u)||(c[b.getId()]=u)}m=b.getChildCount();d=null;for(u=0;u<m;u++){var z=b.getChildAt(u);this.diffCellRecursive(z,d,e,c,k);d=z}return c};
+EditorUi.prototype.diffPage=function(b,d){var e=[],c=[],k={};this.updatePageRoot(b);this.updatePageRoot(d);d=this.createCellLookup(d.root);var m=this.diffCellRecursive(b.root,null,d,m,c),u;for(u in d)b=d[u],e.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(k[EditorUi.DIFF_UPDATE]=m);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<e.length&&(k[EditorUi.DIFF_INSERT]=e);return k};
+EditorUi.prototype.diffViewState=function(b,d){b=b.viewState;var e=d.viewState,c={};d==this.currentPage&&(e=this.editor.graph.getViewState());if(null!=b&&null!=e)for(var k in this.viewStateProperties)this.diffViewStateProperty(b,e,k,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,d,e,c){b=JSON.stringify(this.getViewStateProperty(b,e));d=JSON.stringify(this.getViewStateProperty(d,e));b!=d&&(c[e]=d)};
+EditorUi.prototype.getViewStateProperty=function(b,d){b=b[d];"backgroundImage"==d&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==d&&null==b&&(b=[]);return b};
+EditorUi.prototype.getCellForJson=function(b){var d=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,e=b.value;null!=b.xmlValue&&(e=mxUtils.parseXml(b.xmlValue).documentElement);d=new mxCell(e,d,b.style);d.connectable=0!=b.connectable;d.collapsed=1==b.collapsed;d.visible=0!=b.visible;d.vertex=1==b.vertex;d.edge=1==b.edge;d.id=b.id;for(var c in b)this.cellProperties[c]||(d[c]=b[c]);return d};
+EditorUi.prototype.getJsonForCell=function(b,d){var e={id:b.getId()};b.vertex&&(e.vertex=1);b.edge&&(e.edge=1);b.connectable||(e.connectable=0);null!=b.parent&&(e.parent=b.parent.getId());null!=d&&(e.previous=d.getId());null!=b.source&&(e.source=b.source.getId());null!=b.target&&(e.target=b.target.getId());null!=b.style&&(e.style=b.style);null!=b.geometry&&(e.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(e.collapsed=1);b.visible||(e.visible=0);null!=b.value&&("object"===typeof b.value&&
+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?e.xmlValue=mxUtils.getXml(b.value):e.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(e[c]=b[c]);return e};
+EditorUi.prototype.diffCell=function(b,d){function e(u){return null!=u&&"object"===typeof u&&"number"===typeof u.nodeType&&"string"===typeof u.nodeName&&"function"===typeof u.getAttribute}var c={};b.vertex!=d.vertex&&(c.vertex=d.vertex?1:0);b.edge!=d.edge&&(c.edge=d.edge?1:0);b.connectable!=d.connectable&&(c.connectable=d.connectable?1:0);if((null!=b.parent?null==d.parent:null!=d.parent)||null!=b.parent&&null!=d.parent&&b.parent.getId()!=d.parent.getId())c.parent=null!=d.parent?d.parent.getId():"";
+if((null!=b.source?null==d.source:null!=d.source)||null!=b.source&&null!=d.source&&b.source.getId()!=d.source.getId())c.source=null!=d.source?d.source.getId():"";if((null!=b.target?null==d.target:null!=d.target)||null!=b.target&&null!=d.target&&b.target.getId()!=d.target.getId())c.target=null!=d.target?d.target.getId():"";e(b.value)&&e(d.value)?b.value.isEqualNode(d.value)||(c.xmlValue=mxUtils.getXml(d.value)):b.value!=d.value&&(e(d.value)?c.xmlValue=mxUtils.getXml(d.value):c.value=null!=d.value?
+d.value:null);b.style!=d.style&&(c.style=d.style);b.visible!=d.visible&&(c.visible=d.visible?1:0);b.collapsed!=d.collapsed&&(c.collapsed=d.collapsed?1:0);if(!this.isObjectEqual(b.geometry,d.geometry,new mxGeometry)){var k=this.codec.encode(d.geometry);null!=k&&(c.geometry=mxUtils.getXml(k))}for(var m in b)this.cellProperties[m]||"function"===typeof b[m]||"function"===typeof d[m]||b[m]==d[m]||(c[m]=void 0===d[m]?null:d[m]);for(m in d)m in b||this.cellProperties[m]||"function"===typeof b[m]||"function"===
+typeof d[m]||b[m]==d[m]||(c[m]=void 0===d[m]?null:d[m]);return c};EditorUi.prototype.isObjectEqual=function(b,d,e){if(null==b&&null==d)return!0;if(null!=b?null==d:null!=d)return!1;var c=function(k,m){return null==e||e[k]!=m?!0===m?1:m:void 0};return JSON.stringify(b,c)==JSON.stringify(d,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var d=mxSettings.getMainSettings();d.ui=b;"kennedy"==b&&(d.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(d))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
+mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,d){d?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
+b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],d=0;d<b.length;d++)"string"===typeof b[d]&&(b[d]={name:b[d],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
@@ -11970,10 +11974,10 @@ plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarge
null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&
(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=
!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.realtimeListener=mxUtils.bind(this,function(){this.updateOnlineState()});this.file.addListener("realtimeStateChanged",this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});
-this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(e){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
-this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(e){null!=e.error&&null!=e.error.data&&4004===e.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
-mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var e=this.file.getCurrentUser(),f={a:"join"};null!=e&&(f.name=encodeURIComponent(e.displayName),f.uid=e.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(e){this.file.stats.msgReceived++;
-this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var f=this.stringToObject(e);null!=f&&(EditorUi.debug("DrawioFileSync.message",[this],f,e.length,"bytes"),f.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):f.v===DrawioFileSync.PROTOCOL&&null!=f.d&&this.handleMessageData(f.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
+this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(d){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
+this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(d){null!=d.error&&null!=d.error.data&&4004===d.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
+mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var d=this.file.getCurrentUser(),e={a:"join"};null!=d&&(e.name=encodeURIComponent(d.displayName),e.uid=d.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(e))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(d){this.file.stats.msgReceived++;
+this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var e=this.stringToObject(d);null!=e&&(EditorUi.debug("DrawioFileSync.message",[this],e,d.length,"bytes"),e.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):e.v===DrawioFileSync.PROTOCOL&&null!=e.d&&this.handleMessageData(e.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;
DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(b){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",
@@ -11981,1058 +11985,1056 @@ DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
-DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(c){mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){l=this.file.getRealtimeState();var m=mxResources.get("disconnected");this.file.invalidChecksum?m=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?m=mxResources.get("offline"):1==l&&(m=mxResources.get("online"));
-this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(m))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var e=document.createElement("a");e.className="geButton geAdaptiveAsset";e.style.position="absolute";e.style.display="inline-block";e.style.verticalAlign=
-"bottom";e.style.color="#666";e.style.top="6px";e.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";e.style.padding="2px";e.style.fontSize="8pt";e.style.verticalAlign="middle";e.style.textDecoration="none";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="16px 16px";e.style.width="16px";e.style.height="16px";mxUtils.setOpacity(e,60);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(c){c.preventDefault()}));b(e);this.ui.toolbarContainer.appendChild(e);this.collaboratorsElement=e}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var f=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),f=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),f=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
-this.file.isRealtimeSupported()&&(e=this.file.getRealtimeError(),f=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==f?(this.collaboratorsElement.style.display="none",f=Editor.syncImage):(f=Editor.syncProblemImage,b=null!=e&&null!=e.message?b+(" ("+e.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),f=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
-f+")"}}};
-DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var e=this.file.isRevisionHistorySupported(),f=
-this.lastMessage;this.lastMessage=null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=f?' <span title="'+mxUtils.htmlEntities(f)+
-'">('+mxUtils.htmlEntities(f)+")</span>":""));f=this.ui.statusContainer.getElementsByTagName("div");0<f.length&&e&&(f[0].style.display="inline-block",e&&(f[0].style.cursor="pointer",f[0].style.textDecoration="underline",mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));e=this.ui.statusContainer.getElementsByTagName("span");if(0<e.length){var c=e[0];c.style.opacity="0";mxUtils.setPrefixedStyle(c.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
+DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(c){mxEvent.addListener(c,"click",mxUtils.bind(this,function(k){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){k=this.file.getRealtimeState();var m=mxResources.get("disconnected");this.file.invalidChecksum?m=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?m=mxResources.get("offline"):1==k&&(m=mxResources.get("online"));
+this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(m))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var d=document.createElement("a");d.className="geButton geAdaptiveAsset";d.style.position="absolute";d.style.display="inline-block";d.style.verticalAlign=
+"bottom";d.style.color="#666";d.style.top="6px";d.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";d.style.padding="2px";d.style.fontSize="8pt";d.style.verticalAlign="middle";d.style.textDecoration="none";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="16px 16px";d.style.width="16px";d.style.height="16px";mxUtils.setOpacity(d,60);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(c){c.preventDefault()}));b(d);this.ui.toolbarContainer.appendChild(d);this.collaboratorsElement=d}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var e=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),e=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),e=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
+this.file.isRealtimeSupported()&&(d=this.file.getRealtimeError(),e=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==e?(this.collaboratorsElement.style.display="none",e=Editor.syncImage):(e=Editor.syncProblemImage,b=null!=d&&null!=d.message?b+(" ("+d.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),e=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
+e+")"}}};
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var d=this.file.isRevisionHistorySupported(),e=
+this.lastMessage;this.lastMessage=null;null!=e&&40<e.length&&(e=e.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=e?' <span title="'+mxUtils.htmlEntities(e)+
+'">('+mxUtils.htmlEntities(e)+")</span>":""));e=this.ui.statusContainer.getElementsByTagName("div");0<e.length&&d&&(e[0].style.display="inline-block",d&&(e[0].style.cursor="pointer",e[0].style.textDecoration="underline",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));d=this.ui.statusContainer.getElementsByTagName("span");if(0<d.length){var c=d[0];c.style.opacity="0";mxUtils.setPrefixedStyle(c.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(c,100);mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
-DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var e=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
-e)this.lastMessageModified=e,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(e){this.reloadThread=null;if(null!=e){var f=this.file.getCurrentRevisionId(),c=e.getCurrentRevisionId();f==c?this.optimisticSync(b+1):this.file.mergeFile(e,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
+DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var d=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
+d)this.lastMessageModified=d,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(d){this.reloadThread=null;if(null!=d){var e=this.file.getCurrentRevisionId(),c=d.getCurrentRevisionId();e==c?this.optimisticSync(b+1):this.file.mergeFile(d,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
-DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var e=this.fileChanged(mxUtils.bind(this,function(f){this.updateStatus()}),mxUtils.bind(this,function(f){this.file.handleFileError(f)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=e}),!0)};
+DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var d=this.fileChanged(mxUtils.bind(this,function(e){this.updateStatus()}),mxUtils.bind(this,function(e){this.file.handleFileError(e)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=d}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var e=this.clientId+"."+this.syncChangeCounter++,f=this.createMessage({a:"change",c:b,id:e,t:Date.now()});e=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(f):"1"==urlParams.dev?(f=encodeURIComponent(this.objectToString(f)),0==this.maxSyncMessageSize||f.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+f):e=!0):e=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,e?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,m){return l.id<m.id?-1:l.id>m.id?1:0});for(var e=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=e&&this.doReceiveRemoteChanges(this.receivedData[f].c);
-e=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(e){this.file.handleFileError(e)}))}),this.cleanupDelay))};
-DrawioFileSync.prototype.cleanup=function(b,e,f){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",f);f?this.file.getLatestVersion(mxUtils.bind(this,function(l){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(l.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",l,"patches",c)}null!=b&&b()}catch(v){null!=e&&e(v)}}),e):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var d=this.clientId+"."+this.syncChangeCounter++,e=this.createMessage({a:"change",c:b,id:d,t:Date.now()});d=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(e):"1"==urlParams.dev?(e=encodeURIComponent(this.objectToString(e)),0==this.maxSyncMessageSize||e.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+e):d=!0):d=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,d?"(skipped)":"")}};
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(k,m){return k.id<m.id?-1:k.id>m.id?1:0});for(var d=null,e=0;e<this.receivedData.length;e++){var c=JSON.stringify(this.receivedData[e].c);c!=d&&this.doReceiveRemoteChanges(this.receivedData[e].c);
+d=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),this.cleanupDelay))};
+DrawioFileSync.prototype.cleanup=function(b,d,e){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",e);e?this.file.getLatestVersion(mxUtils.bind(this,function(k){try{if(this.isValidState()&&
+!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(k.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",k,"patches",c)}null!=b&&b()}catch(u){null!=d&&d(u)}}),d):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",e,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var e={};null!=b[EditorUi.DIFF_REMOVE]&&(e[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var f in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][f];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==e[EditorUi.DIFF_UPDATE]&&(e[EditorUi.DIFF_UPDATE]={});e[EditorUi.DIFF_UPDATE][f]={};var l=e[EditorUi.DIFF_UPDATE][f];l.cells={};l.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return e};
-DrawioFileSync.prototype.patchRealtime=function(b,e,f){var c=null;if(this.file.isRealtime()){c=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var l=this.extractRemove(this.extractLocal(c)),m=(null==f?b:b.concat(f)).concat([l]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,m,!0,e);mxUtils.isEmptyObject(l)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",e,"own",f,"all",c,"local",
-l,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([e])}this.localFileWasChanged=!1}catch(f){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
-b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,e,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var v=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var x=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(x,this.ui.pages):null;var E=this.file.isRealtime()?this.ui.diffPages(x,this.file.ownPages):null;x=this.ui.applyPatches(x,b);var d=null==e?null:this.ui.getHashValueForPages(x);
-this.file.setShadowPages(x);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",E,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",v,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=d){var g=this.ui.hashValue(v),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nCurrent: "+d,v,"merge",
-e,d,v);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(x)]);return}null==this.patchRealtime(b,null,E)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,p)}}catch(y){}}};
-DrawioFileSync.prototype.fileChanged=function(b,e,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,e,f):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
+DrawioFileSync.prototype.extractRemove=function(b){var d={};null!=b[EditorUi.DIFF_REMOVE]&&(d[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var e in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][e];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});d[EditorUi.DIFF_UPDATE][e]={};var k=d[EditorUi.DIFF_UPDATE][e];k.cells={};k.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return d};
+DrawioFileSync.prototype.patchRealtime=function(b,d,e){var c=null;if(this.file.isRealtime()){c=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var k=this.extractRemove(this.extractLocal(c)),m=(null==e?b:b.concat(e)).concat([k]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,m,!0,d);mxUtils.isEmptyObject(k)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",d,"own",e,"all",c,"local",
+k,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),d=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,d,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([d])}this.localFileWasChanged=!1}catch(e){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
+b,e)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
+DrawioFileSync.prototype.merge=function(b,d,e,c,k,m){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(e);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var z=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(z,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(z,this.file.ownPages):null;z=this.ui.applyPatches(z,b);var A=null==d?null:this.ui.getHashValueForPages(z);
+this.file.setShadowPages(z);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",A,"valid",d==A,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(e));if(null!=d&&d!=A){var B=this.ui.hashValue(u),J=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(k,b,"From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nCurrent: "+A,u,"merge",
+d,A,u);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(z)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),e);this.file.backupPatch=null;null!=c&&c(!0)}catch(l){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=k&&k(l);try{if(this.file.errorReportsEnabled)J=this.ui.hashValue(this.file.getCurrentRevisionId()),B=this.ui.hashValue(u),this.file.sendErrorReport("Error in merge","From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),l);else{var f=this.file.getCurrentUser(),g=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,l)}}catch(q){}}};
+DrawioFileSync.prototype.fileChanged=function(b,d,e,c){var k=window.setTimeout(mxUtils.bind(this,function(){null!=e&&e()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=e&&e()||(this.isValidState()?this.catchup(m,b,d,e):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0);return this.notifyThread=k};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorSecret(b);if(null==v||"1"==urlParams.lockdown)this.reload(e,f,c);else{var x=0,E=!1,d=mxUtils.bind(this,function(){if(null==
-c||!c())if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=v?"&secret="+encodeURIComponent(v):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&&
-(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var q=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",x,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var y=JSON.parse(n.getText());if(null!=y&&0<y.length)for(var A=0;A<y.length;A++){var C=this.stringToObject(y[A]);if(C.v>DrawioFileSync.PROTOCOL){E=!0;p=[];break}else if(C.v===
-DrawioFileSync.PROTOCOL&&null!=C.d)q=C.d.checksum,p.push(C.d.patch);else{E=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[y],"failed",E,"temp",p,"checksum",q)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,q,b,e,f,c)):x<=this.maxCacheReadyRetries-1&&!E&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(x++,this.file.stats.cacheMiss++,window.setTimeout(d,(x+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(B){null!=f&&f(B)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(d,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(l){null!=e&&e(l)}),f,c)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
-EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(l);c&&(200<=m.getStatus()&&299>=m.getStatus()?e(m.getText()):f({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))};
+DrawioFileSync.prototype.catchup=function(b,d,e,c){if(null!=b&&(null==c||!c())){var k=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",k,"to",m,"valid",this.isValidState());if(k==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=d&&d(!0);else if(this.isValidState()){var u=this.file.getDescriptorSecret(b);if(null==u||"1"==urlParams.lockdown)this.reload(d,e,c);else{var z=0,C=!1,A=mxUtils.bind(this,function(){if(null==
+c||!c())if(k!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var B=!0,J=window.setTimeout(mxUtils.bind(this,function(){B=!1;this.reload(d,e,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(m)+(null!=u?"&secret="+encodeURIComponent(u):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(J);if(B&&
+(null==c||!c()))if(k!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){var g=null,l=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[f],"status",f.getStatus(),"cacheReadyRetryCount",z,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var q=JSON.parse(f.getText());if(null!=q&&0<q.length)for(var t=0;t<q.length;t++){var x=this.stringToObject(q[t]);if(x.v>DrawioFileSync.PROTOCOL){C=!0;l=[];break}else if(x.v===
+DrawioFileSync.PROTOCOL&&null!=x.d)g=x.d.checksum,l.push(x.d.patch);else{C=!0;l=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[q],"failed",C,"temp",l,"checksum",g)}catch(E){l=[],null!=window.console&&"1"==urlParams.test&&console.log(E)}try{0<l.length?(this.file.stats.cacheHits++,this.merge(l,g,b,d,e,c)):z<=this.maxCacheReadyRetries-1&&!C&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(z++,this.file.stats.cacheMiss++,window.setTimeout(A,(z+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(d,e,c))}catch(E){null!=e&&e(E)}}else null!=e&&e()}))}else null!=e&&e()});window.setTimeout(A,this.cacheReadyDelay)}}else null!=e&&e()}};DrawioFileSync.prototype.reload=function(b,d,e,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(k){null!=d&&d(k)}),e,c)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),e=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
+EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",e)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
+DrawioFileSync.prototype.createToken=function(b,d,e){var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(k);c&&(200<=m.getStatus()&&299>=m.getStatus()?d(m.getText()):e({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),v=this.file.getDescriptorSecret(this.file.getDescriptor()),x=this.file.getDescriptorRevisionId(e),E=this.file.getCurrentRevisionId();if(null==
-v||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",x,"to",E,"etag",this.file.getCurrentEtag());else{var d=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:d,checksum:g}));this.file.stats.bytesSent+=k.length;
-this.file.stats.msgSent++;var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(x)+"&to="+encodeURIComponent(E)+"&msg="+encodeURIComponent(m)+(null!=v?"&secret="+encodeURIComponent(v):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l):
-""),mxUtils.bind(this,function(p){window.clearTimeout(q);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",d,k.length,"bytes","from",x,"to",E,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,d,e,c,k){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),u=this.file.getDescriptorSecret(this.file.getDescriptor()),z=this.file.getDescriptorRevisionId(d),C=this.file.getCurrentRevisionId();if(null==
+u||null==k||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=e&&e(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",z,"to",C,"etag",this.file.getCurrentEtag());else{var A=this.ui.diffPages(this.file.getShadowPages(),b);d=this.file.getDescriptorSecret(d);var B=this.ui.getHashValueForPages(b),J=this.objectToString(this.createMessage({patch:A,checksum:B}));this.file.stats.bytesSent+=J.length;
+this.file.stats.msgSent++;var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(z)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=u?"&secret="+encodeURIComponent(u):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(J.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(J):"")+(null!=k?"&token="+encodeURIComponent(k):
+""),mxUtils.bind(this,function(l){window.clearTimeout(g);f&&(200<=l.getStatus()&&299>=l.getStatus()?null!=e&&e():c({code:l.getStatus(),message:l.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",A,J.length,"bytes","from",z,"to",C,"etag",this.file.getCurrentEtag(),"checksum",B)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
-DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(b,d,e){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,d,e):this.fileChanged(d,e)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.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,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),e={a:"leave"};null!=b&&(e.name=encodeURIComponent(b.displayName),e.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(e))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),d={a:"leave"};null!=b&&(d.name=encodeURIComponent(b.displayName),d.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(d))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,l){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,d,e,c,k){};
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
-mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxAsyncCanvas.prototype.image=function(b,e,f,c,l,m,v,x){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,e,f,c,l,m,v,x,E,d,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==E&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(q){this.htmlCanvas.subCanvas[n]=q;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
-mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,d,e,c){};mxAsyncCanvas.prototype.roundrect=function(b,d,e,c,k,m){};mxAsyncCanvas.prototype.ellipse=function(b,d,e,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
+mxAsyncCanvas.prototype.image=function(b,d,e,c,k,m,u,z){k=this.rewriteImageSource(k);b=this.htmlCanvas.images[k];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=b,b.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,d,e,c,k,m,u,z,C,A,B,J){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var f=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[f]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,e,c,k){return e+e+c+c+k+k});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
-mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};
-mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,m,v,x,E){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=x?x:1;c.gradientColor=e;c.gradientAlpha=null!=E?E:1;c.gradientDirection=v;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
-mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};
-mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
+mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,d){this.state.dx+=b;this.state.dy+=d;this.ctx.translate(b,d)};
+mxJsCanvas.prototype.rotate=function(b,d,e,c,k){c-=this.state.dx;k-=this.state.dy;this.ctx.translate(c,k);(d||e)&&this.ctx.scale(d?-1:1,e?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-k)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(b,d,e,c,k,m,u,z,C){e=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=z?z:1;c.gradientColor=d;c.gradientAlpha=null!=C?C:1;c.gradientDirection=u;b=this.hexToRgb(b);d=this.hexToRgb(d);null!=b&&e.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=d&&e.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+c.gradientAlpha+")");this.ctx.fillStyle=e};
+mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var d=0;d<b.length;d++)b[d]=parseInt(b[d],10);this.setLineDash(b)}else this.setLineDash([0])};
+mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(d){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var d=0;d<b.length;d++)b[d]=parseInt(b[d],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
-mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
-mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(b,e){this.ctx.moveTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(b,e){this.ctx.lineTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(b,e,f,c){this.ctx.quadraticCurveTo(b,e,f,c);this.lastMoveX=f;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,m,v){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,m,v);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,m){this.ctx.bezierCurveTo(b,e,f,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,m){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+m);this.lineTo(b+f,e+c-m);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-m);this.lineTo(b,e+m);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var d=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+d+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
+mxJsCanvas.prototype.setShadowOffset=function(b,d){this.state.shadowDx=b;this.state.shadowDy=d;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=d)};mxJsCanvas.prototype.moveTo=function(b,d){this.ctx.moveTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.lineTo=function(b,d){this.ctx.lineTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.quadTo=function(b,d,e,c){this.ctx.quadraticCurveTo(b,d,e,c);this.lastMoveX=e;this.lastMoveY=c};
+mxJsCanvas.prototype.arcTo=function(b,d,e,c,k,m,u){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,d,e,c,k,m,u);if(null!=b)for(d=0;d<b.length;d+=6)this.curveTo(b[d],b[d+1],b[d+2],b[d+3],b[d+4],b[d+5])};mxJsCanvas.prototype.curveTo=function(b,d,e,c,k,m){this.ctx.bezierCurveTo(b,d,e,c,k,m);this.lastMoveX=k;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,d,e,c){this.begin();this.moveTo(b,d);this.lineTo(b+e,d);this.lineTo(b+e,d+c);this.lineTo(b,d+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(b,d,e,c,k,m){this.begin();this.moveTo(b+k,d);this.lineTo(b+e-k,d);this.quadTo(b+e,d,b+e,d+m);this.lineTo(b+e,d+c-m);this.quadTo(b+e,d+c,b+e-k,d+c);this.lineTo(b+k,d+c);this.quadTo(b,d+c,b,d+c-m);this.lineTo(b,d+m);this.quadTo(b,d,b+k,d)};mxJsCanvas.prototype.ellipse=function(b,d,e,c){this.ctx.save();this.ctx.translate(b+e/2,d+c/2);this.ctx.scale(e/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,e,f,c,l,m,v,x){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var E=this.ctx;E.save();if(m){m=l.width;var d=l.height,g=Math.min(f/m,c/d);b+=(f-m*g)/2;e+=(c-d*g)/2;f=m*g;c=d*g}v&&(E.translate(2*b+f,0),E.scale(-1,1));x&&(E.translate(0,2*e+c),E.scale(1,-1));E.drawImage(l,b,e,f,c);E.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
-mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,e,f,c,l,m,v,x,E,d,g,k){if(null!=l&&0!=l.length){f=this.state.scale;0!=k&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==E){l=this.subCanvas[this.canvasIndex++];E=l.height;k=l.width;switch(v){case mxConstants.ALIGN_MIDDLE:e-=E/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=E/f}switch(m){case mxConstants.ALIGN_CENTER:b-=k/2/f;break;case mxConstants.ALIGN_RIGHT:b-=k/f}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,
-Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=l;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);E=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);l=l.split("\n");k=E[1];this.ctx.textBaseline="top";E=e;switch(v){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(l.length-1)*k/2;E=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=k*(l.length-1),E=e-this.state.fontSize}v=[];k=[];for(f=0;f<l.length;f++)k[f]=b,v[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(k[f]-=v[f],m==mxConstants.ALIGN_CENTER&&(k[f]+=v[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=k[0];m=v[0];for(f=1;f<l.length;f++)b=Math.min(b,k[f]),m=Math.max(m,v[f]);this.ctx.save();
-b=Math.round(b)-.5;E=Math.round(E)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,E,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,E,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],k[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
-mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
+mxJsCanvas.prototype.image=function(b,d,e,c,k,m,u,z){k=this.rewriteImageSource(k);k=this.images[k];if(null!=k&&0<k.height&&0<k.width){var C=this.ctx;C.save();if(m){m=k.width;var A=k.height,B=Math.min(e/m,c/A);b+=(e-m*B)/2;d+=(c-A*B)/2;e=m*B;c=A*B}u&&(C.translate(2*b+e,0),C.scale(-1,1));z&&(C.translate(0,2*d+c),C.scale(1,-1));C.drawImage(k,b,d,e,c);C.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,d=this.ctx.shadowOffsetX,e=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=d;this.ctx.shadowOffsetY=e}else this.ctx.fill(),this.ctx.stroke()};
+mxJsCanvas.prototype.text=function(b,d,e,c,k,m,u,z,C,A,B,J){if(null!=k&&0!=k.length){e=this.state.scale;0!=J&&(this.ctx.translate(Math.round(b),Math.round(d)),this.ctx.rotate(J*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-d)));if("html"==C){k=this.subCanvas[this.canvasIndex++];C=k.height;J=k.width;switch(u){case mxConstants.ALIGN_MIDDLE:d-=C/2/e;break;case mxConstants.ALIGN_BOTTOM:d-=C/e}switch(m){case mxConstants.ALIGN_CENTER:b-=J/2/e;break;case mxConstants.ALIGN_RIGHT:b-=J/e}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(k.width/e),Math.round(k.height/e))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(k.width/e),Math.round(k.height/e)));this.ctx.scale(1/e,1/e);this.ctx.drawImage(k,
+Math.round(b*e),Math.round(d*e))}else{this.ctx.save();this.updateFont();J=document.createElement("div");J.innerHTML=k;J.style.position="absolute";J.style.top="-9999px";J.style.left="-9999px";J.style.fontFamily=this.state.fontFamily;J.style.fontWeight="bold";J.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(J);C=[J.offsetWidth,J.offsetHeight];document.body.removeChild(J);k=k.split("\n");J=C[1];this.ctx.textBaseline="top";C=d;switch(u){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";d-=(k.length-1)*J/2;C=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=J*(k.length-1),C=d-this.state.fontSize}u=[];J=[];for(e=0;e<k.length;e++)J[e]=b,u[e]=this.ctx.measureText(k[e]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(J[e]-=u[e],m==mxConstants.ALIGN_CENTER&&(J[e]+=u[e]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=J[0];m=u[0];for(e=1;e<k.length;e++)b=Math.min(b,J[e]),m=Math.max(m,u[e]);this.ctx.save();
+b=Math.round(b)-.5;C=Math.round(C)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));this.ctx.restore()}for(e=0;e<k.length;e++)this.ctx.fillText(k[e],J[e],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,d){mxEventSource.call(this);this.ui=b;this.cookieName=d;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
-DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,e=f.indexOf(";",c),0>e?e=f.length:postCookie=f.substring(e),e=f.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+
-f.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+f.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(l){this.ui.handleError(l)}};DrawioUser=function(b,e,f,c,l){this.id=b;this.email=e;this.displayName=f;this.pictureUrl=c;this.locale=l};DriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+DrawioClient.prototype.getPersistentToken=function(b){var d=null;isLocalStorage&&(d=localStorage.getItem("."+this.cookieName),null==d&&b&&(d=sessionStorage.getItem("."+this.cookieName)));if(null==d&&"undefined"!=typeof Storage){var e=document.cookie;b=this.cookieName+"=";var c=e.indexOf(b);0<=c&&(c+=b.length,d=e.indexOf(";",c),0>d?d=e.length:postCookie=e.substring(d),d=e.substring(c,d),d=0<d.length?d:null,null!=d&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie=b+"; expires="+
+e.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(b,d){try{if(null!=b)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var e=new Date;e.setYear(e.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(d?"":"; expires="+e.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(k){this.ui.handleError(k)}};DrawioUser=function(b,d,e,c,k){this.id=b;this.email=d;this.displayName=e;this.pictureUrl=c;this.locale=k};DriveFile=function(b,d,e){DrawioFile.call(this,b,d);this.desc=e};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
-DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
-DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};
-DriveFile.prototype.saveFile=function(b,e,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(v,x){var E=mxUtils.bind(this,function(d,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,q){try{this.savingFile=!1,0!=n?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
-Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=n,null!=x?this.fileSaved(q,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,x):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,q){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(q,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);E(d,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,d,null,v)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});E(m,e)}))):null!=f&&f()}catch(v){if(null!=c)c(v);else throw v;}};
-DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};
-DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};
-DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
-DriveFile.prototype.move=function(b,e,f){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=e&&e(c)}),f)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
+DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var e=0;e<d.items.length;e++)if("anyoneWithLink"===d.items[e].id||"anyone"===d.items[e].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
+DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,d,e,c,k){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,d,e,c,k)}),e,c,k])};
+DriveFile.prototype.saveFile=function(b,d,e,c,k,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(u,z){var C=mxUtils.bind(this,function(A,B){try{var J=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,B,mxUtils.bind(this,function(f,g){try{this.savingFile=!1,0!=f?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
+Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=f,null!=z?this.fileSaved(g,J,mxUtils.bind(this,function(){this.contentChanged();null!=e&&e(f)}),c,z):null!=e&&e(f)):null!=c&&c(f)}catch(l){if(this.savingFile=!1,null!=c)c(l);else throw l;}}),mxUtils.bind(this,function(f,g){try{this.savingFile=!1,this.isConflict(f)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);C(A,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(f)}catch(l){if(this.savingFile=!1,null!=c)c(l);else throw l;}}),k,k,A,null,u)}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}});C(m,d)}))):null!=e&&e()}catch(u){if(null!=c)c(u);else throw u;}};
+DriveFile.prototype.copyFile=function(b,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,d)}catch(e){d(e)}}),d,!0)};
+DriveFile.prototype.makeCopy=function(b,d,e){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,e),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(b,d,e){this.ui.drive.copyFile(this.getId(),b,d,e)};
+DriveFile.prototype.rename=function(b,d,e){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,e))}),e)};
+DriveFile.prototype.move=function(b,d,e){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=d&&d(c)}),e)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};
-DriveFile.prototype.setRealtimeEnabled=function(b,e,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),e()):f()}),
-f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
-DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,v){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(x){m(x.getData())}),v)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
-m?"&page="+m:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
-DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
-DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
-DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,e){function f(l,m,v){if(m.deleted)return null;v=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),v);for(var x=0;null!=m.replies&&x<m.replies.length;x++)v.addReplyDirect(f(l,m.replies[x],m.commentId));return v}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],v=0;v<l.items.length;v++){var x=f(this,l.items[v]);null!=x&&m.push(x)}b(m)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
-DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,f){DriveFile.call(this,b,e,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
+DriveFile.prototype.setRealtimeEnabled=function(b,d,e){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),d()):e()}),
+e)}),e):e()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
+DriveFile.prototype.getRevisions=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(e){for(var c=0;c<e.items.length;c++)mxUtils.bind(this,function(k){k.title=k.originalFilename;k.getXml=mxUtils.bind(this,function(m,u){this.ui.drive.getXmlFile(k,mxUtils.bind(this,function(z){m(z.getData())}),u)});k.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+k.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
+m?"&page="+m:""))+window.location.hash})})(e.items[c]);b(e.items)}),d)};DriveFile.prototype.getLatestVersion=function(b,d){this.ui.drive.getFile(this.getId(),b,d,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
+DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,d){b.headRevisionId=d};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
+DriveFile.prototype.setDescriptorEtag=function(b,d){b.etag=d};DriveFile.prototype.loadPatchDescriptor=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(e){b(e)}),d)};DriveFile.prototype.patchDescriptor=function(b,d){b.headRevisionId=d.headRevisionId;b.modifiedDate=d.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
+DriveFile.prototype.loadDescriptor=function(b,d){this.ui.drive.loadDescriptor(this.getId(),b,d)};DriveFile.prototype.commentsSupported=function(){return!0};
+DriveFile.prototype.getComments=function(b,d){function e(k,m,u){if(m.deleted)return null;u=new DriveComment(k,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),u);for(var z=0;null!=m.replies&&z<m.replies.length;z++)u.addReplyDirect(e(k,m.replies[z],m.commentId));return u}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(k){for(var m=[],u=0;u<k.items.length;u++){var z=e(this,k.items[u]);null!=z&&m.push(z)}b(m)}),d)};DriveFile.prototype.addComment=function(b,d,e){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){d(c.commentId)}),e)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.newComment=function(b,d){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,d)};DriveLibrary=function(b,d,e){DriveFile.call(this,b,d,e)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,d,e){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),e)};DriveLibrary.prototype.open=function(){};(function(){var b=null,d={};window.DriveClient=function(e,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,e,"gDriveAuthInfo");this.isExtAuth=c;this.ui=e;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
-f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
+e=JSON.parse(this.token);null!=e&&null!=e.current&&(this.userId=e.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
-null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&f.push(c[m].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(x){var E=null!=x.message?x.message:mxResources.get("cannotLogin");null!=x&&null!=x.error&&403==x.error.code&&null!=x.error.data&&0<x.error.data.length&&"domainPolicy"==x.error.data[0].reason&&(E=x.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-E,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,v=null,x=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var E=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
-function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})}),this.ui.timeout);var d=null,g=!1;"string"===typeof f.params?d=f.params:null!=f.params&&(d=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,d,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(q,p){if(null!=f.headers)for(var y in f.headers)q.setRequestHeader(y,f.headers[y]);else null!=f.contentType?
-q.setRequestHeader("Content-Type",f.contentType):g&&q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(q){try{if(window.clearTimeout(v),m){try{var p=JSON.parse(q.getText())}catch(C){p=null}if(200<=q.getStatus()&&299>=q.getStatus())null!=c&&c(p);else{var y=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,A=null!=y&&0<y.length?y[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&&
-(403!=p.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=A)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==A?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(E)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&x<this.maxRetries?(x++,this.requestThread=window.setTimeout(E,
-Math.round(Math.pow(2,x)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(C){if(null!=l)l(C);else throw C;}}))}catch(q){if(null!=l)l(q);else throw q;}});null!=b&&this.authCalled?E():this.execute(E)}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"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(f,c,l,m,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(x){this.updateAuthInfo(x,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?this.authorizeStep2(x.getText(),f,c,l,m,v):null!=l&&l(x)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
-f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var x=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var E=JSON.parse(x);this.setPersistentToken(E,!c);null!=m&&m()}),v)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,v,x){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var E=
-JSON.parse(this.getPersistentToken(!0));E&&null!=E.current&&(this.userId=E.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var d=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(v?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(d),
-x=null):null==x?x=this.createAuthWin(d):x.location=d;null!=x?(window.onGoogleDriveCallback=mxUtils.bind(this,function(g,k){window.onGoogleDriveCallback=null;try{null==g?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(g,v,!0,l,m)}catch(n){null!=m&&m(n)}finally{null!=k&&k.close()}}),x.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(g){if(null!=m)m(g);else throw g;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
-this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.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*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?
-this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var v=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(x){var E=mxResources.get("notAvailable"),d=E,g=null;null!=x&&null!=x.user&&(E=x.user.emailAddress,d=x.user.displayName,
-g=null!=x.user.picture?x.user.picture.url:null);this.setUser(new DrawioUser(v.id,E,d,g,v.locale));this.userId=v.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile=
-function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,m)};DriveClient.prototype.moveFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,m)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,
-l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,m){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,m,v){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":
-""))+"&orderBy=modifiedDate desc,title"},m,v)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,v){m=null!=m?m:!1;v=null!=v?v:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(x){x.title=x.originalFilename;x.headRevisionId=x.id;x.id=f;this.getXmlFile(x,
-c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(x){try{if(null!=this.user){var E=/\.png$/i.test(x.title);/\.v(dx|sdx?)$/i.test(x.title)||/\.gliffy$/i.test(x.title)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(x.downloadUrl,x.title,x.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||v||x.mimeType==this.libraryMimeType||x.mimeType==this.xmlMimeType?this.getXmlFile(x,c,l,!0,v):this.getXmlFile(x,c,l)}else l({message:mxResources.get("loggedOut")})}catch(d){if(null!=l)l(d);
-else throw d;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,v){try{var x={Authorization:"Bearer "+b},E=f.downloadUrl;if(null==E)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var d=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(E,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")});
-else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var q=k.lastIndexOf(",");if(0<q){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(q+1);var y=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?
-n=!0:k=y}catch(C){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(y=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,E)?this.ui.parseFileData(k,mxUtils.bind(this,function(C){try{4==C.readyState&&(200<=C.status&&299>=C.status?c(new LocalFile(this.ui,C.responseText,f.title+this.extension,
-!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(C){if(null!=l)l(C);else throw C;}}),mxUtils.bind(this,function(k,n){if(d<this.maxRetries&&null!=n&&403==n.getStatus())d++,window.setTimeout(g,2*d*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
-9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,x)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,v,x,E,d,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(u){if(null!=m)m(u);else throw u;try{if(!f.isConflict(u)){var z="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(u)||"unknown");null!=u&&null!=u.error&&null!=u.error.code&&(z+="-code_"+u.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:z,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(F){}}),q=mxUtils.bind(this,function(u){n(u);try{EditorUi.logError(u.message,null,null,
-u)}catch(z){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),y=f.desc.etag,A=f.desc.modifiedDate,C=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());x=null!=x?x:!1;var I=null,M=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,I=f.desc,M=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;
-var S=mxUtils.bind(this,function(u,z,F){try{f.saveLevel=3;f.constructor==DriveFile&&(null==d&&(d=[]),null==f.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));F||(null!=u||x||(u=this.placeholderThumbnail,z=this.placeholderMimeType),null!=u&&null!=z&&(G.thumbnail={image:u,mimeType:z}));var J=f.getData(),K=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()-
-p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var Q=(new Date(U.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=Q||y==U.etag||c&&C==U.headRevisionId){f.saveLevel=12;var V=[];0>=Q&&V.push("invalid modified time");y==U.etag&&V.push("stale etag");c&&C==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+C+"."+A+"-"+this.ui.hashValue(y)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,l(U,J),null!=I){this.executeRequest({url:"/files/"+I.id+"/revisions/"+I.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+I.id+"/revisions/"+
-I.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+I.id+"."+I.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){q(t)}}),H=mxUtils.bind(this,function(U,Q){f.saveLevel=4;try{null!=d&&(G.properties=d);var V=E||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),W=mxUtils.bind(this,function(L){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(R){}this.executeRequest(this.createUploadRequest(f.getId(),G,U,c||L||T,Q,L?null:V,M),mxUtils.bind(this,function(R){window.clearTimeout(P);O&&K(R)}),mxUtils.bind(this,function(R){window.clearTimeout(P);
-if(O){f.saveLevel=6;try{f.isConflict(R)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var Z=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,Z);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",Z)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==C&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote",
-X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(R,X)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){n(R)})):n(R)}catch(X){q(X)}}}))}catch(R){q(R)}}),t=mxUtils.bind(this,function(L){f.saveLevel=9;if(L||null==V)W(L);else{var T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(O);
-if(T){f.saveLevel=10;try{null!=P&&P.headRevisionId==C?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,W(L)):n({error:{code:412}},P)}catch(R){q(R)}}}),mxUtils.bind(this,function(P){window.clearTimeout(O);T&&(f.saveLevel=11,n(P))}))}});if(B&&null==u){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,T=document.createElement("canvas");
-T.width=this.thumbnailWidth;T.height=Math.floor(D.height*L);T.getContext("2d").drawImage(D,0,0,T.width,T.height);var O=T.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:O,mimeType:"image/png"};t(!1)}catch(P){try{t(!1)}catch(R){q(R)}}});D.src="data:image/png;base64,"+U}else t(!1)}catch(L){q(L)}});if(B){var N=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){H(U,!0)}),n,this.ui.getCurrentFile()!=f?
-J:null,N.scale,N.border)}else H(J,!1)}catch(U){q(U)}});try{f.saveLevel=2,(x||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(u){try{var z=null;try{null!=u&&(z=u.toDataURL("image/png")),null!=z&&(z=z.length>this.maxThumbnailSize?null:z.substring(z.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){z=null}S(z,"image/png")}catch(F){q(F)}})))&&
-S(null,null,f.constructor!=DriveLibrary)}catch(u){q(u)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(u){q(u)}};DriveClient.prototype.insertFile=function(f,c,l,m,v,x,E){x=null!=x?x:this.xmlMimeType;f={mimeType:x,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,E),mxUtils.bind(this,function(d){x==this.libraryMimeType?m(new DriveLibrary(this.ui,c,d)):0==d?null!=v&&v({message:mxResources.get("errorSavingFile")}):
-m(new DriveFile(this.ui,c,d))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,v,x,E){v=null!=v?v:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=x&&(d["If-Match"]=x);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
-JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?v?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");E&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
-var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=
-null!=f?f:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",v=mxUtils.bind(this,function(n){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(n).className&&(mxEvent.removeListener(document,
-"click",v),this[m].setVisible(!1),l&&l())});if(null==e[m]||e[m+"Token"]!=b){e[m+"Token"]=b;var x=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),E=(new google.picker.DocsView).setIncludeFolders(!0),d=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(x.setMimeTypes("*/*"),E.setMimeTypes("*/*"),d.setMimeTypes("*/*")):(x.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes),
-d.setMimeTypes(this.mimeTypes));e[m]=(new google.picker.PickerBuilder).setOAuthToken(e[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(x).addView(E).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e[m]=e[m].setSize(k[0],k[1])}urlParams.topBaseUrl&&(e[m]=e[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[m]=e[m].setCallback(mxUtils.bind(this,
-function(n){if(n.action==google.picker.Action.PICKED||n.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",v),l&&n.action==google.picker.Action.CANCEL&&l();n.action==google.picker.Action.PICKED&&this.filePicked(n)})).build()}mxEvent.addListener(document,"click",v);e[m].setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=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 m=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",m),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var v=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-x=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),E=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(v).addView(x).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
-if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(d[0],d[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(g){g.action!=google.picker.Action.PICKED&&g.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",m);this.folderPickerCallback(g)})).build()}mxEvent.addListener(document,"click",m);e.folderPicker.setVisible(!0)}catch(g){this.ui.spinner.stop(),
-this.ui.handleError(g)}}))}catch(m){this.ui.handleError(m)}});c?l():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(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?
-this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=
-b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),v=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-x=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(v).addView(google.picker.ViewId.RECENTLY_PICKED).addView(x);if(urlParams.gPickerSize){var E=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(E[0],E[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
-e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(d){d.action!=google.picker.Action.PICKED&&d.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.showPermissions=function(f){var c=mxUtils.bind(this,function(){var l=new ConfirmDialog(this.ui,
-mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+f)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(l.container,360,190,!0,!0);l.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var l=new gapi.drive.share.ShareClient(this.appId);l.setOAuthToken(b);l.setItemIds([f]);l.showSettingsDialog();"MutationObserver"in window&&(null!=
-this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var v=!1,x=0;x<m.length;x++)for(var E=0;E<m[x].addedNodes.length;E++){var d=m[x].addedNodes[E];"BUTTON"==d.nodeName&&"ok"==d.getAttribute("name")&&null!=d.parentNode&&null!=d.parentNode.parentNode&&"dialog"==d.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,d.click(),c(),v=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&&
-(v=!0)}v&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=
-JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};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};
+null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(e){this.user=e;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=e.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(e){this.userId=e;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var e=[],c=JSON.parse(this.getPersistentToken(!0)),k=null;if(null!=c){null!=c.current&&(k=c.current.userId,e.push(c[k].user),e[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=k&&e.push(c[m].user)}return e};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
+this.setUser(null);b=null};DriveClient.prototype.execute=function(e){var c=mxUtils.bind(this,function(k){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,u){this.authorize(!1,mxUtils.bind(this,function(){null!=u&&u();e()}),mxUtils.bind(this,function(z){var C=null!=z.message?z.message:mxResources.get("cannotLogin");null!=z&&null!=z.error&&403==z.error.code&&null!=z.error.data&&0<z.error.data.length&&"domainPolicy"==z.error.data[0].reason&&(C=z.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+C,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,e,c)};DriveClient.prototype.executeRequest=function(e,c,k){try{var m=!0,u=null,z=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var C=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=e;null!=u&&window.clearTimeout(u);u=window.setTimeout(mxUtils.bind(this,
+function(){m=!1;null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var A=null,B=!1;"string"===typeof e.params?A=e.params:null!=e.params&&(A=JSON.stringify(e.params),B=!0);var J=e.fullUrl||this.GDriveBaseUrl+e.url;B&&(J+=(0<J.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(J,A,e.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(g,l){if(null!=e.headers)for(var q in e.headers)g.setRequestHeader(q,e.headers[q]);else null!=e.contentType?
+g.setRequestHeader("Content-Type",e.contentType):B&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});f.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(u),m){try{var l=JSON.parse(g.getText())}catch(x){l=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(l);else{var q=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,t=null!=q&&0<q.length?q[0].reason:null;null==k||null==l||null==l.error||-1!=l.error.code&&
+(403!=l.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=t)?403==l.error.code&&this.retryAuth||401==l.error.code&&this.retryAuth&&"authError"==t?(null!=k&&k(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(C)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==e&&z<this.maxRetries?(z++,this.requestThread=window.setTimeout(C,
+Math.round(Math.pow(2,z)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=k&&k(l):k(l)}}}catch(x){if(null!=k)k(x);else throw x;}}))}catch(g){if(null!=k)k(g);else throw g;}});null!=b&&this.authCalled?C():this.execute(C)}catch(A){if(null!=k)k(A);else throw A;}};DriveClient.prototype.createAuthWin=function(e){return window.open(e?e:"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(e,c,k,m,u){this.isExtAuth&&!e?window.parent.driveAuth(mxUtils.bind(this,function(z){this.updateAuthInfo(z,!0,!0,c,k)}),k):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()?this.authorizeStep2(z.getText(),e,c,k,m,u):null!=k&&k(z)}),k)};DriveClient.prototype.updateAuthInfo=function(e,c,k,m,u){b=e.access_token;delete e.access_token;e.expires=Date.now()+1E3*parseInt(e.expires_in);
+e.remember=c;this.resetTokenRefresh(e);this.authCalled=!0;if(k||null==this.user){var z=JSON.stringify(e);this.updateUser(mxUtils.bind(this,function(){var C=JSON.parse(z);this.setPersistentToken(C,!c);null!=m&&m()}),u)}else null!=m&&(this.setPersistentToken(e,!c),m())};DriveClient.prototype.authorizeStep2=function(e,c,k,m,u,z){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var C=
+JSON.parse(this.getPersistentToken(!0));C&&null!=C.current&&(this.userId=C.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?(B=JSON.parse(B.getText()),this.updateAuthInfo(B,!0,!1,k,m)):(0!=B.getStatus()&&this.logout(),null!=m&&m(B))}),m);else{var A=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(u?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(A),
+z=null):null==z?z=this.createAuthWin(A):z.location=A;null!=z?(window.onGoogleDriveCallback=mxUtils.bind(this,function(B,J){window.onGoogleDriveCallback=null;try{null==B?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(B,u,!0,k,m)}catch(f){null!=m&&m(f)}finally{null!=J&&J.close()}}),z.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(B){if(null!=m)m(B);else throw B;}};DriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
+this.tokenRefreshThread=null);null!=e&&null==e.error&&0<e.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(e.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*e.expires_in))};DriveClient.prototype.checkToken=function(e){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?
+this.execute(mxUtils.bind(this,function(){e();c&&this.fireEvent(new mxEventObject("disconnected"))})):e()};DriveClient.prototype.updateUser=function(e,c){try{var k={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var u=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(z){var C=mxResources.get("notAvailable"),A=C,B=null;null!=z&&null!=z.user&&(C=z.user.emailAddress,A=z.user.displayName,
+B=null!=z.user.picture?z.user.picture.url:null);this.setUser(new DrawioUser(u.id,C,A,B,u.locale));this.userId=u.id;null!=e&&e()}),c)}),c,null,null,null,null,k)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(e,c,k,m){null!=e&&null!=c&&this.executeRequest({url:"/files/"+e+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},k,m)};DriveClient.prototype.renameFile=
+function(e,c,k,m){null!=e&&null!=c&&this.executeRequest(this.createDriveRequest(e,{title:c}),k,m)};DriveClient.prototype.moveFile=function(e,c,k,m){null!=e&&null!=c&&this.executeRequest(this.createDriveRequest(e,{parents:[{kind:"drive#fileLink",id:c}]}),k,m)};DriveClient.prototype.createDriveRequest=function(e,c){return{url:"/files/"+e+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(e,c,
+k){return this.getFile(e,c,k,!0,!0)};DriveClient.prototype.loadDescriptor=function(e,c,k,m){this.executeRequest({url:"/files/"+e+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,k)};DriveClient.prototype.listFiles=function(e,c,k,m,u){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(e?" and (title contains '"+e+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(k?" and ('me' in owners)":
+""))+"&orderBy=modifiedDate desc,title"},m,u)};DriveClient.prototype.getCustomProperty=function(e,c){e=e.properties;var k=null;if(null!=e)for(var m=0;m<e.length;m++)if(e[m].key==c){k=e[m].value;break}return k};DriveClient.prototype.getFile=function(e,c,k,m,u){m=null!=m?m:!1;u=null!=u?u:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+e+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(z){z.title=z.originalFilename;z.headRevisionId=z.id;z.id=e;this.getXmlFile(z,
+c,k)}),k):this.loadDescriptor(e,mxUtils.bind(this,function(z){try{if(null!=this.user){var C=/\.png$/i.test(z.title);/\.v(dx|sdx?)$/i.test(z.title)||/\.gliffy$/i.test(z.title)||!this.ui.useCanvasForExport&&C?this.ui.convertFile(z.downloadUrl,z.title,z.mimeType,this.extension,c,k,null,{Authorization:"Bearer "+b}):m||u||z.mimeType==this.libraryMimeType||z.mimeType==this.xmlMimeType?this.getXmlFile(z,c,k,!0,u):this.getXmlFile(z,c,k)}else k({message:mxResources.get("loggedOut")})}catch(A){if(null!=k)k(A);
+else throw A;}}),k)};DriveClient.prototype.isGoogleRealtimeMimeType=function(e){return null!=e&&"application/vnd.jgraph.mxfile."==e.substring(0,30)};DriveClient.prototype.getXmlFile=function(e,c,k,m,u){try{var z={Authorization:"Bearer "+b},C=e.downloadUrl;if(null==C)null!=k&&k({message:mxResources.get("exportOptionsDisabledDetails")});else{var A=0,B=mxUtils.bind(this,function(){this.ui.editor.loadUrl(C,mxUtils.bind(this,function(J){try{if(null==J)k({message:mxResources.get("invalidOrMissingFile")});
+else if(e.mimeType==this.libraryMimeType||u)e.mimeType!=this.libraryMimeType||u?c(new DriveLibrary(this.ui,J,e)):k({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(e.title)){var g=J.lastIndexOf(",");if(0<g){var l=this.ui.extractGraphModelFromPng(J);if(null!=l&&0<l.length)J=l;else try{l=J.substring(g+1);var q=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(q).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?
+f=!0:J=q}catch(x){f=!0}}}else/\.pdf$/i.test(e.title)?(l=Editor.extractGraphModelFromPdf(J),null!=l&&0<l.length&&(f=!0,J=l)):"data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)&&(q=J.substring(22),J=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,C)?this.ui.parseFileData(J,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,e.title+this.extension,
+!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=k)k(E);else throw E;}}),e.title):c(f?new LocalFile(this.ui,J,e.title,!0):new DriveFile(this.ui,J,e))}}catch(x){if(null!=k)k(x);else throw x;}}),mxUtils.bind(this,function(J,f){if(A<this.maxRetries&&null!=f&&403==f.getStatus())A++,window.setTimeout(B,2*A*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=k)k(J);else throw J;}),null!=e.mimeType&&"image/"==e.mimeType.substring(0,6)&&"image/svg"!=e.mimeType.substring(0,
+9)||/\.png$/i.test(e.title)||/\.jpe?g$/i.test(e.title)||/\.pdf$/i.test(e.title),null,null,null,z)});B()}}catch(J){if(null!=k)k(J);else throw J;}};DriveClient.prototype.saveFile=function(e,c,k,m,u,z,C,A,B){try{var J=0;e.saveLevel=1;var f=mxUtils.bind(this,function(n){if(null!=m)m(n);else throw n;try{if(!e.isConflict(n)){var v="sl_"+e.saveLevel+"-error_"+(e.getErrorMessage(n)||"unknown");null!=n&&null!=n.error&&null!=n.error.code&&(v+="-code_"+n.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+e.getHash()+"-rev_"+e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+(e.changeListenerEnabled?"":"-nolisten")+(e.inConflictState?"-conflict":"")+(e.invalidChecksum?"-invalid":""),action:v,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync")})}}catch(H){}}),g=mxUtils.bind(this,function(n){f(n);try{EditorUi.logError(n.message,null,null,
+n)}catch(v){}});if(e.isEditable()&&null!=e.desc){var l=(new Date).getTime(),q=e.desc.etag,t=e.desc.modifiedDate,x=e.desc.headRevisionId,E=this.ui.useCanvasForExport&&/(\.png)$/i.test(e.getTitle());z=null!=z?z:!1;var F=null,G=!1,y={mimeType:e.desc.mimeType,title:e.getTitle()};if(this.isGoogleRealtimeMimeType(y.mimeType))y.mimeType=this.xmlMimeType,F=e.desc,G=c=!0;else if("application/octet-stream"==y.mimeType||"1"==urlParams["override-mime"]&&y.mimeType!=this.xmlMimeType)y.mimeType=this.xmlMimeType;
+var T=mxUtils.bind(this,function(n,v,H){try{e.saveLevel=3;e.constructor==DriveFile&&(null==A&&(A=[]),null==e.getChannelId()&&A.push({key:"channel",value:Editor.guid(32)}),null==e.getChannelKey()&&A.push({key:"key",value:Editor.guid(32)}),A.push({key:"secret",value:null!=B?B:Editor.guid(32)}));H||(null!=n||z||(n=this.placeholderThumbnail,v=this.placeholderMimeType),null!=n&&null!=v&&(y.thumbnail={image:n,mimeType:v}));var K=e.getData(),N=mxUtils.bind(this,function(Q){try{if(e.saveDelay=(new Date).getTime()-
+l,e.saveLevel=11,null==Q)f({message:mxResources.get("errorSavingFile")+": Empty response"});else{var P=(new Date(Q.modifiedDate)).getTime()-(new Date(t)).getTime();if(0>=P||q==Q.etag||c&&x==Q.headRevisionId){e.saveLevel=12;var U=[];0>=P&&U.push("invalid modified time");q==Q.etag&&U.push("stale etag");c&&x==Q.headRevisionId&&U.push("stale revision");var W=U.join(", ");f({message:mxResources.get("errorSavingFile")+": "+W},Q);try{EditorUi.logError("Critical: Error saving to Google Drive "+e.desc.id,
+null,"from-"+x+"."+t+"-"+this.ui.hashValue(q)+"-to-"+Q.headRevisionId+"."+Q.modifiedDate+"-"+this.ui.hashValue(Q.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync"))}catch(p){}}else if(e.saveLevel=null,k(Q,K),null!=F){this.executeRequest({url:"/files/"+F.id+"/revisions/"+F.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(p){p.pinned=!0;this.executeRequest({url:"/files/"+F.id+"/revisions/"+
+F.headRevisionId,method:"PUT",params:p})})));try{EditorUi.logEvent({category:e.convertedFrom+"-CONVERT-FILE-"+e.getHash(),action:"from_"+F.id+"."+F.headRevisionId+"-to_"+e.desc.id+"."+e.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=e.sync?"-client_"+e.sync.clientId:"nosync")})}catch(p){}}}}catch(p){g(p)}}),I=mxUtils.bind(this,function(Q,P){e.saveLevel=4;try{null!=A&&(y.properties=A);var U=C||e.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:e.getCurrentEtag(),W=mxUtils.bind(this,function(L){e.saveLevel=5;try{var V=e.desc.mimeType!=this.xmlMimeType&&e.desc.mimeType!=this.mimeType&&e.desc.mimeType!=this.libraryMimeType,O=!0,R=null;try{R=window.setTimeout(mxUtils.bind(this,function(){O=!1;f({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(e.getId(),y,Q,c||L||V,P,L?null:U,G),mxUtils.bind(this,function(S){window.clearTimeout(R);O&&N(S)}),mxUtils.bind(this,function(S){window.clearTimeout(R);
+if(O){e.saveLevel=6;try{e.isConflict(S)?this.executeRequest({url:"/files/"+e.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){e.saveLevel=7;try{if(null!=X&&X.etag==U)if(J<this.staleEtagMaxRetries){J++;var Y=2*J*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",J,"delay",Y)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+e.getHash(),action:"rev_"+
+e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+(e.changeListenerEnabled?"":"-nolisten")+(e.inConflictState?"-conflict":"")+(e.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync")})}catch(aa){}}else"1"==urlParams.test&&X.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",U,
+"remote",X.etag,"rev",e.desc.headRevisionId,"response",[X],"file",[e]),f(S,X)}catch(aa){g(aa)}}),mxUtils.bind(this,function(){f(S)})):f(S)}catch(X){g(X)}}}))}catch(S){g(S)}}),p=mxUtils.bind(this,function(L){e.saveLevel=9;if(L||null==U)W(L);else{var V=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){V=!1;f({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(R){}this.executeRequest({url:"/files/"+e.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(R){window.clearTimeout(O);
+if(V){e.saveLevel=10;try{null!=R&&R.headRevisionId==x?("1"==urlParams.test&&U!=R.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",U,"to",R.etag,"rev",e.desc.headRevisionId,"response",[R],"file",[e]),U=R.etag,W(L)):f({error:{code:412}},R)}catch(S){g(S)}}}),mxUtils.bind(this,function(R){window.clearTimeout(O);V&&(e.saveLevel=11,f(R))}))}});if(E&&null==n){e.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,V=document.createElement("canvas");
+V.width=this.thumbnailWidth;V.height=Math.floor(D.height*L);V.getContext("2d").drawImage(D,0,0,V.width,V.height);var O=V.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y.thumbnail={image:O,mimeType:"image/png"};p(!1)}catch(R){try{p(!1)}catch(S){g(S)}}});D.src="data:image/png;base64,"+Q}else p(!1)}catch(L){g(L)}});if(E){var M=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){I(Q,!0)}),f,this.ui.getCurrentFile()!=e?
+K:null,M.scale,M.border)}else I(K,!1)}catch(Q){g(Q)}});try{e.saveLevel=2,(z||E||e.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=y.mimeType&&"application/vnd.jgraph.mxfile"!=y.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(n){try{var v=null;try{null!=n&&(v=n.toDataURL("image/png")),null!=v&&(v=v.length>this.maxThumbnailSize?null:v.substring(v.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){v=null}T(v,"image/png")}catch(H){g(H)}})))&&
+T(null,null,e.constructor!=DriveLibrary)}catch(n){g(n)}}else this.ui.editor.graph.reset(),f({message:mxResources.get("readOnly")})}catch(n){g(n)}};DriveClient.prototype.insertFile=function(e,c,k,m,u,z,C){z=null!=z?z:this.xmlMimeType;e={mimeType:z,title:e};null!=k&&(e.parents=[{kind:"drive#fileLink",id:k}]);this.executeRequest(this.createUploadRequest(null,e,c,!1,C),mxUtils.bind(this,function(A){z==this.libraryMimeType?m(new DriveLibrary(this.ui,c,A)):0==A?null!=u&&u({message:mxResources.get("errorSavingFile")}):
+m(new DriveFile(this.ui,c,A))}),u)};DriveClient.prototype.createUploadRequest=function(e,c,k,m,u,z,C){u=null!=u?u:!1;var A={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=z&&(A["If-Match"]=z);e={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=e?"/"+e:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=e?"PUT":"POST",headers:A,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!=k?u?k:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(k):Graph.base64EncodeUnicode(k):"")+"\r\n---------314159265358979323846--"};m||(e.fullUrl+="&newRevision=false");C&&(e.fullUrl+="&pinned=true");return e};DriveClient.prototype.createLinkPicker=function(){var e=d.linkPicker;if(null==e||d.linkPickerToken!=b){d.linkPickerToken=b;e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
+var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);e=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(e).addView(c).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED)}return e};DriveClient.prototype.pickFile=function(e,c,k){this.filePickerCallback=
+null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",u=mxUtils.bind(this,function(f){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(f).className&&(mxEvent.removeListener(document,
+"click",u),this[m].setVisible(!1),k&&k())});if(null==d[m]||d[m+"Token"]!=b){d[m+"Token"]=b;var z=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),C=(new google.picker.DocsView).setIncludeFolders(!0),A=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),B=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(z.setMimeTypes("*/*"),C.setMimeTypes("*/*"),A.setMimeTypes("*/*")):(z.setMimeTypes(this.mimeTypes),C.setMimeTypes(this.mimeTypes),
+A.setMimeTypes(this.mimeTypes));d[m]=(new google.picker.PickerBuilder).setOAuthToken(d[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(z).addView(C).addView(A).addView(google.picker.ViewId.RECENTLY_PICKED).addView(B);if(urlParams.gPickerSize){var J=urlParams.gPickerSize.split(",");d[m]=d[m].setSize(J[0],J[1])}urlParams.topBaseUrl&&(d[m]=d[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d[m]=d[m].setCallback(mxUtils.bind(this,
+function(f){if(f.action==google.picker.Action.PICKED||f.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",u),k&&f.action==google.picker.Action.CANCEL&&k();f.action==google.picker.Action.PICKED&&this.filePicked(f)})).build()}mxEvent.addListener(document,"click",u);d[m].setVisible(!0)}catch(f){this.ui.spinner.stop(),this.ui.handleError(f)}}))};DriveClient.prototype.pickFolder=function(e,c){this.folderPickerCallback=e;var k=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 m=mxUtils.bind(this,function(B){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(B).className&&(mxEvent.removeListener(document,"click",m),d.folderPicker.setVisible(!1))});if(null==d.folderPicker||d.folderPickerToken!=b){d.folderPickerToken=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
+z=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),C=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");d.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(d.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(z).addView(C).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+if(urlParams.gPickerSize){var A=urlParams.gPickerSize.split(",");d.folderPicker=d.folderPicker.setSize(A[0],A[1])}urlParams.topBaseUrl&&(d.folderPicker=d.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d.folderPicker=d.folderPicker.setCallback(mxUtils.bind(this,function(B){B.action!=google.picker.Action.PICKED&&B.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",m);this.folderPickerCallback(B)})).build()}mxEvent.addListener(document,"click",m);d.folderPicker.setVisible(!0)}catch(B){this.ui.spinner.stop(),
+this.ui.handleError(B)}}))}catch(m){this.ui.handleError(m)}});c?k():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){k()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(e){this.filePickerCallback=e;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?
+this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(A){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(A).className&&(mxEvent.removeListener(document,"click",c),d.libraryPicker.setVisible(!1))});if(null==d.libraryPicker||d.libraryPickerToken!=
+b){d.libraryPickerToken=b;var k=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
+z=(new google.picker.DocsUploadView).setIncludeFolders(!0);d.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(d.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(k).addView(m).addView(u).addView(google.picker.ViewId.RECENTLY_PICKED).addView(z);if(urlParams.gPickerSize){var C=urlParams.gPickerSize.split(",");d.libraryPicker=d.libraryPicker.setSize(C[0],C[1])}urlParams.topBaseUrl&&(d.libraryPicker=d.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
+d.libraryPicker=d.libraryPicker.setCallback(mxUtils.bind(this,function(A){A.action!=google.picker.Action.PICKED&&A.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);A.action==google.picker.Action.PICKED&&this.filePicked(A)})).build()}mxEvent.addListener(document,"click",c);d.libraryPicker.setVisible(!0)}catch(A){this.ui.spinner.stop(),this.ui.handleError(A)}}))};DriveClient.prototype.showPermissions=function(e){var c=mxUtils.bind(this,function(){var k=new ConfirmDialog(this.ui,
+mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+e)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(k.container,360,190,!0,!0);k.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var k=new gapi.drive.share.ShareClient(this.appId);k.setOAuthToken(b);k.setItemIds([e]);k.showSettingsDialog();"MutationObserver"in window&&(null!=
+this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var u=!1,z=0;z<m.length;z++)for(var C=0;C<m[z].addedNodes.length;C++){var A=m[z].addedNodes[C];"BUTTON"==A.nodeName&&"ok"==A.getAttribute("name")&&null!=A.parentNode&&null!=A.parentNode.parentNode&&"dialog"==A.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,A.click(),c(),u=!0):"DIV"==A.nodeName&&"shr-q-shr-r-shr-xb"==A.className&&
+(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var e=JSON.parse(this.getPersistentToken(!0))||{};delete e.current;delete e[this.userId];for(var c in e){e.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(e))};DriveClient.prototype.setPersistentToken=function(e,c){var k=
+JSON.parse(this.getPersistentToken(!0))||{};e.userId=this.userId;k.current=e;k[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(k),c)}})();DropboxFile=function(b,d,e){DrawioFile.call(this,b,d);this.stat=e};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(v){l.push({modifiedDate:v.client_modified,fileSize:v.size,getXml:mxUtils.bind(this,function(x,E){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:v.rev},x,E)}),getUrl:mxUtils.bind(this,function(x){return this.ui.getUrl(window.location.pathname+"?rev="+
-v.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=x?"&page="+x:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(v){e(v)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
-DropboxFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=v;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
-DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(x){var E=this.stat.path_display.lastIndexOf("/");E=1<E?this.stat.path_display.substring(1,E+1):null;this.ui.dropbox.saveFile(b,x,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=d;this.contentChanged();
-null!=f&&f()}),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c(d)}),E)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var v=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){m(this.ui.base64ToBlob(x,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,v.scale,v.border)}else m(this.getData())}catch(x){if(this.savingFile=!1,null!=c)c(x);else throw x;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
-e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+
-"/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),
-v=this.client.usersGetCurrentAccount();v.then(mxUtils.bind(this,function(x){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(x.account_id,x.email,x.name.display_name)),e())}));v["catch"](mxUtils.bind(this,function(x){window.clearTimeout(m);l&&(null==x||401!==x.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=
-function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+
-"&token="+e),null,"GET")).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
-(v?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(E,d){if(m){window.onDropboxCallback=null;m=!1;try{null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.client.setAccessToken(b),this.setUser(null),v&&this.setPersistentToken("remembered"),
-f())}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(v){var x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
-d=e();d.then(mxUtils.bind(this,function(g){window.clearTimeout(E);x&&null!=f&&f(g)}));d["catch"](mxUtils.bind(this,function(g){window.clearTimeout(E);x&&(null==g||500!=g.status&&400!=g.status&&401!=g.status?c({message:mxResources.get("error")+" "+g.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,v?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this,
-function(v){null==this.user?this.updateUser(function(){m(!0)},c,v):l(v)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m){var v=mxUtils.bind(this,function(){var x=e.split("/");this.ui.convertFile(e,0<x.length?
-x[x.length-1]:e,null,this.extension,f,c)});null!=b?v():this.authenticate(v,c)}else v={path:"/"+e},null!=urlParams.rev&&(v.rev=urlParams.rev),this.readFile(v,mxUtils.bind(this,function(x,E){var d=null;if(0<(m?x.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(x);null!=g&&0<g.length?x=g:d=new LocalFile(this,x,e,!0)}f(null!=d?d:l?new DropboxLibrary(this.ui,x,E):new DropboxFile(this.ui,x,E))}),c,m)};DropboxClient.prototype.readFile=function(e,f,c,l){var m=mxUtils.bind(this,function(x){var E=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(d);E&&null!=k&&409==k.status&&(E=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(e);g.then(mxUtils.bind(this,function(k){window.clearTimeout(d);if(E){E=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this,
-function(q){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(q){c(q)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(d);E&&(E=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){v(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
-v=mxUtils.bind(this,function(x){null==this.user?this.updateUser(function(){v(!0)},c,x):m(x)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})};
-DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=e&&null!=f){var m=e.stat.path_display.substring(1),v=m.lastIndexOf("/");0<v&&(f=m.substring(0,v+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(x,E,d){x?(x=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+
-f,autorename:!1})});this.executePromise(g,c,l)}),E&&d.path_lower.substring(1)!==f.toLowerCase()?(E=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(E,x,l)):x()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,m){m=null!=m?m:!1;this.checkExists(e,mxUtils.bind(this,function(v){v?this.saveFile(e,f,mxUtils.bind(this,
-function(x){m?c(new DropboxLibrary(this.ui,f,x)):c(new DropboxFile(this.ui,f,x))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var v=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],
-{type:"text/plain"})})});this.executePromise(v,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(v){this.ui.spinner.stop();this.ui.handleError(v)}),l=f[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
-function(v,x){if(null!=x&&x.id==f[0].id)try{this.ui.spinner.stop(),e(m.substring(1),new DropboxLibrary(this.ui,v,x))}catch(E){this.ui.handleError(E)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,
-function(m){try{this.ui.spinner.stop(),f(m.getHash().substring(1),m)}catch(v){c(v)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),
-e(c[0].link);else{var l=mxUtils.bind(this,function(d){this.ui.spinner.stop();this.ui.handleError(d)}),m=mxUtils.bind(this,function(d,g){this.ui.spinner.stop();e(d,g)}),v=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&v)m(c[0].link);else{var x=c[0].link.indexOf(this.appPath);if(0<x){var E=decodeURIComponent(c[0].link.substring(x+this.appPath.length-1));this.readFile({path:E},mxUtils.bind(this,function(d,g){if(null!=g&&g.id==c[0].id){var k=
-v?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,E,!0));e(E.substring(1),null!=n?n:new DropboxFile(this.ui,d,g))}else this.createFile(c[0],m,l)}),l,v)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(m){null!=
-m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){var v=l?m.lastIndexOf(","):-1;0<v&&(v=this.ui.extractGraphModelFromPng(m.substring(v+1)),null!=v&&0<v.length&&(m=v));this.insertFile(e.name,m,mxUtils.bind(this,function(x){f(e.name,x)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
-OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length-
-e.length-this.meta.name.length-(0<e.length?1:0));f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+f+"&parent="+
-e}}catch(l){}this.ui.editor.graph.openLink(b)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};
+DropboxFile.prototype.getRevisions=function(b,d){var e=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});e.then(mxUtils.bind(this,function(c){try{for(var k=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(u){k.push({modifiedDate:u.client_modified,fileSize:u.size,getXml:mxUtils.bind(this,function(z,C){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:u.rev},z,C)}),getUrl:mxUtils.bind(this,function(z){return this.ui.getUrl(window.location.pathname+"?rev="+
+u.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=z?"&page="+z:""))+window.location.hash})})})(c.entries[m]);b(k)}catch(u){d(u)}}));e["catch"](function(c){d(c)})};DropboxFile.prototype.getLatestVersion=function(b,d){this.ui.dropbox.getFile(this.getId(),b,d)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,d,e,c,k){this.doSave(this.getTitle(),b,d,e,c,k)};DropboxFile.prototype.saveAs=function(b,d,e){this.doSave(b,!1,d,e)};
+DropboxFile.prototype.doSave=function(b,d,e,c,k,m){var u=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=u;this.saveFile(b,d,e,c,k,m)}),c,k,m])};
+DropboxFile.prototype.saveFile=function(b,d,e,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(k){if(k)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(z){var C=this.stat.path_display.lastIndexOf("/");C=1<C?this.stat.path_display.substring(1,C+1):null;this.ui.dropbox.saveFile(b,z,mxUtils.bind(this,function(A){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=A;this.contentChanged();
+null!=e&&e()}),mxUtils.bind(this,function(A){this.savingFile=!1;null!=c&&c(A)}),C)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(z){m(this.ui.base64ToBlob(z,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,u.scale,u.border)}else m(this.getData())}catch(z){if(this.savingFile=!1,null!=c)c(z);else throw z;}else null!=c&&c()}),this.getTitle()==b?d(!0):this.ui.dropbox.checkExists(b,
+d)):null!=e&&e()};DropboxFile.prototype.rename=function(b,d,e){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=d&&d()):(this.stat=c,this.descriptorChanged(),this.save(!0,d,e))}),e)};DropboxLibrary=function(b,d,e){DropboxFile.call(this,b,d,e)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(d){DrawioClient.call(this,d,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+
+"/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(d,e,c){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout),
+u=this.client.usersGetCurrentAccount();u.then(mxUtils.bind(this,function(z){window.clearTimeout(m);k&&(this.setUser(new DrawioUser(z.account_id,z.email,z.name.display_name)),d())}));u["catch"](mxUtils.bind(this,function(z){window.clearTimeout(m);k&&(null==z||401!==z.status||c?e({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)))}))};DropboxClient.prototype.authenticate=
+function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};DropboxClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onDropboxCallback){var k=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+
+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?(b=JSON.parse(u.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==u.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
+(u?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(C,A){if(m){window.onDropboxCallback=null;m=!1;try{null==C?c({message:mxResources.get("accessDenied"),retry:k}):(null!=z&&z(),b=C.access_token,this.client.setAccessToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),
+e())}catch(B){c(B)}finally{null!=A&&A.close()}}else null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(d,e,c){var k=mxUtils.bind(this,function(u){var z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
+A=d();A.then(mxUtils.bind(this,function(B){window.clearTimeout(C);z&&null!=e&&e(B)}));A["catch"](mxUtils.bind(this,function(B){window.clearTimeout(C);z&&(null==B||500!=B.status&&400!=B.status&&401!=B.status?c({message:mxResources.get("error")+" "+B.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),m=mxUtils.bind(this,
+function(u){null==this.user?this.updateUser(function(){m(!0)},c,u):k(u)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!0)};DropboxClient.prototype.getFile=function(d,e,c,k){k=null!=k?k:!1;var m=/\.png$/i.test(d);if(/^https:\/\//i.test(d)||/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m){var u=mxUtils.bind(this,function(){var z=d.split("/");this.ui.convertFile(d,0<z.length?
+z[z.length-1]:d,null,this.extension,e,c)});null!=b?u():this.authenticate(u,c)}else u={path:"/"+d},null!=urlParams.rev&&(u.rev=urlParams.rev),this.readFile(u,mxUtils.bind(this,function(z,C){var A=null;if(0<(m?z.lastIndexOf(","):-1)){var B=this.ui.extractGraphModelFromPng(z);null!=B&&0<B.length?z=B:A=new LocalFile(this,z,d,!0)}e(null!=A?A:k?new DropboxLibrary(this.ui,z,C):new DropboxFile(this.ui,z,C))}),c,m)};DropboxClient.prototype.readFile=function(d,e,c,k){var m=mxUtils.bind(this,function(z){var C=
+!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),B=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});B.then(mxUtils.bind(this,function(J){}));B["catch"](function(J){window.clearTimeout(A);C&&null!=J&&409==J.status&&(C=!1,c({message:mxResources.get("fileNotFound")}))});B=this.client.filesDownload(d);B.then(mxUtils.bind(this,function(J){window.clearTimeout(A);if(C){C=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,
+function(g){e(f.result,J)});k?f.readAsDataURL(J.fileBlob):f.readAsText(J.fileBlob)}catch(g){c(g)}}}));B["catch"](mxUtils.bind(this,function(J){window.clearTimeout(A);C&&(C=!1,null==J||500!=J.status&&400!=J.status&&401!=J.status?c({message:mxResources.get("error")+" "+J.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
+u=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){u(!0)},c,z):m(z)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};DropboxClient.prototype.checkExists=function(d,e,c){var k=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+d.toLowerCase(),include_deleted:!1})});this.executePromise(k,mxUtils.bind(this,function(m){c?e(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[d]),function(){e(!0,!0,m)},function(){e(!1,!0,m)})}),function(m){e(!0,!1)})};
+DropboxClient.prototype.renameFile=function(d,e,c,k){if(/[\\\/:\?\*"\|]/.test(e))k({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=d&&null!=e){var m=d.stat.path_display.substring(1),u=m.lastIndexOf("/");0<u&&(e=m.substring(0,u+1)+e)}null!=d&&null!=e&&d.stat.path_lower.substring(1)!==e.toLowerCase()?this.checkExists(e,mxUtils.bind(this,function(z,C,A){z?(z=mxUtils.bind(this,function(B){B=mxUtils.bind(this,function(){return this.client.filesMove({from_path:d.stat.path_display,to_path:"/"+
+e,autorename:!1})});this.executePromise(B,c,k)}),C&&A.path_lower.substring(1)!==e.toLowerCase()?(C=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+e.toLowerCase()})}),this.executePromise(C,z,k)):z()):k()})):k({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(d,e,c,k){this.insertFile(d,e,c,k,!0)};DropboxClient.prototype.insertFile=function(d,e,c,k,m){m=null!=m?m:!1;this.checkExists(d,mxUtils.bind(this,function(u){u?this.saveFile(d,e,mxUtils.bind(this,
+function(z){m?c(new DropboxLibrary(this.ui,e,z)):c(new DropboxFile(this.ui,e,z))}),k):k()}))};DropboxClient.prototype.saveFile=function(d,e,c,k,m){if(/[\\\/:\?\*"\|]/.test(d))k({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=e.length)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 150 MB)"});else{m=null!=m?m:"";var u=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+d,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([e],
+{type:"text/plain"})})});this.executePromise(u,c,k)}};DropboxClient.prototype.pickLibrary=function(d){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(e){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(u){this.ui.spinner.stop();this.ui.handleError(u)}),k=e[0].link.indexOf(this.appPath);if(0<k){var m=decodeURIComponent(e[0].link.substring(k+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
+function(u,z){if(null!=z&&z.id==e[0].id)try{this.ui.spinner.stop(),d(m.substring(1),new DropboxLibrary(this.ui,u,z))}catch(C){this.ui.handleError(C)}else this.createLibrary(e[0],d,c)}),c)}else this.createLibrary(e[0],d,c)}})})};DropboxClient.prototype.createLibrary=function(d,e,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(k){this.insertFile(d.name,k,mxUtils.bind(this,
+function(m){try{this.ui.spinner.stop(),e(m.getHash().substring(1),m)}catch(u){c(u)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(d,e){null!=Dropbox.choose?(d=null!=d?d:mxUtils.bind(this,function(c,k){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):k.getHash(),null,k)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(e)this.ui.spinner.stop(),
+d(c[0].link);else{var k=mxUtils.bind(this,function(A){this.ui.spinner.stop();this.ui.handleError(A)}),m=mxUtils.bind(this,function(A,B){this.ui.spinner.stop();d(A,B)}),u=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&u)m(c[0].link);else{var z=c[0].link.indexOf(this.appPath);if(0<z){var C=decodeURIComponent(c[0].link.substring(z+this.appPath.length-1));this.readFile({path:C},mxUtils.bind(this,function(A,B){if(null!=B&&B.id==c[0].id){var J=
+u?A.lastIndexOf(","):-1;this.ui.spinner.stop();var f=null;0<J&&(J=this.ui.extractGraphModelFromPng(A),null!=J&&0<J.length?A=J:f=new LocalFile(this,A,C,!0));d(C.substring(1),null!=f?f:new DropboxFile(this.ui,A,B))}else this.createFile(c[0],m,k)}),k,u)}else this.createFile(c[0],m,k)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(d,e,c){var k=/(\.png)$/i.test(d.name);this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(m){null!=
+m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){var u=k?m.lastIndexOf(","):-1;0<u&&(u=this.ui.extractGraphModelFromPng(m.substring(u+1)),null!=u&&0<u.length&&(m=u));this.insertFile(d.name,m,mxUtils.bind(this,function(z){e(d.name,z)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,k)}})();OneDriveFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
+OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var d=this.meta.parentReference.path;d=d.substring(d.indexOf("/root:")+6);var e=this.meta.webUrl;b=e.substring(0,e.length-
+d.length-this.meta.name.length-(0<d.length?1:0));e=e.substring(e.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+e+"&parent="+e.substring(0,e.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");d=e=this.meta.webUrl;e=e.substring(8);e=e.substring(e.indexOf("/"));d=d.substring(0,d.lastIndexOf("/"));d=d.substring(d.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+e+"&parent="+
+d}}catch(k){}this.ui.editor.graph.openLink(b)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,d){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=d?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};
OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};
OneDriveFile.prototype.isSyncEnabled=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};
-OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?b(JSON.parse(f.getText())):null!=e&&e()}),e)};OneDriveFile.prototype.getLatestVersion=function(b,e){this.ui.oneDrive.getFile(this.getId(),b,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};
-OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
-OneDriveFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=v;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
-OneDriveFile.prototype.saveFile=function(b,e,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var v=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var x=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),E=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,g){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=d;this.fileSaved(g,E,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();v()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),x)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});v()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(x){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(x)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
-OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
-OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents",
-"/_layouts/15/onedrive.aspx"):e.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
+OneDriveFile.prototype.loadDescriptor=function(b,d){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?b(JSON.parse(e.getText())):null!=d&&d()}),d)};OneDriveFile.prototype.getLatestVersion=function(b,d){this.ui.oneDrive.getFile(this.getId(),b,d)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};
+OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,d){b.eTag=d};OneDriveFile.prototype.loadPatchDescriptor=function(b,d){var e=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(e+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):d(this.ui.oneDrive.parseRequestText(c))}),d)};
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,d,e,c,k){this.doSave(this.getTitle(),b,d,e,c,k)};OneDriveFile.prototype.saveAs=function(b,d,e){this.doSave(b,!1,d,e)};
+OneDriveFile.prototype.doSave=function(b,d,e,c,k,m){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,d,e,c,k,m)}),c,k,m])};
+OneDriveFile.prototype.saveFile=function(b,d,e,c,k,m){if(!this.isEditable())null!=e&&e();else if(!this.savingFile)if(this.getTitle()==b){var u=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var z=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),C=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(A,B){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=A;this.fileSaved(B,C,mxUtils.bind(this,function(){this.contentChanged();null!=e&&e()}),c)}),mxUtils.bind(this,function(A,B){try{this.savingFile=!1,this.isConflict(B)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();u()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(A)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}}),z)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}});u()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(z){this.setModified(this.getShadowModified());this.savingFile=!1;null!=e&&e();this.ui.fileLoaded(z)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.rename=function(b,d,e){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,e))}),e)};
+OneDriveFile.prototype.move=function(b,d,e){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=d&&d(c)}),e)};OneDriveLibrary=function(b,d,e){OneDriveFile.call(this,b,d,e)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,d,e){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),e)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(d,e,c,k){null==e&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(e=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==k&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(k=!0);DrawioClient.call(this,d,e?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=e;this.inlinePicker=c;this.noLogout=k;d=JSON.parse(this.token);null!=d&&(this.endpointHint=null!=d.endpointHint?d.endpointHint.replace("/Documents",
+"/_layouts/15/onedrive.aspx"):d.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;
-OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;
-return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,m){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(v){window.clearTimeout(m);l&&(200>v.getStatus()||300<=v.getStatus()?c?f({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):(v=JSON.parse(v.getText()),this.setUser(new DrawioUser(v.id,v.mail,v.displayName)),e()))}),mxUtils.bind(this,function(v){window.clearTimeout(m);l&&f(v)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
-function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!=
-f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,m){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var v=
-!0,x=JSON.parse(this.getPersistentToken(!0));null!=x?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()?this.updateAuthInfo(JSON.parse(E.getText()),x.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=E.getStatus()&&400!=E.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
-!0,mxUtils.bind(this,function(E,d){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(E?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
-Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(v){window.onOneDriveCallback=null;v=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),this.updateAuthInfo(k,E,!0,f,c))}catch(q){c(q)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){v&&(window.onOneDriveCallback=null,v=!1,c({message:mxResources.get("accessDenied"),
-retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
-this.setPersistentToken(JSON.stringify(m),!m.remember));e();return}}catch(v){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var l=mxUtils.bind(this,function(m){var v=!0,x=window.setTimeout(mxUtils.bind(this,function(){v=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(E){window.clearTimeout(x);v&&(200<=E.getStatus()&&299>=E.getStatus()||404==E.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(E)):m||401!==E.getStatus()&&400!==E.getStatus()?c(this.parseRequestText(E)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(E){window.clearTimeout(x);v&&c(E)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):
-e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var x=JSON.parse(v.getText()),E=/\.png$/i.test(x.name);if(/\.v(dx|sdx?)$/i.test(x.name)||/\.gliffy$/i.test(x.name)||/\.pdf$/i.test(x.name)||!this.ui.useCanvasForExport&&E)this.ui.convertFile(x["@microsoft.graph.downloadUrl"],x.name,null!=x.file?x.file.mimeType:null,this.extension,f,c);
-else{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(x["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),d){/\.html$/i.test(x.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(E?k.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(k);null!=q&&0<q.length?k=q:n=new LocalFile(this.ui,k,x.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p=
-k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,x["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(y){try{4==y.readyState&&(200<=y.status&&299>=y.status?f(new LocalFile(this.ui,y.responseText,x.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),x.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui,
-k,x)):f(new OneDriveFile(this.ui,k,x))}}catch(y){if(null!=c)c(y);else throw y;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&c(this.parseRequestText(k))}),E||null!=x.file&&null!=x.file.mimeType&&("image/"==x.file.mimeType.substring(0,6)&&"image/svg"!=x.file.mimeType.substring(0,9)||"application/pdf"==x.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
-function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var m=this.getItemRef(e);f.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive",
-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,m){this.insertFile(e,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(e,f,c,l,m,v){this.isValidFilename(e)?(m=null!=m?m:!1,this.checkExists(v,e,!0,mxUtils.bind(this,function(x){if(x){x="/me/drive/root";null!=v&&(x=this.getItemURL(v,!0));var E=mxUtils.bind(this,function(d){m?
-c(new OneDriveLibrary(this.ui,f,d)):c(new OneDriveFile(this.ui,f,d))});x=this.baseUrl+x+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(x,"","PUT",null,mxUtils.bind(this,function(d){this.writeLargeFile(this.getItemURL(d.id),f,E,l)}),l):this.writeFile(x,f,"PUT",null,E,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
-c,l){var m="/me/drive/root";null!=e&&(m=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(v){404==v.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(v){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
-f,c,l){try{var m=e.getData(),v=mxUtils.bind(this,function(E){var d=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(g,E,d,c,l):this.writeFile(g+"/content/",E,"PUT",null,d,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var x=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){v(this.ui.base64ToBlob(E,"image/png"))}),c,this.ui.getCurrentFile()!=e?m:null,x.scale,x.border)}else v(m)}catch(E){c(E)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,m){try{if(null!=f){var v=mxUtils.bind(this,function(E,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var q=f.substr(d,4194304),p=new mxXmlRequest(E,q,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(y,A){y.setRequestHeader("Content-Length",q.length);y.setRequestHeader("Content-Range","bytes "+d+"-"+(d+q.length-1)+"/"+f.length)});p.send(mxUtils.bind(this,
-function(y){window.clearTimeout(n);if(k){var A=y.getStatus();200<=A&&299>=A?(A=d+q.length,A==f.length?c(JSON.parse(y.getText())):v(E,A,g)):500<=A&&599>=A&&2>g?(g++,v(E,d,g)):l(this.parseRequestText(y),y)}}),mxUtils.bind(this,function(y){window.clearTimeout(n);k&&l(this.parseRequestText(y))}))}catch(y){l(y)}}),x=mxUtils.bind(this,function(E){try{var d=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(e+
-"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,q){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);d&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),v(n.uploadUrl,0)):E||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){x(!0)},l,E))}),mxUtils.bind(this,function(n){window.clearTimeout(g);
-d&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){x(!0)},l):x(!1)}else l({message:mxResources.get("unknownError")})}catch(E){l(E)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,m,v,x){try{if(null!=e&&null!=f){var E=mxUtils.bind(this,function(d){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;v({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var n=new mxXmlRequest(e,f,c);n.setRequestHeaders=
-mxUtils.bind(this,function(q,p){q.setRequestHeader("Content-Type",l||" ");q.setRequestHeader("Authorization","Bearer "+b);null!=x&&q.setRequestHeader("If-Match",x)});n.send(mxUtils.bind(this,function(q){window.clearTimeout(k);g&&(200<=q.getStatus()&&299>=q.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(q.getText()))):d||401!==q.getStatus()?v(this.parseRequestText(q),q):this.authenticate(function(){E(!0)},v,d))}),mxUtils.bind(this,function(q){window.clearTimeout(k);
-g&&v(this.parseRequestText(q))}))}catch(q){v(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},v):E(!1)}else v({message:mxResources.get("unknownError")})}catch(d){v(d)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
-OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var v=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var x=l.getSelectedItem();if(null!=x)if(f&&"object"==typeof x.folder)e({value:[x]});else{if(!x.folder){var E=OneDriveFile.prototype.getIdOf(x);this.executeRequest(this.getItemURL(E),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(d=JSON.parse(d.getText()),
-e(E,{value:[d]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(v.container,550,500,!0,!0);m.style.width=v.container.parentNode.style.width;m.style.height=parseInt(v.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(x,E,d,g){this.executeRequest(g?x:this.baseUrl+x,function(k){E(JSON.parse(k.getText()))},d)}),mxUtils.bind(this,function(x,E,d,g){this.executeRequest(this.baseUrl+
-"/drives/"+E+"/items/"+x,function(k){d(JSON.parse(k.getText()))},g)}),null,null,function(x){f?e({value:[x]}):e(OneDriveFile.prototype.getIdOf(x))},mxUtils.bind(this,function(x){this.ui.showError(mxResources.get("error"),x)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var v=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,
-function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(x){e(x);mxClient.IS_IE11&&(b=x.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?v():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",
-name:"root",parentReference:{driveId:"me"}}]})}),v,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(f)};OneDriveClient.prototype.pickFile=function(e,f){e=null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
-m&&m.message?m.message:m)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):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,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),e(OneDriveFile.prototype.getIdOf(m.value[0]),
-m))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");
-null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
+OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(d){if(null==d||""===d)return!1;for(var e=0;e<this.invalidFilenameRegExs.length;e++)if(this.invalidFilenameRegExs[e].test(d))return!1;
+return!0};OneDriveClient.prototype.get=function(d,e,c){d=new mxXmlRequest(d,null,"GET");d.setRequestHeaders=mxUtils.bind(this,function(k,m){k.setRequestHeader("Authorization","Bearer "+b)});d.send(e,c);return d};OneDriveClient.prototype.updateUser=function(d,e,c){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(u){window.clearTimeout(m);k&&(200>u.getStatus()||300<=u.getStatus()?c?e({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)):(u=JSON.parse(u.getText()),this.setUser(new DrawioUser(u.id,u.mail,u.displayName)),d()))}),mxUtils.bind(this,function(u){window.clearTimeout(m);k&&e(u)}))};OneDriveClient.prototype.resetTokenRefresh=function(d){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<d&&(this.tokenRefreshInterval=1E3*d,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*d))};OneDriveClient.prototype.authenticate=function(d,e,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(k){this.updateAuthInfo(k,!0,null==this.endpointHint,d,e)}),e,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(k){200<=k.getStatus()&&299>=k.getStatus()?this.authenticateStep2(k.getText(),d,e,c):null!=
+e&&e(k)}),e)};OneDriveClient.prototype.updateAuthInfo=function(d,e,c,k,m){c&&this.setUser(null);b=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=e;this.setPersistentToken(JSON.stringify(d),!e);this.resetTokenRefresh(d.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){k()}),m):k()};OneDriveClient.prototype.authenticateStep2=function(d,e,c,k){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var u=
+!0,z=JSON.parse(this.getPersistentToken(!0));null!=z?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.updateAuthInfo(JSON.parse(C.getText()),z.remember,!1,e,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=C.getStatus()&&400!=C.getStatus()||k?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
+!0,mxUtils.bind(this,function(C,A){var B="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+(C?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d);B=window.open(B,"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!=B&&(window.onOneDriveCallback=mxUtils.bind(this,function(J,f){if(u){window.onOneDriveCallback=null;u=!1;try{null==J?c({message:mxResources.get("accessDenied"),retry:m}):(null!=A&&A(),this.updateAuthInfo(J,C,!0,e,c))}catch(g){c(g)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),B.focus())}),mxUtils.bind(this,function(){u&&(window.onOneDriveCallback=null,u=!1,c({message:mxResources.get("accessDenied"),
+retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(d,e){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var k=JSON.parse(c.getText());0<k.webUrl.indexOf(".sharepoint.com")?this.endpointHint=k.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
+this.setPersistentToken(JSON.stringify(m),!m.remember));d();return}}catch(u){}e({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),e)};OneDriveClient.prototype.executeRequest=function(d,e,c){var k=mxUtils.bind(this,function(m){var u=!0,z=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(C){window.clearTimeout(z);u&&(200<=C.getStatus()&&299>=C.getStatus()||404==C.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),e(C)):m||401!==C.getStatus()&&400!==C.getStatus()?c(this.parseRequestText(C)):this.authenticate(function(){k(!0)},c,m))}),mxUtils.bind(this,function(C){window.clearTimeout(z);u&&c(C)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){k(!0)},c):k(!1)};OneDriveClient.prototype.checkToken=function(d,e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,null!=e?e:this.emptyFn):
+d()};OneDriveClient.prototype.getItemRef=function(d){var e=d.split("/");return 1<e.length?{driveId:e[0],id:e[1]}:{id:d}};OneDriveClient.prototype.getItemURL=function(d,e){var c=d.split("/");return 1<c.length?(d=c[1],(e?"":this.baseUrl)+"/drives/"+c[0]+("root"==d?"/root":"/items/"+d)):(e?"":this.baseUrl)+"/me/drive/items/"+d};OneDriveClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(d){var e=d.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
+0<e&&(d=d.substring(0,e));return d};OneDriveClient.prototype.getFile=function(d,e,c,k,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(d),mxUtils.bind(this,function(u){if(200<=u.getStatus()&&299>=u.getStatus()){var z=JSON.parse(u.getText()),C=/\.png$/i.test(z.name);if(/\.v(dx|sdx?)$/i.test(z.name)||/\.gliffy$/i.test(z.name)||/\.pdf$/i.test(z.name)||!this.ui.useCanvasForExport&&C)this.ui.convertFile(z["@microsoft.graph.downloadUrl"],z.name,null!=z.file?z.file.mimeType:null,this.extension,e,c);
+else{var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(z["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(J){try{if(window.clearTimeout(B),A){/\.html$/i.test(z.name)&&(J=this.removeExtraHtmlContent(J));var f=null;if(0<(C?J.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(J);null!=g&&0<g.length?J=g:f=new LocalFile(this.ui,J,z.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)){var l=
+J.substring(22);J=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,z["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(J,mxUtils.bind(this,function(q){try{4==q.readyState&&(200<=q.status&&299>=q.status?e(new LocalFile(this.ui,q.responseText,z.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),z.name):null!=f?e(f):m?e(new OneDriveLibrary(this.ui,
+J,z)):e(new OneDriveFile(this.ui,J,z))}}catch(q){if(null!=c)c(q);else throw q;}}),mxUtils.bind(this,function(J){window.clearTimeout(B);A&&c(this.parseRequestText(J))}),C||null!=z.file&&null!=z.file.mimeType&&("image/"==z.file.mimeType.substring(0,6)&&"image/svg"!=z.file.mimeType.substring(0,9)||"application/pdf"==z.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(u))}),c)};OneDriveClient.prototype.renameFile=
+function(d,e,c,k){null!=d&&null!=e&&(this.isValidFilename(e)?this.checkExists(d.getParentId(),e,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(d.getId()),JSON.stringify({name:e}),"PATCH","application/json",c,k):k()})):k({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(d,e,c,k){e=this.getItemRef(e);var m=this.getItemRef(d);e.driveId!=m.driveId?k({message:mxResources.get("cannotMoveOneDrive",
+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(d),JSON.stringify({parentReference:e}),"PATCH","application/json",c,k)};OneDriveClient.prototype.insertLibrary=function(d,e,c,k,m){this.insertFile(d,e,c,k,!0,m)};OneDriveClient.prototype.insertFile=function(d,e,c,k,m,u){this.isValidFilename(d)?(m=null!=m?m:!1,this.checkExists(u,d,!0,mxUtils.bind(this,function(z){if(z){z="/me/drive/root";null!=u&&(z=this.getItemURL(u,!0));var C=mxUtils.bind(this,function(A){m?
+c(new OneDriveLibrary(this.ui,e,A)):c(new OneDriveFile(this.ui,e,A))});z=this.baseUrl+z+"/children/"+encodeURIComponent(d)+"/content";4E6<=e.length?this.writeFile(z,"","PUT",null,mxUtils.bind(this,function(A){this.writeLargeFile(this.getItemURL(A.id),e,C,k)}),k):this.writeFile(z,e,"PUT",null,C,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(d,e,
+c,k){var m="/me/drive/root";null!=d&&(m=this.getItemURL(d,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(e),mxUtils.bind(this,function(u){404==u.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[e]),function(){k(!0)},function(){k(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(u){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(d,
+e,c,k){try{var m=d.getData(),u=mxUtils.bind(this,function(C){var A=mxUtils.bind(this,function(J){e(J,m)}),B=this.getItemURL(d.getId());4E6<=C.length?this.writeLargeFile(B,C,A,c,k):this.writeFile(B+"/content/",C,"PUT",null,A,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d.meta.name)){var z=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){u(this.ui.base64ToBlob(C,"image/png"))}),c,this.ui.getCurrentFile()!=d?m:null,z.scale,z.border)}else u(m)}catch(C){c(C)}};
+OneDriveClient.prototype.writeLargeFile=function(d,e,c,k,m){try{if(null!=e){var u=mxUtils.bind(this,function(C,A,B){try{B=B||0;var J=!0,f=null;f=window.setTimeout(mxUtils.bind(this,function(){J=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var g=e.substr(A,4194304),l=new mxXmlRequest(C,g,"PUT");l.setRequestHeaders=mxUtils.bind(this,function(q,t){q.setRequestHeader("Content-Length",g.length);q.setRequestHeader("Content-Range","bytes "+A+"-"+(A+g.length-1)+"/"+e.length)});l.send(mxUtils.bind(this,
+function(q){window.clearTimeout(f);if(J){var t=q.getStatus();200<=t&&299>=t?(t=A+g.length,t==e.length?c(JSON.parse(q.getText())):u(C,t,B)):500<=t&&599>=t&&2>B?(B++,u(C,A,B)):k(this.parseRequestText(q),q)}}),mxUtils.bind(this,function(q){window.clearTimeout(f);J&&k(this.parseRequestText(q))}))}catch(q){k(q)}}),z=mxUtils.bind(this,function(C){try{var A=!0,B=null;try{B=window.setTimeout(mxUtils.bind(this,function(){A=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(f){}var J=new mxXmlRequest(d+
+"/createUploadSession","{}","POST");J.setRequestHeaders=mxUtils.bind(this,function(f,g){f.setRequestHeader("Content-Type","application/json");f.setRequestHeader("Authorization","Bearer "+b);null!=m&&f.setRequestHeader("If-Match",m)});J.send(mxUtils.bind(this,function(f){window.clearTimeout(B);A&&(200<=f.getStatus()&&299>=f.getStatus()?(f=JSON.parse(f.getText()),u(f.uploadUrl,0)):C||401!==f.getStatus()?k(this.parseRequestText(f),f):this.authenticate(function(){z(!0)},k,C))}),mxUtils.bind(this,function(f){window.clearTimeout(B);
+A&&k(this.parseRequestText(f))}))}catch(f){k(f)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){z(!0)},k):z(!1)}else k({message:mxResources.get("unknownError")})}catch(C){k(C)}};OneDriveClient.prototype.writeFile=function(d,e,c,k,m,u,z){try{if(null!=d&&null!=e){var C=mxUtils.bind(this,function(A){try{var B=!0,J=null;try{J=window.setTimeout(mxUtils.bind(this,function(){B=!1;u({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var f=new mxXmlRequest(d,e,c);f.setRequestHeaders=
+mxUtils.bind(this,function(g,l){g.setRequestHeader("Content-Type",k||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=z&&g.setRequestHeader("If-Match",z)});f.send(mxUtils.bind(this,function(g){window.clearTimeout(J);B&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(g.getText()))):A||401!==g.getStatus()?u(this.parseRequestText(g),g):this.authenticate(function(){C(!0)},u,A))}),mxUtils.bind(this,function(g){window.clearTimeout(J);
+B&&u(this.parseRequestText(g))}))}catch(g){u(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},u):C(!1)}else u({message:mxResources.get("unknownError")})}catch(A){u(A)}};OneDriveClient.prototype.parseRequestText=function(d){var e={message:mxResources.get("unknownError")};try{e=JSON.parse(d.getText()),e.status=d.getStatus(),e.error&&(e.error.status=e.status,e.error.code=e.status)}catch(c){}return e};OneDriveClient.prototype.pickLibrary=function(d){this.pickFile(function(e){d(e)})};
+OneDriveClient.prototype.createInlinePicker=function(d,e,c){return mxUtils.bind(this,function(){var k=null,m=document.createElement("div");m.style.position="relative";var u=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var z=k.getSelectedItem();if(null!=z)if(e&&"object"==typeof z.folder)d({value:[z]});else{if(!z.folder){var C=OneDriveFile.prototype.getIdOf(z);this.executeRequest(this.getItemURL(C),mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&(A=JSON.parse(A.getText()),
+d(C,{value:[A]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(e?"save":"open"),null,null,null,null,!0);this.ui.showDialog(u.container,550,500,!0,!0);m.style.width=u.container.parentNode.style.width;m.style.height=parseInt(u.container.parentNode.style.height)-60+"px";k=new mxODPicker(m,null,mxUtils.bind(this,function(z,C,A,B){this.executeRequest(B?z:this.baseUrl+z,function(J){C(JSON.parse(J.getText()))},A)}),mxUtils.bind(this,function(z,C,A,B){this.executeRequest(this.baseUrl+
+"/drives/"+C+"/items/"+z,function(J){A(JSON.parse(J.getText()))},B)}),null,null,function(z){e?d({value:[z]}):d(OneDriveFile.prototype.getIdOf(z))},mxUtils.bind(this,function(z){this.ui.showError(mxResources.get("error"),z)}),e,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(d,e){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),k=mxUtils.bind(this,function(m){var u=this.inlinePicker?this.createInlinePicker(d,!0):mxUtils.bind(this,
+function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(z){d(z);mxClient.IS_IE11&&(b=z.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?u():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){d({value:[{id:"root",
+name:"root",parentReference:{driveId:"me"}}]})}),u,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){k(!1)}),c):k(e)};OneDriveClient.prototype.pickFile=function(d,e){d=null!=d?d:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
+m&&m.message?m.message:m)}),k=this.inlinePicker?this.createInlinePicker(d,null,e):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),d(OneDriveFile.prototype.getIdOf(m.value[0]),
+m))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?k():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();k()}))).container,300,140,!0,!0)}),c):k()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var d=localStorage.getItem("odpickerv7cache");
+null!=d&&'{"odsdkLoginHint":{'==d.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
-GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
-GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};
-GitHubFile.prototype.save=function(b,e,f,c,l,m){this.doSave(this.getTitle(),e,f,c,l,m)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=v;this.saveFile(b,!1,e,f,c,l,m)}),f,c,l])};
-GitHubFile.prototype.saveFile=function(b,e,f,c,l,m,v){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var x=mxUtils.bind(this,function(E){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var d=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,k);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged();
-null!=f&&f()}),c)}),mxUtils.bind(this,function(k){this.savingFile=!1;this.isConflict(k)?(this.inConflictState=!0,null!=c&&c({commitMessage:E})):null!=c&&c(k)}),m,E)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(k){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-f&&f();this.ui.fileLoaded(n)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k,E)}))});null!=v?x(v):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(E){x(E)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
-GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),v=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),x=this.authToken+" "+b;v.setRequestHeaders=function(E,d){E.setRequestHeader("Authorization",x)};v.send(mxUtils.bind(this,function(){window.clearTimeout(m);
-l&&(401===v.getStatus()?c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>v.getStatus()||300<=v.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(v.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",
-null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(v){200<=
-v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=
-mxUtils.bind(this,function(E,d){m?(window.onGitHubCallback=null,m=!1,null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
-function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
-"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,m){var v=mxUtils.bind(this,function(E){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:x})}),this.ui.timeout),k=this.authToken+" "+b;e.setRequestHeaders=function(n,q){n.setRequestHeader("Authorization",k)};e.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n=
-mxUtils.bind(this,function(){var y=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){y();x()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(d)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())E?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var q=
-!1;try{var p=JSON.parse(e.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(q="too_large"==p.errors[0].code),c({message:mxResources.get(q?"drawingTooLarge":"forbidden")}))}catch(y){c({message:mxResources.get(q?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?m?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):n():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
-message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);d&&c(n)}))}),x=mxUtils.bind(this,function(E){null==this.user?this.updateUser(function(){x(!0)},c,E):v(E)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,m,v,x){var E="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+
-f+"/contents/"+c+"?ref="+l+E,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(d){try{m(d.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){v(g)}}),v,null,x)};GitHubClient.prototype.getFile=function(e,f,c,l,m){l=null!=l?l:!1;var v=e.split("/"),x=v[0],E=v[1],d=v[2];e=v.slice(3,v.length).join("/");v=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&v))if(null!=b){m=this.baseUrl+"/repos/"+x+"/"+E+"/contents/"+
-e+"?ref="+d;var g={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(m,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+x+"/"+E+"/contents/"+e+"?ref="+d+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(x,E,d,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
-c,l,m){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return m?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
-f,c,l,m){this.insertFile(e,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,m,v,x){m=null!=m?m:!1;v=v.split("/");var E=v[0],d=v[1],g=v[2],k=v.slice(3,v.length).join("/");0<k.length&&(k+="/");k+=e;this.checkExists(E+"/"+d+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,q){n?m?(x||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(p){this.writeFile(E,d,g,k,p,f,q,mxUtils.bind(this,function(y){try{var A=JSON.parse(y.getText());c(this.createGitHubFile(E,d,g,A.content,
-m))}catch(C){l(C)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:E,repo:d,ref:g,name:e,path:k,sha:q,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,l){var m=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){m();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
-function(e,f,c,l,m,v,x,E,d){v.length>=this.maxFileSize?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:v},null!=x&&(c.sha=x),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(g){E(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
-g.code=null);d(g)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),m=l[0],v=l[1],x=l[2];e=l.slice(3,l.length).join("/");this.getSha(m,v,e,x,mxUtils.bind(this,function(E){if(f){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){d();c(!0,E)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(E){c(!0)}),
-!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,m){var v=e.meta.org,x=e.meta.repo,E=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(v,x,E,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.sha,
-q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(v,x,d,E,mxUtils.bind(this,function(n){e.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
-function(e,f){var c=null,l=null,m=null,v=null,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(e?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(E);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";
-d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";x.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,x,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+v)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){I()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,G,S,u){var z=document.createElement("a");z.setAttribute("title",M);z.style.cursor="pointer";mxUtils.write(z,M);mxEvent.addListener(z,"click",G);
-u&&(z.style.textDecoration="underline");null!=S&&(M=g.cloneNode(),M.style.padding=S,M.appendChild(z),z=M);return z}),q=mxUtils.bind(this,function(M){var G=document.createElement("div");G.style.marginBottom="8px";G.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){v=null;I()}),null,!0));M||(mxUtils.write(G," / "),G.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){v=null;B()}),null,!0)));if(null!=v&&0<v.length){var S=v.split("/");for(M=0;M<S.length;M++)(function(u){mxUtils.write(G,
-" / ");G.appendChild(n(S[u],mxUtils.bind(this,function(){v=S.slice(0,u+1).join("/");C()}),null,!0))})(M)}d.appendChild(G)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=m=l=c=null,I()):this.ui.hideDialog()}),null,{})}),y=null,A=null,C=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+v+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
-M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==M&&(q(),
-d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,I();else{var K=v.split("/");v=K.slice(0,K.length-1).join("/");C()}}),"4px")));var z=JSON.parse(u.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=!0,J=0;u=mxUtils.bind(this,function(K){for(var H=0;H<z.length;H++)mxUtils.bind(this,function(N,U){if(K==("dir"==N.type)){U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var Q=document.createElement("img");
-Q.src=IMAGE_PATH+"/"+("dir"==N.type?"folder.png":"file.png");Q.setAttribute("align","absmiddle");Q.style.marginRight="4px";Q.style.marginTop="-4px";Q.width=20;U.appendChild(Q);U.appendChild(n(N.name+("dir"==N.type?"/":""),mxUtils.bind(this,function(){"dir"==N.type?(v=N.path,C()):e&&"file"==N.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+N.path))})));d.appendChild(U);J++}})(z[H],H)});u(!0);e&&u(!1)}}),p,!0)}),B=mxUtils.bind(this,function(M,G){null==M&&(d.innerText="",M=1);var S=
-new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(y,"click",
-u);this.executeRequest(S,mxUtils.bind(this,function(z){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){v=null;I()}),"4px")));z=JSON.parse(z.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==z.length&&G)m=z[0].name,v="",C();else{for(var F=0;F<z.length;F++)mxUtils.bind(this,function(J,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(J.name,mxUtils.bind(this,
-function(){m=J.name;v="";C()})));d.appendChild(H)})(z[F],F);100==z.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",A))}}),p)}),I=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&mxEvent.removeListener(d,"scroll",A);null!=y&&null!=
-y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();u=JSON.parse(u.getText());if(null==u||0==u.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var F=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var H=K[1];3>K.length?(c=J,l=H,v=m=null,B()):this.ui.spinner.spin(d,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+"/"+H+"/"+K,mxUtils.bind(this,function(N){this.ui.spinner.stop();c=N.meta.org;l=N.meta.repo;m=decodeURIComponent(N.meta.ref);v="";C()}),mxUtils.bind(this,function(N){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(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(d),mxUtils.br(d));for(var z=0;z<u.length;z++)mxUtils.bind(this,function(F,J){var K=g.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(n(F.full_name,mxUtils.bind(this,function(){c=F.owner.login;
-l=F.name;v="";B(null,!0)})));d.appendChild(K)})(u[z],z)}100==u.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&S()},mxEvent.addListener(d,"scroll",A))}),p)});I()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
-TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
-TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
-function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
-TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)};
-TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var v=b.split(this.SEPARATOR),x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(v[0]+"/attachments/"+v[1],mxUtils.bind(this,function(d){window.clearTimeout(E);if(x){var g=/\.png$/i.test(d.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(d.name)||
-/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,e,f,null,k):(x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(n){window.clearTimeout(E);if(x){d.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(n);null!=q&&0<q.length&&
-(n=q)}l?e(new TrelloLibrary(this.ui,n,d)):e(new TrelloFile(this.ui,n,d))}}),mxUtils.bind(this,function(n,q){window.clearTimeout(E);x&&(401==q.status?this.authenticate(m,f,!0):f())}),g||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(d){window.clearTimeout(E);x&&(null!=d&&401==d.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};
-TrelloClient.prototype.insertFile=function(b,e,f,c,l,m){l=null!=l?l:!1;var v=mxUtils.bind(this,function(){var x=mxUtils.bind(this,function(E){this.writeFile(b,E,m,mxUtils.bind(this,function(d){l?f(new TrelloLibrary(this.ui,e,d)):f(new TrelloFile(this.ui,e,d))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){x(this.ui.base64ToBlob(E,"image/png"))}),c,e):x(e)});this.authenticate(v,c)};
-TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(v){this.writeFile(b.meta.name,v,c[0],function(x){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(x)}),mxUtils.bind(this,function(E){null!=E&&401==E.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(v){l(this.ui.base64ToBlob(v,
-"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,f)};
-TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var v=!0,x=window.setTimeout(mxUtils.bind(this,function(){v=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),E=new FormData;E.append("key",Trello.key());E.append("token",Trello.token());E.append("file","string"===typeof e?new Blob([e]):e,b);E.append("name",
-b);var d=new XMLHttpRequest;d.responseType="json";d.onreadystatechange=mxUtils.bind(this,function(){if(4===d.readyState&&(window.clearTimeout(x),v))if(200==d.status){var g=d.response;g.compoundId=f+this.SEPARATOR+g.id;c(g)}else 401==d.status?this.authenticate(m,l,!0):l()});d.open("POST",this.baseUrl+"cards/"+f+"/attachments");d.send(E)});this.authenticate(m,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
-TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(v);var x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="auto";x.style.height=
-"194px";m.appendChild(x);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var E=mxUtils.bind(this,function(p,y,A){l++;var C=document.createElement("div");C.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=A){var I=document.createElement("img");
-I.src=A.url;I.width=A.width;I.height=A.height;I.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(I)}mxUtils.write(B,p);mxEvent.addListener(B,"click",y);C.appendChild(B);return C}),d=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;x.innerText="";this.ui.spinner.spin(x,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(y){this.ui.spinner.stop();x.appendChild(E("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(x);null==y||0==y.length?mxUtils.write(x,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<y.length;A++)mxUtils.bind(this,function(C){x.appendChild(E(C.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+C.id)}),null!=C.previews?C.previews[0]:null))})(y[A])})()}),mxUtils.bind(this,function(y){401==
-y.status?this.authenticate(p,d,!0):null!=d&&d(y)}))});p()}),k=null,n=null,q=mxUtils.bind(this,function(p){null==p&&(l=0,x.innerText="",p=1);this.ui.spinner.spin(x,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var y=mxUtils.bind(this,function(){mxEvent.removeListener(x,"scroll",n);q(p+1)});mxEvent.addListener(k,"click",y);var A=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(C){this.ui.spinner.stop();C=null!=C?C.cards:null;if(null==C||0==C.length)mxUtils.write(x,mxResources.get("noFiles"));else{1==p&&(x.appendChild(E(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var I=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(M){null!=M&&(c=M,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(I.container,300,80,!0,!1);I.init()}))),mxUtils.br(x));for(var B=0;B<C.length;B++)mxUtils.bind(this,function(I){x.appendChild(E(I.name,mxUtils.bind(this,function(){b?(f=I.id,g()):(this.ui.hideDialog(),e(I.id))})))})(C[B]);100==C.length&&(x.appendChild(k),n=function(){x.scrollTop>=x.scrollHeight-x.offsetHeight&&y()},mxEvent.addListener(x,"scroll",n))}}),mxUtils.bind(this,function(C){401==C.status?this.authenticate(A,d,!0):null!=d&&d({message:C.responseText})}))});A()});q()};
-TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
+GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(d){b(200<=d.getStatus()&&299>=d.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
+GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,d){this.peer.getFile(this.getId(),b,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,d){b.sha=d};
+GitHubFile.prototype.save=function(b,d,e,c,k,m){this.doSave(this.getTitle(),d,e,c,k,m)};GitHubFile.prototype.saveAs=function(b,d,e){this.doSave(b,d,e)};GitHubFile.prototype.doSave=function(b,d,e,c,k,m){var u=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=u;this.saveFile(b,!1,d,e,c,k,m)}),e,c,k])};
+GitHubFile.prototype.saveFile=function(b,d,e,c,k,m,u){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var z=mxUtils.bind(this,function(C){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var A=this.getCurrentEtag(),B=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(J){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,J);this.fileSaved(B,A,mxUtils.bind(this,function(){this.contentChanged();
+null!=e&&e()}),c)}),mxUtils.bind(this,function(J){this.savingFile=!1;this.isConflict(J)?(this.inConflictState=!0,null!=c&&c({commitMessage:C})):null!=c&&c(J)}),m,C)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(J){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(f){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+e&&e();this.ui.fileLoaded(f)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,J,C)}))});null!=u?z(u):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(C){z(C)}),c)}else null!=e&&e()};GitHubLibrary=function(b,d,e){GitHubFile.call(this,b,d,e)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(d,e){DrawioClient.call(this,d,e||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
+GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(d){b=d};GitHubClient.prototype.updateUser=function(d,e,c){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),u=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),z=this.authToken+" "+b;u.setRequestHeaders=function(C,A){C.setRequestHeader("Authorization",z)};u.send(mxUtils.bind(this,function(){window.clearTimeout(m);
+k&&(401===u.getStatus()?c?e({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)):200>u.getStatus()||300<=u.getStatus()?e({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(u.getText()))),d()))}),e)};GitHubClient.prototype.createUser=function(d){return new DrawioUser(d.id,d.email,d.name)};GitHubClient.prototype.authenticate=function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",
+null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};GitHubClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onGitHubCallback){var k=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(u){200<=
+u.getStatus()&&299>=u.getStatus()?(b=JSON.parse(u.getText()).access_token,this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,401==u.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=
+mxUtils.bind(this,function(C,A){m?(window.onGitHubCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:k}):(null!=z&&z(),b=C.access_token,this.setUser(null),u&&this.setPersistentToken("remembered"),e(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
+function(d,e){try{var c=JSON.parse(d.getText());null!=c&&null!=c.message&&(e=c.message)}catch(k){}return e};GitHubClient.prototype.showAuthorizeDialog=function(d,e){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),d,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
+"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),e,480,null,!1)};GitHubClient.prototype.executeRequest=function(d,e,c,k,m){var u=mxUtils.bind(this,function(C){var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT,retry:z})}),this.ui.timeout),J=this.authToken+" "+b;d.setRequestHeaders=function(f,g){f.setRequestHeader("Authorization",J)};d.send(mxUtils.bind(this,function(){window.clearTimeout(B);var f=
+mxUtils.bind(this,function(){var q=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){q();z()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(A)if(200<=d.getStatus()&&299>=d.getStatus()||k&&404==d.getStatus())e(d);else if(401===d.getStatus())C?c({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){z(!0)},c)})}):this.authenticate(function(){u(!0)},c);else if(403===d.getStatus()){var g=
+!1;try{var l=JSON.parse(d.getText());null!=l&&"Resource not accessible by integration"==l.message?f():(null!=l&&null!=l.errors&&0<l.errors.length&&(g="too_large"==l.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(q){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===d.getStatus()?m?c({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):f():409===d.getStatus()?c({code:d.getStatus(),status:409}):c({code:d.getStatus(),
+message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(f){window.clearTimeout(B);A&&c(f)}))}),z=mxUtils.bind(this,function(C){null==this.user?this.updateUser(function(){z(!0)},c,C):u(C)});null==b?this.authenticate(function(){z(!0)},c):z(!1)};GitHubClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!0)};GitHubClient.prototype.getSha=function(d,e,c,k,m,u,z){var C="&t="+(new Date).getTime();d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+
+e+"/contents/"+c+"?ref="+k+C,null,"HEAD");this.executeRequest(d,mxUtils.bind(this,function(A){try{m(A.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(B){u(B)}}),u,null,z)};GitHubClient.prototype.getFile=function(d,e,c,k,m){k=null!=k?k:!1;var u=d.split("/"),z=u[0],C=u[1],A=u[2];d=u.slice(3,u.length).join("/");u=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&u))if(null!=b){m=this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+
+d+"?ref="+A;var B={Authorization:"token "+b};u=d.split("/");this.ui.convertFile(m,0<u.length?u[u.length-1]:d,null,this.extension,e,c,null,B)}else c({message:mxResources.get("accessDenied")});else u="&t="+(new Date).getTime(),d=new mxXmlRequest(this.baseUrl+"/repos/"+z+"/"+C+"/contents/"+d+"?ref="+A+u,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(J){try{e(this.createGitHubFile(z,C,A,JSON.parse(J.getText()),k))}catch(f){c(f)}}),c)};GitHubClient.prototype.createGitHubFile=function(d,e,
+c,k,m){d={org:d,repo:e,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};e=k.content;"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?e="data:image/jpeg;base64,"+e:/\.gif$/i.test(k.name)?e="data:image/gif;base64,"+e:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(e),e=null!=k&&0<k.length?k:"data:image/png;base64,"+e):e=Base64.decode(e));return m?new GitHubLibrary(this.ui,e,d):new GitHubFile(this.ui,e,d)};GitHubClient.prototype.insertLibrary=function(d,
+e,c,k,m){this.insertFile(d,e,c,k,!0,m,!1)};GitHubClient.prototype.insertFile=function(d,e,c,k,m,u,z){m=null!=m?m:!1;u=u.split("/");var C=u[0],A=u[1],B=u[2],J=u.slice(3,u.length).join("/");0<J.length&&(J+="/");J+=d;this.checkExists(C+"/"+A+"/"+B+"/"+J,!0,mxUtils.bind(this,function(f,g){f?m?(z||(e=Base64.encode(e)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(l){this.writeFile(C,A,B,J,l,e,g,mxUtils.bind(this,function(q){try{var t=JSON.parse(q.getText());c(this.createGitHubFile(C,A,B,t.content,
+m))}catch(x){k(x)}}),k)}),k)):c(new GitHubFile(this.ui,e,{org:C,repo:A,ref:B,name:d,path:J,sha:g,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(d,e,c,k){var m=this.ui.spinner.pause();d=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[d]),mxResources.get("ok"),mxUtils.bind(this,function(u){m();c(u)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(d.container,400,80,!0,!1);d.init()};GitHubClient.prototype.writeFile=
+function(d,e,c,k,m,u,z,C,A){u.length>=this.maxFileSize?A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 1 MB)"}):(c={path:k,branch:decodeURIComponent(c),message:m,content:u},null!=z&&(c.sha=z),d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+e+"/contents/"+k,JSON.stringify(c),"PUT"),this.executeRequest(d,mxUtils.bind(this,function(B){C(B)}),mxUtils.bind(this,function(B){404==B.code&&(B.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
+B.code=null);A(B)})))};GitHubClient.prototype.checkExists=function(d,e,c){var k=d.split("/"),m=k[0],u=k[1],z=k[2];d=k.slice(3,k.length).join("/");this.getSha(m,u,d,z,mxUtils.bind(this,function(C){if(e){var A=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){A();c(!0,C)},function(){A();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(C){c(!0)}),
+!0)};GitHubClient.prototype.saveFile=function(d,e,c,k,m){var u=d.meta.org,z=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(f,g){this.writeFile(u,z,C,A,m,g,f,mxUtils.bind(this,function(l){delete d.meta.isNew;e(JSON.parse(l.getText()).content.sha)}),mxUtils.bind(this,function(l){c(l)}))}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.sha,
+g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,f.scale,f.border)}else B(d.meta.sha,Base64.encode(d.getData()))});k?this.getSha(u,z,A,C,mxUtils.bind(this,function(f){d.meta.sha=f;J()}),c):J()};GitHubClient.prototype.pickLibrary=function(d){this.pickFile(d)};GitHubClient.prototype.pickFolder=function(d){this.showGitHubDialog(!1,d)};GitHubClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(e){this.ui.loadFile("H"+encodeURIComponent(e))});this.showGitHubDialog(!0,d)};GitHubClient.prototype.showGitHubDialog=
+function(d,e){var c=null,k=null,m=null,u=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";
+A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";z.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){e(c+"/"+k+"/"+encodeURIComponent(m)+"/"+u)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
+function(){F()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(J.container,420,370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var f=mxUtils.bind(this,function(G,y,T,n){var v=document.createElement("a");v.setAttribute("title",G);v.style.cursor="pointer";mxUtils.write(v,G);mxEvent.addListener(v,"click",y);
+n&&(v.style.textDecoration="underline");null!=T&&(G=B.cloneNode(),G.style.padding=T,G.appendChild(v),v=G);return v}),g=mxUtils.bind(this,function(G){var y=document.createElement("div");y.style.marginBottom="8px";y.appendChild(f(c+"/"+k,mxUtils.bind(this,function(){u=null;F()}),null,!0));G||(mxUtils.write(y," / "),y.appendChild(f(decodeURIComponent(m),mxUtils.bind(this,function(){u=null;E()}),null,!0)));if(null!=u&&0<u.length){var T=u.split("/");for(G=0;G<T.length;G++)(function(n){mxUtils.write(y,
+" / ");y.appendChild(f(T[n],mxUtils.bind(this,function(){u=T.slice(0,n+1).join("/");x()}),null,!0))})(G)}A.appendChild(y)}),l=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=m=k=c=null,F()):this.ui.hideDialog()}),null,{})}),q=null,t=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var y=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+k+"/contents/"+u+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
+G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(A,"scroll",t),t=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(q,"click",T);this.executeRequest(y,mxUtils.bind(this,function(n){this.ui.spinner.stop();1==G&&(g(),
+A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,F();else{var N=u.split("/");u=N.slice(0,N.length-1).join("/");x()}}),"4px")));var v=JSON.parse(n.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=!0,K=0;n=mxUtils.bind(this,function(N){for(var I=0;I<v.length;I++)mxUtils.bind(this,function(M,Q){if(N==("dir"==M.type)){Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");
+P.src=IMAGE_PATH+"/"+("dir"==M.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(f(M.name+("dir"==M.type?"/":""),mxUtils.bind(this,function(){"dir"==M.type?(u=M.path,x()):d&&"file"==M.type&&(this.ui.hideDialog(),e(c+"/"+k+"/"+encodeURIComponent(m)+"/"+M.path))})));A.appendChild(Q);K++}})(v[I],I)});n(!0);d&&n(!1)}}),l,!0)}),E=mxUtils.bind(this,function(G,y){null==G&&(A.innerText="",G=1);var T=
+new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+k+"/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(A,"scroll",t),t=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(q,"click",
+n);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){u=null;F()}),"4px")));v=JSON.parse(v.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==v.length&&y)m=v[0].name,u="",x();else{for(var H=0;H<v.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(f(K.name,mxUtils.bind(this,
+function(){m=K.name;u="";x()})));A.appendChild(I)})(v[H],H);100==v.length&&(A.appendChild(q),t=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&n()},mxEvent.addListener(A,"scroll",t))}}),l)}),F=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var y=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=t&&mxEvent.removeListener(A,"scroll",t);null!=q&&null!=
+q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){F(G+1)});mxEvent.addListener(q,"click",T);this.executeRequest(y,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null==n||0==n.length)mxUtils.write(A,mxResources.get("noFiles"));else{1==G&&(A.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var H=
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(K){if(null!=K){var N=K.split("/");if(1<N.length){K=N[0];var I=N[1];3>N.length?(c=K,k=I,u=m=null,E()):this.ui.spinner.spin(A,mxResources.get("loading"))&&(N=encodeURIComponent(N.slice(2,N.length).join("/")),this.getFile(K+"/"+I+"/"+N,mxUtils.bind(this,function(M){this.ui.spinner.stop();c=M.meta.org;k=M.meta.repo;m=decodeURIComponent(M.meta.ref);u="";x()}),mxUtils.bind(this,function(M){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(H.container,300,80,!0,!1);H.init()}))),mxUtils.br(A),mxUtils.br(A));for(var v=0;v<n.length;v++)mxUtils.bind(this,function(H,K){var N=B.cloneNode();N.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";N.appendChild(f(H.full_name,mxUtils.bind(this,function(){c=H.owner.login;
+k=H.name;u="";E(null,!0)})));A.appendChild(N)})(n[v],v)}100==n.length&&(A.appendChild(q),t=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&T()},mxEvent.addListener(A,"scroll",t))}),l)});F()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+TrelloFile.prototype.save=function(b,d,e){this.doSave(this.getTitle(),d,e)};TrelloFile.prototype.saveAs=function(b,d,e){this.doSave(b,d,e)};TrelloFile.prototype.doSave=function(b,d,e){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,d,e)}),e])};
+TrelloFile.prototype.saveFile=function(b,d,e,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=e&&e();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,e,c))}),mxUtils.bind(this,
+function(k){this.savingFile=!1;null!=c&&c(k)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=e&&e();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,e,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k)}))):null!=e&&e()};TrelloLibrary=function(b,d,e){TrelloFile.call(this,b,d,e)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
+TrelloClient.prototype.authenticate=function(b,d,e){e&&this.logout();e=mxUtils.bind(this,function(c,k){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=k&&k();b()},error:function(){null!=k&&k();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?e(!0):this.ui.showAuthDialog(this,!0,e)};TrelloClient.prototype.getLibrary=function(b,d,e){this.getFile(b,d,e,!1,!0)};
+TrelloClient.prototype.getFile=function(b,d,e,c,k){k=null!=k?k:!1;var m=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;e({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(A){window.clearTimeout(C);if(z){var B=/\.png$/i.test(A.name),J={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(A.name)||
+/\.gliffy$/i.test(A.name)||!this.ui.useCanvasForExport&&B?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(A.url),A.name,A.mimeType,this.extension,d,e,null,J):(z=!0,C=window.setTimeout(mxUtils.bind(this,function(){z=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(A.url),mxUtils.bind(this,function(f){window.clearTimeout(C);if(z){A.compoundId=b;if(0<(B?f.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(f);null!=g&&0<g.length&&
+(f=g)}k?d(new TrelloLibrary(this.ui,f,A)):d(new TrelloFile(this.ui,f,A))}}),mxUtils.bind(this,function(f,g){window.clearTimeout(C);z&&(401==g.status?this.authenticate(m,e,!0):e())}),B||null!=A.mimeType&&"image/"==A.mimeType.substring(0,6),null,null,null,J))}}),mxUtils.bind(this,function(A){window.clearTimeout(C);z&&(null!=A&&401==A.status?this.authenticate(m,e,!0):e())}))});this.authenticate(m,e)};TrelloClient.prototype.insertLibrary=function(b,d,e,c,k){this.insertFile(b,d,e,c,!0,k)};
+TrelloClient.prototype.insertFile=function(b,d,e,c,k,m){k=null!=k?k:!1;var u=mxUtils.bind(this,function(){var z=mxUtils.bind(this,function(C){this.writeFile(b,C,m,mxUtils.bind(this,function(A){k?e(new TrelloLibrary(this.ui,d,A)):e(new TrelloFile(this.ui,d,A))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){z(this.ui.base64ToBlob(C,"image/png"))}),c,d):z(d)});this.authenticate(u,c)};
+TrelloClient.prototype.saveFile=function(b,d,e){var c=b.meta.compoundId.split(this.SEPARATOR),k=mxUtils.bind(this,function(u){this.writeFile(b.meta.name,u,c[0],function(z){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){d(z)}),mxUtils.bind(this,function(C){null!=C&&401==C.status?this.authenticate(m,e,!0):e()}))},e)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){k(this.ui.base64ToBlob(u,
+"image/png"))}),e,this.ui.getCurrentFile()!=b?b.getData():null):k(b.getData())});this.authenticate(m,e)};
+TrelloClient.prototype.writeFile=function(b,d,e,c,k){if(null!=b&&null!=d)if(d.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var u=!0,z=window.setTimeout(mxUtils.bind(this,function(){u=!1;k({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),C=new FormData;C.append("key",Trello.key());C.append("token",Trello.token());C.append("file","string"===typeof d?new Blob([d]):d,b);C.append("name",
+b);var A=new XMLHttpRequest;A.responseType="json";A.onreadystatechange=mxUtils.bind(this,function(){if(4===A.readyState&&(window.clearTimeout(z),u))if(200==A.status){var B=A.response;B.compoundId=e+this.SEPARATOR+B.id;c(B)}else 401==A.status?this.authenticate(m,k,!0):k()});A.open("POST",this.baseUrl+"cards/"+e+"/attachments");A.send(C)});this.authenticate(m,k)}else k({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(d){this.ui.showError(mxResources.get("error"),d)}))};TrelloClient.prototype.pickFile=function(b,d){b=null!=b?b:mxUtils.bind(this,function(e){this.ui.loadFile("T"+encodeURIComponent(e))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e,mxResources.get("ok"))}))};
+TrelloClient.prototype.showTrelloDialog=function(b,d){var e=null,c="@me",k=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var u=document.createElement("h3");mxUtils.write(u,b?mxResources.get("selectFile"):mxResources.get("selectCard"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(u);var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="auto";z.style.height=
+"194px";m.appendChild(z);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var C=mxUtils.bind(this,function(l,q,t){k++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var E=document.createElement("a");E.style.cursor="pointer";if(null!=t){var F=document.createElement("img");
+F.src=t.url;F.width=t.width;F.height=t.height;F.style="border: 1px solid black;margin:5px;vertical-align:middle";E.appendChild(F)}mxUtils.write(E,l);mxEvent.addListener(E,"click",q);x.appendChild(E);return x}),A=mxUtils.bind(this,function(l){this.ui.handleError(l,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),B=mxUtils.bind(this,function(){k=0;z.innerText="";this.ui.spinner.spin(z,mxResources.get("loading"));var l=mxUtils.bind(this,function(){Trello.cards.get(e+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(q){this.ui.spinner.stop();z.appendChild(C("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(z);null==q||0==q.length?mxUtils.write(z,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<q.length;t++)mxUtils.bind(this,function(x){z.appendChild(C(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(e+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(q[t])})()}),mxUtils.bind(this,function(q){401==
+q.status?this.authenticate(l,A,!0):null!=A&&A(q)}))});l()}),J=null,f=null,g=mxUtils.bind(this,function(l){null==l&&(k=0,z.innerText="",l=1);this.ui.spinner.spin(z,mxResources.get("loading"));null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J);J=document.createElement("a");J.style.display="block";J.style.cursor="pointer";mxUtils.write(J,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){mxEvent.removeListener(z,"scroll",f);g(l+1)});mxEvent.addListener(J,"click",q);var t=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:l-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(z,mxResources.get("noFiles"));else{1==l&&(z.appendChild(C(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(G){null!=G&&(c=G,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(z));for(var E=0;E<x.length;E++)mxUtils.bind(this,function(F){z.appendChild(C(F.name,mxUtils.bind(this,function(){b?(e=F.id,B()):(this.ui.hideDialog(),d(F.id))})))})(x[E]);100==x.length&&(z.appendChild(J),f=function(){z.scrollTop>=z.scrollHeight-z.offsetHeight&&q()},mxEvent.addListener(z,"scroll",f))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,A,!0):null!=A&&A({message:x.responseText})}))});t()});g()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,d,e){GitHubFile.call(this,b,d,e);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
-GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
-function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-e),null,"GET")).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(E,d){m?(window.onGitLabCallback=null,m=!1,null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.setToken(b),this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var m=mxUtils.bind(this,function(x){var E=!0,d=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;e.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization",
-g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(d);if(E)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){v(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&&
-null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(d);E&&c(k)}))}),v=mxUtils.bind(this,function(x){null==this.user?this.updateUser(function(){v(!0)},
-c,x):m(x)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,m,v){if(null!=m)c(e,m);else{var x=e.length-2,E=mxUtils.bind(this,function(){if(2>x)l({message:mxResources.get("fileNotFound")});else{var d=Math.max(x-1,0),g=e.slice(0,d).join("/");d=e[d];var k=e[x],n=e.slice(x+1,e.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+
-"?ref="+k);var q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,mxUtils.bind(this,function(){200==q.getStatus()?c(e,x):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(x--,E()):l({message:mxResources.get("fileNotFound")})}))}});E()}};GitLabClient.prototype.getFile=function(e,f,c,l,m,v){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(x,E){var d=Math.max(E-1,0),g=x.slice(0,d).join("/"),k=x[d],n=x[E];e=x.slice(E+1,x.length).join("/");
-x=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&x))if(null!=b){d="&t="+(new Date).getTime();var q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n;x=e.split("/");this.ui.convertFile(q+d,0<x.length?x[x.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(p,y,A){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(C){try{y(this.getFileContent(JSON.parse(C.getText())))}catch(B){A(B)}}),
-A)}))}else c({message:mxResources.get("accessDenied")});else d="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n,x=new mxXmlRequest(q+d,null,"GET"),this.executeRequest(x,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,E))}catch(y){c(y)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
-c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,m,v){var x=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:x+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:x+e+"/"+f+"/raw/"+c+"/"+l.file_path+
-"?inline=false",last_commit_id:l.last_commit_id,refPos:v};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,m,v,x){m=null!=m?m:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(E,d){var g=Math.max(d-1,0),k=E.slice(0,g).join("/"),n=E[g],q=E[d];path=E.slice(d+1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(k+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(p,y){p?
-m?(x||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(k,n,q,path,A,f,y,mxUtils.bind(this,function(C){try{var B=JSON.parse(C.getText());c(this.createGitLabFile(k,n,q,null!=B.content?B.content:B,m,d))}catch(I){l(I)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:q,name:e,path:path,html_url:p+k+"/"+n+"/blob/"+q+"/"+path,download_url:p+k+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:d,last_commit_id:y,isNew:!0}))):l()}))}),
-l,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){m();c(!0,l.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
-f,c,l,m,v,x,E,d){if(v.length>=this.maxFileSize)d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:v,encoding:"base64"};null!=x&&(c.last_commit_id=x,g="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(e,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){E(k)}),
-d)}};GitLabClient.prototype.saveFile=function(e,f,c,l,m){var v=e.meta.org,x=e.meta.repo,E=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(v,x,E,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;this.getFile(v+"/"+x+"/"+E+"/"+d,mxUtils.bind(this,function(y){y.getData()==e.getData()?f(y.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.last_commit_id,q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(v+"/"+x+"/"+E+"/"+d,mxUtils.bind(this,function(n){e.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
-encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,l=null,m=null,v=null,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(e?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(E);var d=document.createElement("div");d.style.whiteSpace=
-"nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";x.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,x,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+v)}));this.ui.showDialog(k.container,420,
-370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,G,S,u){var z=document.createElement("a");z.setAttribute("title",M);z.style.cursor="pointer";mxUtils.write(z,M);mxEvent.addListener(z,"click",G);u&&(z.style.textDecoration="underline");null!=S&&(M=g.cloneNode(),M.style.padding=S,M.appendChild(z),z=M);return z}),q=mxUtils.bind(this,function(M){var G=document.createElement("div");G.style.marginBottom="8px";G.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){v=
-null;I()}),null,!0));M||(mxUtils.write(G," / "),G.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){v=null;B()}),null,!0)));if(null!=v&&0<v.length){var S=v.split("/");for(M=0;M<S.length;M++)(function(u){mxUtils.write(G," / ");G.appendChild(n(S[u],mxUtils.bind(this,function(){v=S.slice(0,u+1).join("/");C()}),null,!0))})(M)}d.appendChild(G)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=m=l=c=null,
-I()):this.ui.hideDialog()}))}),y=null,A=null,C=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+v+"&ref="+m+"&per_page=100&page="+M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display=
-"block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==M&&(q(!m),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,I();else{var K=v.split("/");v=K.slice(0,K.length-1).join("/");C()}}),"4px")));var z=JSON.parse(u.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=
-!0,J=0;u=mxUtils.bind(this,function(K){for(var H=0;H<z.length;H++)mxUtils.bind(this,function(N){if(K==("tree"==N.type)){var U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var Q=document.createElement("img");Q.src=IMAGE_PATH+"/"+("tree"==N.type?"folder.png":"file.png");Q.setAttribute("align","absmiddle");Q.style.marginRight="4px";Q.style.marginTop="-4px";Q.width=20;U.appendChild(Q);U.appendChild(n(N.name+("tree"==N.type?"/":""),mxUtils.bind(this,function(){"tree"==
-N.type?(v=N.path,C()):e&&"blob"==N.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+N.path))})));d.appendChild(U);J++}})(z[H])});u(!0);e&&u(!1);100==J&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&S()},mxEvent.addListener(d,"scroll",A))}}),p,!0)}),B=mxUtils.bind(this,function(M,G){null==M&&(d.innerText="",M=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(y,"click",u);this.executeRequest(S,mxUtils.bind(this,function(z){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,
-function(){v=null;I()}),"4px")));z=JSON.parse(z.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==z.length&&G)m=z[0].name,v="",C();else{for(var F=0;F<z.length;F++)mxUtils.bind(this,function(J,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(J.name,mxUtils.bind(this,function(){m=encodeURIComponent(J.name);v="";C()})));d.appendChild(H)})(z[F],F);100==z.length&&(d.appendChild(y),A=function(){d.scrollTop>=
-d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",A))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));var I=mxUtils.bind(this,function(M){var G=this.ui.spinner,S=0;this.ui.spinner.stop();var u=function(){G.spin(d,mxResources.get("loading"));S+=1},z=function(){--S;0===S&&G.stop()};null==M&&(d.innerText="",M=1);null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");
-y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var F=mxUtils.bind(this,function(){0===S&&I(M+1)});mxEvent.addListener(y,"click",F);var J=mxUtils.bind(this,function(H){u();var N=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(N,mxUtils.bind(this,function(U){H(JSON.parse(U.getText()));z()}),p)}),K=mxUtils.bind(this,function(H,N){u();var U=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(U,mxUtils.bind(this,function(Q){N(H,JSON.parse(Q.getText()));z()}),p)});J(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(d,mxResources.get("loggedOut"));else{u();var N=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+M,null,"GET");this.executeRequest(N,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=H&&0!=H.length){1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===S){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],l=t[1],m=v=null,2<t.length?(m=encodeURIComponent(t.slice(2,t.length).join("/")),C()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(d),mxUtils.br(d));for(var Q=!0,V=0;V<U.length;V++)mxUtils.bind(this,
-function(W){var t=g.cloneNode();t.style.backgroundColor=Q?Editor.isDarkMode()?"#000000":"#eeeeee":"";Q=!Q;t.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===S&&(c=W.owner.username,l=W.path,v="",B(null,!0))})));d.appendChild(t)})(U[V]);for(V=0;V<H.length;V++)u(),K(H[V],mxUtils.bind(this,function(W,t){z();for(var D=0;D<t.length;D++){var L=g.cloneNode();L.style.backgroundColor=Q?Editor.isDarkMode()?"#000000":"#eeeeee":"";Q=!Q;mxUtils.bind(this,function(T){L.appendChild(n(T.name_with_namespace,
-mxUtils.bind(this,function(){0===S&&(c=W.full_path,l=T.path,v="",B(null,!0))})));d.appendChild(L)})(t[D])}}));z()}else z(),mxUtils.write(d,mxResources.get("noFiles"));100==U.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&F()},mxEvent.addListener(d,"scroll",A))}),p)}}))});b?this.user?I():this.updateUser(function(){I()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){I()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
-"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,m,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,m,v,x){DrawioComment.call(this,b,e,f,c,l,m,v);this.pCommentId=x};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){e(m.replyId)}),f)};
-DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,m,v,x,E,d,g,k,n,q){function p(P,R){R=R||document;return R.querySelector(P)}function y(P,R,X){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)X();else{c(P.id,P.parentReference.driveId,function(aa){y(aa,R,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",P["@microsoft.graph.downloadUrl"]);var Y=P.file?"image/png"==P.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var aa=Z.responseText;
-Y&&(aa="data:image/png;base64,"+Editor.base64Encode(aa),aa=Editor.extractGraphModelFromPng(aa));var ba=mxUtils.parseXml(aa),ea="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=ea){R(ea.ownerDocument);return}}catch(ja){}X()}};Y&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");Z.send()}function A(){k&&null!=K?J.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");v(H,P);m(H)},400,
-null,null,function(P){console.log(P)},600,null,null,null,null,null,K):(v(H,void 0),m(H))}function C(P){function R(X){L.style.background="transparent";L.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);L.appendChild(Z);F.stop()}if(null!=L)if(L.style.background="transparent",L.innerText="",null==P||P.folder||/\.drawiolib$/.test(P.name))R(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),W=P,F.spin(L),y(P,function(X){F.stop();
-if(W==P)if("mxlibrary"==X.documentElement.nodeName)R(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");K=AspectDialog.prototype.createViewer(L,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){H=null;R(mxResources.get("notADiagramFile"))})}catch(X){H=null,R(mxResources.get("notADiagramFile"))}}function B(){var P=p(".odFilesBreadcrumb");if(null!=P){P.innerText="";for(var R=0;R<Q.length-1;R++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=
-mxUtils.htmlEntities(Q[R].name||mxResources.get("home"));P.appendChild(X);(function(Y,aa){X.addEventListener("click",function(){e(null);Q=Q.slice(0,aa);M(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(Q[R],R);var Z=document.createElement("span");Z.innerHTML=" &gt; ";P.appendChild(Z)}null!=Q[Q.length-1]&&(R=document.createElement("span"),R.innerHTML=mxUtils.htmlEntities(1==Q.length?mxResources.get("officeSelDiag"):Q[Q.length-1].name||mxResources.get("home")),P.appendChild(R))}}function I(){if(null!=H&&
-!U)if("sharepoint"==N)M("site",null,H.id,H.displayName);else if("site"==N)M("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var R=(H.parentReference?H.parentReference.driveId:null)||N,X=H.id;P?M(R,X,null,H.name):A()}}function M(P,R,X,Z,Y){function aa(xa){F.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var oa=null,Aa=0,La=0;null!=xa&&La<xa.length;La++){var ta=xa[La];if(1!=ja||!ta.webUrl||0<ta.webUrl.indexOf("sharepoint.com/sites/")||0>
-ta.webUrl.indexOf("sharepoint.com/")){var Da=ta.displayName||ta.name,wa=mxUtils.htmlEntities(ta.description||Da);ja&&(ta.folder=2==ja?{isRoot:!0}:!0);var Ja=null!=ta.folder;if(!E||Ja){var ka=document.createElement("tr");ka.className=Aa++%2?"odOddRow":"odEvenRow";var da=document.createElement("td");da.style.width="36px";var ca=document.createElement("img");ca.src="/images/"+(Ja?"folder.png":"file.png");ca.className="odFileImg";da.appendChild(ca);ka.appendChild(da);da=document.createElement("td");Ja=
-document.createElement("div");Ja.className="odFileTitle";Ja.innerHTML=mxUtils.htmlEntities(Da);Ja.setAttribute("title",wa);da.appendChild(Ja);ka.appendChild(da);Ca.appendChild(ka);null==oa&&(oa=ka,oa.className+=" odRowSelected",H=ta,N=P,q||e(H));(function(na,la){ka.addEventListener("dblclick",I);ka.addEventListener("click",function(){oa!=la&&(oa.className=oa.className.replace("odRowSelected",""),oa=la,oa.className+=" odRowSelected",H=na,N=P,q||e(H))})})(ta,ka)}}}0==Aa?(xa=document.createElement("div"),
-xa.className="odEmptyFolder",xa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ra.appendChild(xa)):ra.appendChild(Ca);B();U=!1}function ba(xa){f(xa?xa:ya,function(Ca){if(ea){var oa=Ca.value||[];if(q||ja)Array.prototype.push.apply(Ma,oa);else for(var Aa=0;Aa<oa.length;Aa++){var La=oa[Aa],ta=La.file?La.file.mimeType:null;(La.folder||"text/html"==ta||"text/xml"==ta||"application/xml"==ta||"image/png"==ta||/\.svg$/.test(La.name)||/\.html$/.test(La.name)||/\.xml$/.test(La.name)||
-/\.png$/.test(La.name)||/\.drawio$/.test(La.name)||/\.drawiolib$/.test(La.name))&&Ma.push(La)}Ca["@odata.nextLink"]&&1E3>Ma.length?ba(Ca["@odata.nextLink"]):(clearTimeout(fa),aa(Ma))}},function(Ca){if(ea){clearTimeout(fa);var oa=null;try{oa=JSON.parse(Ca.responseText).error.message}catch(Aa){}x(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=oa?" ("+oa+")":""));U=!1;F.stop()}},null!=xa)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block";
-null!=L&&(L.innerText="",L.style.top="50%");var ea=U=!0,ja=0;V=arguments;var fa=setTimeout(function(){U=ea=!1;F.stop();x(mxResources.get("timeout"))},2E4),ra=p(".odFilesList");ra.innerText="";F.spin(ra);switch(P){case "recent":Q=[{name:mxResources.get("recent",null,"Recent"),driveId:P}];var ma=l()||{},Ga=[],Fa;for(Fa in ma)Ga.push(ma[Fa]);clearTimeout(fa);aa(Ga);return;case "shared":var ya="/me/drive/sharedWithMe";Q=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":ya=
-"/sites?search=";Q=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ja=1;break;case "site":Q.push({name:Z,driveId:P,folderId:R,siteId:X});ya="/sites/"+X+"/drives";ja=2;break;case "subsite":Q.push({name:Z,driveId:P,folderId:R,siteId:X});ya="/drives/"+X+(R?"/items/"+R:"/root")+"/children";break;case "search":P=N;Q=[{driveId:P,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ya=P?"/drives/"+P+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+
-Y+"')";break;default:null==R?Q=[{driveId:P}]:Q.push({name:Z,driveId:P,folderId:R}),ya=(P?"/drives/"+P:"/me/drive")+(R?"/items/"+R:"/root")+"/children"}ja||(ya+=(0<ya.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function G(P){T.className=T.className.replace("odCatSelected","");T=P;T.className+=" odCatSelected"}function S(P){U||(O=null,M("search",null,null,null,
-P))}var u="";null==e&&(e=C,u='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(R){}return P});null==m&&(m=function(P){if(null!=P){var R=l()||{};delete P["@microsoft.graph.downloadUrl"];R[P.id]=P;localStorage.setItem("mxODPickerRecentList",JSON.stringify(R))}});u='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
+GitLabFile.prototype.setDescriptorEtag=function(b,d){b.last_commit_id=d};GitLabLibrary=function(b,d,e){GitLabFile.call(this,b,d,e)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(d){GitHubClient.call(this,d,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
+function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};GitLabClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onGitLabCallback){var k=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
+d),null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?(b=JSON.parse(u.getText()).access_token,this.setToken(b),this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==u.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(u,z){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(C,A){m?(window.onGitLabCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:k}):(null!=z&&z(),b=C.access_token,this.setToken(b),this.setUser(null),u&&this.setPersistentToken("remembered"),e(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:k})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,e,c,k){var m=mxUtils.bind(this,function(z){var C=!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),B=this.authToken+" "+b;d.setRequestHeaders=function(J,f){J.setRequestHeader("Authorization",
+B);J.setRequestHeader("PRIVATE_TOKEN",B);J.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(A);if(C)if(200<=d.getStatus()&&299>=d.getStatus()||k&&404==d.getStatus())e(d);else if(401===d.getStatus())z?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===d.getStatus()){var J=!1;try{var f=JSON.parse(d.getText());null!=f&&
+null!=f.errors&&0<f.errors.length&&(J="too_large"==f.errors[0].code)}catch(g){}c({message:mxResources.get(J?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?c({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?c({status:400}):c({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(J){window.clearTimeout(A);C&&c(J)}))}),u=mxUtils.bind(this,function(z){null==this.user?this.updateUser(function(){u(!0)},
+c,z):m(z)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitLabClient.prototype.getRefIndex=function(d,e,c,k,m,u){if(null!=m)c(d,m);else{var z=d.length-2,C=mxUtils.bind(this,function(){if(2>z)k({message:mxResources.get("fileNotFound")});else{var A=Math.max(z-1,0),B=d.slice(0,A).join("/");A=d[A];var J=d[z],f=d.slice(z+1,d.length).join("/");B=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+A)+"/repository/"+(e?u?"branches?per_page=1&page=1&ref="+J:"tree?path="+f+"&ref="+J:"files/"+encodeURIComponent(f)+
+"?ref="+J);var g=new mxXmlRequest(B,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(d,z):k({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(z--,C()):k({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(d,e,c,k,m,u){k=null!=k?k:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(z,C){var A=Math.max(C-1,0),B=z.slice(0,A).join("/"),J=z[A],f=z[C];d=z.slice(C+1,z.length).join("/");
+z=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&z))if(null!=b){A="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+f;z=d.split("/");this.ui.convertFile(g+A,0<z.length?z[z.length-1]:d,null,this.extension,e,c,mxUtils.bind(this,function(l,q,t){l=new mxXmlRequest(l,null,"GET");this.executeRequest(l,mxUtils.bind(this,function(x){try{q(this.getFileContent(JSON.parse(x.getText())))}catch(E){t(E)}}),
+t)}))}else c({message:mxResources.get("accessDenied")});else A="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+f,z=new mxXmlRequest(g+A,null,"GET"),this.executeRequest(z,mxUtils.bind(this,function(l){try{e(this.createGitLabFile(B,J,f,JSON.parse(l.getText()),k,C))}catch(q){c(q)}}),c)}),c,u)};GitLabClient.prototype.getFileContent=function(d){var e=d.file_name,c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(e)?
+c="data:image/jpeg;base64,"+c:/\.gif$/i.test(e)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(e)?c="data:application/pdf;base64,"+c:/\.png$/i.test(e)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(d,e,c,k,m,u){var z=DRAWIO_GITLAB_URL+"/";d={org:d,repo:e,ref:c,name:k.file_name,path:k.file_path,html_url:z+d+"/"+e+"/blob/"+c+"/"+k.file_path,download_url:z+d+"/"+e+"/raw/"+c+"/"+k.file_path+
+"?inline=false",last_commit_id:k.last_commit_id,refPos:u};k=this.getFileContent(k);return m?new GitLabLibrary(this.ui,k,d):new GitLabFile(this.ui,k,d)};GitLabClient.prototype.insertFile=function(d,e,c,k,m,u,z){m=null!=m?m:!1;u=u.split("/");this.getRefIndex(u,!0,mxUtils.bind(this,function(C,A){var B=Math.max(A-1,0),J=C.slice(0,B).join("/"),f=C[B],g=C[A];path=C.slice(A+1,C.length).join("/");0<path.length&&(path+="/");path+=d;this.checkExists(J+"/"+f+"/"+g+"/"+path,!0,mxUtils.bind(this,function(l,q){l?
+m?(z||(e=Base64.encode(e)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(t){this.writeFile(J,f,g,path,t,e,q,mxUtils.bind(this,function(x){try{var E=JSON.parse(x.getText());c(this.createGitLabFile(J,f,g,null!=E.content?E.content:E,m,A))}catch(F){k(F)}}),k)}),k)):(l=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,e,{org:J,repo:f,ref:g,name:d,path:path,html_url:l+J+"/"+f+"/blob/"+g+"/"+path,download_url:l+J+"/"+f+"/raw/"+g+"/"+path+"?inline=false",refPos:A,last_commit_id:q,isNew:!0}))):k()}))}),
+k,null,4>=u.length)};GitLabClient.prototype.checkExists=function(d,e,c){this.getFile(d,mxUtils.bind(this,function(k){if(e){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){m();c(!0,k.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(k){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(d,
+e,c,k,m,u,z,C,A){if(u.length>=this.maxFileSize)A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(u.length)+" / 10 MB)"});else{var B="POST";c={path:encodeURIComponent(k),branch:decodeURIComponent(c),commit_message:m,content:u,encoding:"base64"};null!=z&&(c.last_commit_id=z,B="PUT");d=this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+e)+"/repository/files/"+encodeURIComponent(k);B=new mxXmlRequest(d,JSON.stringify(c),B);this.executeRequest(B,mxUtils.bind(this,function(J){C(J)}),
+A)}};GitLabClient.prototype.saveFile=function(d,e,c,k,m){var u=d.meta.org,z=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(f,g){this.writeFile(u,z,C,A,m,g,f,mxUtils.bind(this,function(l){delete d.meta.isNew;this.getFile(u+"/"+z+"/"+C+"/"+A,mxUtils.bind(this,function(q){q.getData()==d.getData()?e(q.getCurrentEtag()):e({content:d.getCurrentEtag()})}),c,null,null,d.meta.refPos)}),c)}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var f=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,f.scale,f.border)}else B(d.meta.last_commit_id,Base64.encode(d.getData()))});k?this.getFile(u+"/"+z+"/"+C+"/"+A,mxUtils.bind(this,function(f){d.meta.last_commit_id=f.meta.last_commit_id;J()}),c):J()};GitLabClient.prototype.pickFolder=function(d){this.showGitLabDialog(!1,d)};GitLabClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(e){this.ui.loadFile("A"+
+encodeURIComponent(e))});this.showGitLabDialog(!0,d)};GitLabClient.prototype.showGitLabDialog=function(d,e){var c=null,k=null,m=null,u=null,z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.overflow="hidden";z.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var A=document.createElement("div");A.style.whiteSpace=
+"nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";z.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,z,mxUtils.bind(this,function(){e(c+"/"+k+"/"+encodeURIComponent(m)+"/"+u)}));this.ui.showDialog(J.container,420,
+370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var f=mxUtils.bind(this,function(G,y,T,n){var v=document.createElement("a");v.setAttribute("title",G);v.style.cursor="pointer";mxUtils.write(v,G);mxEvent.addListener(v,"click",y);n&&(v.style.textDecoration="underline");null!=T&&(G=B.cloneNode(),G.style.padding=T,G.appendChild(v),v=G);return v}),g=mxUtils.bind(this,function(G){var y=document.createElement("div");y.style.marginBottom="8px";y.appendChild(f(c+"/"+k,mxUtils.bind(this,function(){u=
+null;F()}),null,!0));G||(mxUtils.write(y," / "),y.appendChild(f(decodeURIComponent(m),mxUtils.bind(this,function(){u=null;E()}),null,!0)));if(null!=u&&0<u.length){var T=u.split("/");for(G=0;G<T.length;G++)(function(n){mxUtils.write(y," / ");y.appendChild(f(T[n],mxUtils.bind(this,function(){u=T.slice(0,n+1).join("/");x()}),null,!0))})(G)}A.appendChild(y)}),l=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=m=k=c=null,
+F()):this.ui.hideDialog()}))}),q=null,t=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var y=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/tree?path="+u+"&ref="+m+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=t&&(mxEvent.removeListener(A,"scroll",t),t=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display=
+"block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var T=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(q,"click",T);this.executeRequest(y,mxUtils.bind(this,function(n){this.ui.spinner.stop();1==G&&(g(!m),A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,F();else{var N=u.split("/");u=N.slice(0,N.length-1).join("/");x()}}),"4px")));var v=JSON.parse(n.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=
+!0,K=0;n=mxUtils.bind(this,function(N){for(var I=0;I<v.length;I++)mxUtils.bind(this,function(M){if(N==("tree"==M.type)){var Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");P.src=IMAGE_PATH+"/"+("tree"==M.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(f(M.name+("tree"==M.type?"/":""),mxUtils.bind(this,function(){"tree"==
+M.type?(u=M.path,x()):d&&"blob"==M.type&&(this.ui.hideDialog(),e(c+"/"+k+"/"+m+"/"+M.path))})));A.appendChild(Q);K++}})(v[I])});n(!0);d&&n(!1);100==K&&(A.appendChild(q),t=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&T()},mxEvent.addListener(A,"scroll",t))}}),l,!0)}),E=mxUtils.bind(this,function(G,y){null==G&&(A.innerText="",G=1);var T=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=t&&(mxEvent.removeListener(A,"scroll",t),t=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(q,"click",n);this.executeRequest(T,mxUtils.bind(this,function(v){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(f("../ [Up]",mxUtils.bind(this,
+function(){u=null;F()}),"4px")));v=JSON.parse(v.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==v.length&&y)m=v[0].name,u="",x();else{for(var H=0;H<v.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(f(K.name,mxUtils.bind(this,function(){m=encodeURIComponent(K.name);u="";x()})));A.appendChild(I)})(v[H],H);100==v.length&&(A.appendChild(q),t=function(){A.scrollTop>=
+A.scrollHeight-A.offsetHeight&&n()},mxEvent.addListener(A,"scroll",t))}}),l)});J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));var F=mxUtils.bind(this,function(G){var y=this.ui.spinner,T=0;this.ui.spinner.stop();var n=function(){y.spin(A,mxResources.get("loading"));T+=1},v=function(){--T;0===T&&y.stop()};null==G&&(A.innerText="",G=1);null!=t&&(mxEvent.removeListener(A,"scroll",t),t=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");
+q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var H=mxUtils.bind(this,function(){0===T&&F(G+1)});mxEvent.addListener(q,"click",H);var K=mxUtils.bind(this,function(I){n();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(Q){I(JSON.parse(Q.getText()));v()}),l)}),N=mxUtils.bind(this,function(I,M){n();var Q=new mxXmlRequest(this.baseUrl+"/groups/"+I.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(Q,mxUtils.bind(this,function(P){M(I,JSON.parse(P.getText()));v()}),l)});K(mxUtils.bind(this,function(I){if(null==this.user)mxUtils.write(A,mxResources.get("loggedOut"));else{n();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(Q){Q=JSON.parse(Q.getText());if(null!=Q&&0!=Q.length||null!=I&&0!=I.length){1==G&&(A.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===T){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(p){null!=p&&(p=p.split("/"),1<p.length?(c=p[0],k=p[1],m=u=null,2<p.length?(m=encodeURIComponent(p.slice(2,p.length).join("/")),x()):E(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(A),mxUtils.br(A));for(var P=!0,U=0;U<Q.length;U++)mxUtils.bind(this,
+function(W){var p=B.cloneNode();p.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;p.appendChild(f(W.name_with_namespace,mxUtils.bind(this,function(){0===T&&(c=W.owner.username,k=W.path,u="",E(null,!0))})));A.appendChild(p)})(Q[U]);for(U=0;U<I.length;U++)n(),N(I[U],mxUtils.bind(this,function(W,p){v();for(var D=0;D<p.length;D++){var L=B.cloneNode();L.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;mxUtils.bind(this,function(V){L.appendChild(f(V.name_with_namespace,
+mxUtils.bind(this,function(){0===T&&(c=W.full_path,k=V.path,u="",E(null,!0))})));A.appendChild(L)})(p[D])}}));v()}else v(),mxUtils.write(A,mxResources.get("noFiles"));100==Q.length&&(A.appendChild(q),t=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&H()},mxEvent.addListener(A,"scroll",t))}),l)}}))});b?this.user?F():this.updateUser(function(){F()},l,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){F()},l,!0)}),l)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,d,e,c,k,m,u){this.file=b;this.id=d;this.content=e;this.modifiedDate=c;this.createdDate=k;this.isResolved=m;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,e,c,k){d()};DrawioComment.prototype.editComment=function(b,d,e){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DriveComment=function(b,d,e,c,k,m,u,z){DrawioComment.call(this,b,d,e,c,k,m,u);this.pCommentId=z};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,d,e,c,k){b={content:b.content};c?b.verb="resolve":k&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){d(m.replyId)}),e)};
+DriveComment.prototype.editComment=function(b,d,e){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},d,e)};
+DriveComment.prototype.deleteComment=function(b,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,d)};function mxODPicker(b,d,e,c,k,m,u,z,C,A,B,J,f,g){function l(R,S){S=S||document;return S.querySelector(R)}function q(R,S,X){if(null==R["@microsoft.graph.downloadUrl"])if(null==R.parentReference)X();else{c(R.id,R.parentReference.driveId,function(ba){q(ba,S,X)},X);return}var Y=new XMLHttpRequest;Y.open("GET",R["@microsoft.graph.downloadUrl"]);var aa=R.file?"image/png"==R.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Y.responseText;
+aa&&(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba));var da=mxUtils.parseXml(ba),Z="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=Z){S(Z.ownerDocument);return}}catch(ha){}X()}};aa&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function t(){J&&null!=N?K.exportToCanvas(function(R){R=EditorUi.prototype.createImageDataUri(R,null,"png");u(I,R);m(I)},400,
+null,null,function(R){console.log(R)},600,null,null,null,null,null,N):(u(I,void 0),m(I))}function x(R){function S(X){L.style.background="transparent";L.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,X);L.appendChild(Y);H.stop()}if(null!=L)if(L.style.background="transparent",L.innerText="",null==R||R.folder||/\.drawiolib$/.test(R.name))S(mxResources.get("noPreview"));else try{null!=R.remoteItem&&(R=R.remoteItem),W=R,H.spin(L),q(R,function(X){H.stop();
+if(W==R)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var Y=X.getElementsByTagName("diagram");N=AspectDialog.prototype.createViewer(L,0==Y.length?X.documentElement:Y[0],null,"transparent")}},function(){I=null;S(mxResources.get("notADiagramFile"))})}catch(X){I=null,S(mxResources.get("notADiagramFile"))}}function E(){var R=l(".odFilesBreadcrumb");if(null!=R){R.innerText="";for(var S=0;S<P.length-1;S++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=
+mxUtils.htmlEntities(P[S].name||mxResources.get("home"));R.appendChild(X);(function(aa,ba){X.addEventListener("click",function(){d(null);P=P.slice(0,ba);G(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(P[S],S);var Y=document.createElement("span");Y.innerHTML=" &gt; ";R.appendChild(Y)}null!=P[P.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==P.length?mxResources.get("officeSelDiag"):P[P.length-1].name||mxResources.get("home")),R.appendChild(S))}}function F(){if(null!=
+I&&!Q)if("sharepoint"==M)G("site",null,I.id,I.displayName);else if("site"==M)G("subsite",null,I.id,I.name);else{var R=I.folder;I=I.remoteItem?I.remoteItem:I;var S=(I.parentReference?I.parentReference.driveId:null)||M,X=I.id;R?G(S,X,null,I.name):t()}}function G(R,S,X,Y,aa){function ba(Ia){H.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var oa=null,qa=0,Ja=0;null!=Ia&&Ja<Ia.length;Ja++){var ra=Ia[Ja];if(1!=ha||!ra.webUrl||0<ra.webUrl.indexOf("sharepoint.com/sites/")||
+0>ra.webUrl.indexOf("sharepoint.com/")){var Ba=ra.displayName||ra.name,Aa=mxUtils.htmlEntities(ra.description||Ba);ha&&(ra.folder=2==ha?{isRoot:!0}:!0);var Ka=null!=ra.folder;if(!C||Ka){var ma=document.createElement("tr");ma.className=qa++%2?"odOddRow":"odEvenRow";var fa=document.createElement("td");fa.style.width="36px";var ca=document.createElement("img");ca.src="/images/"+(Ka?"folder.png":"file.png");ca.className="odFileImg";fa.appendChild(ca);ma.appendChild(fa);fa=document.createElement("td");
+Ka=document.createElement("div");Ka.className="odFileTitle";Ka.innerHTML=mxUtils.htmlEntities(Ba);Ka.setAttribute("title",Aa);fa.appendChild(Ka);ma.appendChild(fa);Ca.appendChild(ma);null==oa&&(oa=ma,oa.className+=" odRowSelected",I=ra,M=R,g||d(I));(function(na,la){ma.addEventListener("dblclick",F);ma.addEventListener("click",function(){oa!=la&&(oa.className=oa.className.replace("odRowSelected",""),oa=la,oa.className+=" odRowSelected",I=na,M=R,g||d(I))})})(ra,ma)}}}0==qa?(Ia=document.createElement("div"),
+Ia.className="odEmptyFolder",Ia.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ua.appendChild(Ia)):ua.appendChild(Ca);E();Q=!1}function da(Ia){e(Ia?Ia:ka,function(Ca){if(Z){var oa=Ca.value||[];if(g||ha)Array.prototype.push.apply(Na,oa);else for(var qa=0;qa<oa.length;qa++){var Ja=oa[qa],ra=Ja.file?Ja.file.mimeType:null;(Ja.folder||"text/html"==ra||"text/xml"==ra||"application/xml"==ra||"image/png"==ra||/\.svg$/.test(Ja.name)||/\.html$/.test(Ja.name)||/\.xml$/.test(Ja.name)||
+/\.png$/.test(Ja.name)||/\.drawio$/.test(Ja.name)||/\.drawiolib$/.test(Ja.name))&&Na.push(Ja)}Ca["@odata.nextLink"]&&1E3>Na.length?da(Ca["@odata.nextLink"]):(clearTimeout(ea),ba(Na))}},function(Ca){if(Z){clearTimeout(ea);var oa=null;try{oa=JSON.parse(Ca.responseText).error.message}catch(qa){}z(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=oa?" ("+oa+")":""));Q=!1;H.stop()}},null!=Ia)}if(!Q){l(".odCatsList").style.display="block";l(".odFilesSec").style.display="block";
+null!=L&&(L.innerText="",L.style.top="50%");var Z=Q=!0,ha=0;U=arguments;var ea=setTimeout(function(){Q=Z=!1;H.stop();z(mxResources.get("timeout"))},2E4),ua=l(".odFilesList");ua.innerText="";H.spin(ua);switch(R){case "recent":P=[{name:mxResources.get("recent",null,"Recent"),driveId:R}];var ya=k()||{},xa=[],va;for(va in ya)xa.push(ya[va]);clearTimeout(ea);ba(xa);return;case "shared":var ka="/me/drive/sharedWithMe";P=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:R}];break;case "sharepoint":ka=
+"/sites?search=";P=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:R}];ha=1;break;case "site":P.push({name:Y,driveId:R,folderId:S,siteId:X});ka="/sites/"+X+"/drives";ha=2;break;case "subsite":P.push({name:Y,driveId:R,folderId:S,siteId:X});ka="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":R=M;P=[{driveId:R,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));ka=R?"/drives/"+R+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+
+aa+"')";break;default:null==S?P=[{driveId:R}]:P.push({name:Y,driveId:R,folderId:S}),ka=(R?"/drives/"+R:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ha||(ka+=(0<ka.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Na=[];da()}}function y(R){V.className=V.className.replace("odCatSelected","");V=R;V.className+=" odCatSelected"}function T(R){Q||(O=null,G("search",null,null,null,
+R))}var n="";null==d&&(d=x,n='<div style="text-align: center;" class="odPreview"></div>');null==k&&(k=function(){var R=null;try{R=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return R});null==m&&(m=function(R){if(null!=R){var S=k()||{};delete R["@microsoft.graph.downloadUrl"];S[R.id]=R;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});n='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+
-mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+u+(d?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(E?"save":"open"))+"</button>":"");var z=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();z=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
-(z?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(z?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,K=null,H=null,N=null,U=!1,Q=[],V=null,W=null;this.getSelectedItem=function(){null!=H&&m(H);return H};if(null==p("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");t.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(z))}b.innerHTML=
-u;var L=p(".odPreview"),T=p("#odFiles");b=function(P,R){R=R||document;return R.querySelectorAll(P)}(".odCatListTitle");for(u=0;u<b.length;u++)b[u].addEventListener("click",function(){H=W=null;if(!U)switch(G(this),this.id){case "odFiles":M();break;case "odRecent":M("recent");break;case "odShared":M("shared");break;case "odSharepoint":M("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(P){var R=this;null!=O&&clearTimeout(O);13==P.keyCode?S(R.value):O=setTimeout(function(){S(R.value)},
-500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),M.apply(this,V))});d&&p("#odBackBtn").addEventListener("click",d);g&&p("#odSubmitBtn").addEventListener("click",A);null!=n?(d=n.pop(),"sharepoint"==n[0].driveId&&G(p("#odSharepoint")),Q=n,M(d.driveId,d.folderId,d.siteId,d.name)):M()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+n+(A?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(B?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(C?"save":"open"))+"</button>":"");var v=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();v=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+(v?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(v?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
+var H=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,N=null,I=null,M=null,Q=!1,P=[],U=null,W=null;this.getSelectedItem=function(){null!=I&&m(I);return I};if(null==l("#mxODPickerCss")){var p=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");p.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(v))}b.innerHTML=
+n;var L=l(".odPreview"),V=l("#odFiles");b=function(R,S){S=S||document;return S.querySelectorAll(R)}(".odCatListTitle");for(n=0;n<b.length;n++)b[n].addEventListener("click",function(){I=W=null;if(!Q)switch(y(this),this.id){case "odFiles":G();break;case "odRecent":G("recent");break;case "odShared":G("shared");break;case "odSharepoint":G("sharepoint")}});var O=null;l("#odSearchBox").addEventListener("keyup",function(R){var S=this;null!=O&&clearTimeout(O);13==R.keyCode?T(S.value):O=setTimeout(function(){T(S.value)},
+500)});l("#refreshOD").addEventListener("click",function(){null!=U&&(d(null),G.apply(this,U))});A&&l("#odBackBtn").addEventListener("click",A);B&&l("#odSubmitBtn").addEventListener("click",t);null!=f?(A=f.pop(),"sharepoint"==f[0].driveId&&y(l("#odSharepoint")),P=f,G(A.driveId,A.folderId,A.siteId,A.name)):G()};App=function(b,d,e){EditorUi.call(this,b,d,null!=e?e:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var k={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
-c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(l.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(l)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
+c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(k.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(k)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.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(c,l,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var v=null;try{v=window.open(c)}catch(x){}null==v||void 0===v?this.showDialog((new PopupDialog(this,c,l,m)).container,320,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,k,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var u=null;try{u=window.open(c)}catch(z){}null==u||void 0===u?this.showDialog((new PopupDialog(this,c,k,m)).container,320,140,!0,!0):null!=k&&k()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
-App.loadScripts=function(b,e){for(var f=b.length,c=0;c<b.length;c++)mxscript(b[c],function(){0==--f&&null!=e&&e()})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),f=0;f<e.length;f++){var c=mxUtils.trim(e[f]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",b))}return b};
+App.loadScripts=function(b,d){for(var e=b.length,c=0;c<b.length;c++)mxscript(b[c],function(){0==--e&&null!=d&&d()})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var c=mxUtils.trim(d[e]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};
-App.main=function(b,e){function f(d){mxUtils.getAll("1"!=urlParams.dev?[d]:[d,STYLE_PATH+"/default.xml"],function(g){function k(){var A=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.clearServiceWorker=function(b,d){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var c=0;c<e.length;c++)e[c].unregister();null!=b&&b()}})["catch"](function(){null!=d&&d()})};App.isSameDomain=function(b){var d=document.createElement("a");d.href=b;return d.protocol===window.location.protocol||d.host===window.location.host};App.isBuiltInPlugin=function(b){for(var d in App.pluginRegistry)if(App.pluginRegistry[d]==b)return!0;return!1};
+App.main=function(b,d){function e(A){mxUtils.getAll("1"!=urlParams.dev?[A]:[A,STYLE_PATH+"/default.xml"],function(B){function J(){var t=null!=d?d():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(A);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[A,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var q=localStorage.getItem(Editor.configurationKey);if(null!=q)try{var p=JSON.parse(q),y;for(y in n.merge)p[y]=n.merge[y];n=p}catch(A){window.location.hash="",alert(A)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(A){window.location.hash=
-"",alert(A)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=
-function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var d=parseInt(mxSettings.settings.autosaveDelay);!isNaN(d)&&0<d?(DrawioFile.prototype.autosaveDelay=d,EditorUi.debug("Setting autosaveDelay",
-d)):EditorUi.debug("Invalid autosaveDelay",d)}null!=mxSettings.settings.defaultEdgeLength&&(d=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(d)&&0<d?(Graph.prototype.defaultEdgeLength=d,EditorUi.debug("Using defaultEdgeLength",d)):EditorUi.debug("Invalid defaultEdgeLength",d))}}catch(k){null!=window.console&&console.error(k)}if(null!=Menus.prototype.defaultFonts)for(d=0;d<Menus.prototype.defaultFonts.length;d++){var g=Menus.prototype.defaultFonts[d];"string"!==typeof g&&null!=g.fontFamily&&
-null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(d,g,k,n,q){EditorUi.logError("Global: "+(null!=d?d:""),g,k,n,q,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=
-document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
-CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
-/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(d){null!=window.console&&console.error(d)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
-urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){l=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var v=JSON.parse(localStorage.getItem(mxSettings.key));null!=v&&(l=v.plugins)}catch(d){}v=urlParams.p;App.initPluginCallback();null!=v&&App.loadPlugins(v.split(";"));if(null!=
-l&&0<l.length&&"0"!=urlParams.plugins)for(v=0;v<l.length;v++)try{("/"==l[v].charAt(0)&&(l[v]=PLUGINS_BASE_PATH+l[v]),App.isSameDomain(l[v]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(l[v])?null==App.pluginsLoaded[l[v]]&&(App.pluginsLoaded[l[v]]=!0,App.embedModePluginsCount++,mxscript(l[v])):null!=window.console&&console.log("Unknown plugin:",l[v]):null!=window.console&&console.log("Blocked plugin:",l[v])}catch(d){}}"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 x=window.opener||window.parent,E=function(d){if(d.source==x)try{var g=JSON.parse(d.data);null!=g&&"configure"==
-g.action&&(mxEvent.removeListener(window,"message",E),Editor.configure(g.config),mxSettings.load(),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,d.data)}};mxEvent.addListener(window,"message",E);x.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
-mxSettings.load()}catch(d){null!=window.console&&console.error(d)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(v=localStorage.getItem(Editor.configurationKey),null!=v))try{v=JSON.parse(v),null!=v&&(EditorUi.debug("Using local configuration",v),Editor.configure(v),mxSettings.load())}catch(d){null!=window.console&&console.error(d)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(t);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[t,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(B[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var f=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=f){EditorUi.debug("Setting configuration",JSON.stringify(f));if(null!=f.merge){var g=localStorage.getItem(Editor.configurationKey);if(null!=g)try{var l=JSON.parse(g),q;for(q in f.merge)l[q]=f.merge[q];f=l}catch(t){window.location.hash="",alert(t)}else f=f.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(f)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(t){window.location.hash=
+"",alert(t)}1<B.length&&(Graph.prototype.defaultThemes["default-style2"]=B[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=B[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?J():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],J))},function(B){B=document.getElementById("geStatus");null!=B&&(B.innerHTML="Error loading page. <a>Please try refreshing.</a>",B.getElementsByTagName("a")[0].onclick=
+function(){mxLanguage="en";e(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";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(J){null!=window.console&&console.error(J)}if(null!=Menus.prototype.defaultFonts)for(A=0;A<Menus.prototype.defaultFonts.length;A++){var B=Menus.prototype.defaultFonts[A];"string"!==typeof B&&null!=B.fontFamily&&
+null!=B.fontUrl&&Graph.addFont(B.fontFamily,B.fontUrl)}mxResources.loadDefaultBundle=!1;e(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(A,B,J,f,g){EditorUi.logError("Global: "+(null!=A?A:""),B,J,f,g,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=
+document.getElementById("geInfo");null!=k&&k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){k=document.getElementsByTagName("script");if(null!=k&&0<k.length){var m=mxUtils.getTextContent(k[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
+CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=k&&1<k.length&&(m=mxUtils.getTextContent(k[k.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
+/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(A){null!=window.console&&console.error(A)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
+urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var u=JSON.parse(localStorage.getItem(mxSettings.key));null!=u&&(k=u.plugins)}catch(A){}u=urlParams.p;App.initPluginCallback();null!=u&&App.loadPlugins(u.split(";"));if(null!=
+k&&0<k.length&&"0"!=urlParams.plugins)for(u=0;u<k.length;u++)try{("/"==k[u].charAt(0)&&(k[u]=PLUGINS_BASE_PATH+k[u]),App.isSameDomain(k[u]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(k[u])?null==App.pluginsLoaded[k[u]]&&(App.pluginsLoaded[k[u]]=!0,App.embedModePluginsCount++,mxscript(k[u])):null!=window.console&&console.log("Unknown plugin:",k[u]):null!=window.console&&console.log("Blocked plugin:",k[u])}catch(A){}}"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 z=window.opener||window.parent,C=function(A){if(A.source==z)try{var B=JSON.parse(A.data);null!=B&&"configure"==
+B.action&&(mxEvent.removeListener(window,"message",C),Editor.configure(B.config),mxSettings.load(),B.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(J){null!=window.console&&console.log("Error in configure message: "+J,A.data)}};mxEvent.addListener(window,"message",C);z.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+mxSettings.load()}catch(A){null!=window.console&&console.error(A)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(u=localStorage.getItem(Editor.configurationKey),null!=u))try{u=JSON.parse(u),null!=u&&(EditorUi.debug("Using local configuration",u),Editor.configure(u),mxSettings.load())}catch(A){null!=window.console&&console.error(A)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=";
App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC";
App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==";
App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=";
App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",
-b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,d){EditorUi.debug("Loading plugins",b);for(var e=0;e<b.length;e++)if(null!=b[e]&&0<b[e].length)try{if(null!=App.pluginRegistry[b[e]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[e]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(c):mxscript(c):d?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[e])}catch(k){null!=window.console&&console.log("Error loading plugin:",
+b[e],k)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",
-mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
-this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(m){null!=window.console&&console.error(m)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var m=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
-this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,m),window.DrawGapiClientCallback=null):m()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
+mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var d=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
+this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(m){null!=window.console&&console.error(m)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var m=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,m),window.DrawGapiClientCallback=null):m()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(m){null!=window.console&&console.error(m)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(m){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){m.prompt()})})),mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var m=this.getCurrentFile();m=null!=m?m.getMode():null;"1"==urlParams.extAuth||m!=App.MODE_DEVICE&&m!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
-"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var l=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var m=this.getCurrentFile();null!=m&&null!=m.sync&&(m.sync.destroy(),m.sync=null,m=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+m+'" class="geStatusAlert">'+m+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
-(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(m){window.clearTimeout(l)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
+"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var k=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var m=this.getCurrentFile();null!=m&&null!=m.sync&&(m.sync.destroy(),m.sync=null,m=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+m+'" class="geStatusAlert">'+m+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
+(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(m){window.clearTimeout(k)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(m){this.appIconClicked(m)})),
this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};
App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
-App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var e={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
-b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(e.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+
-"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(e);e=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(e=this.timeSince(b.lastSaved),null==e&&(e=mxResources.get("lessThanAMinute")),e=mxResources.get("lastSaved",[e]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),e,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=
+App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var d={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
+b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(d.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+
+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(d);d=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(d=this.timeSince(b.lastSaved),null==d&&(d=mxResources.get("lessThanAMinute")),d=mxResources.get("lastSaved",[d]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),d,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=
this.mode&&b.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||"app.diagrams.net"==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.showNameChangeBanner=function(){this.showBanner("DiagramsFooter","draw.io is now diagrams.net",mxUtils.bind(this,function(){this.openLink("https://www.diagrams.net/blog/move-diagrams-net")}))};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}))};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(e);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var f=document.createElement("img");
-f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute("title","1 star");f.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");f.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(l);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","4 star");m.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(m);this.bannerShowing=!0;var v=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(x){mxEvent.consume(x);v()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");v()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){v()}),1E3)});window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var v=JSON.parse(m);null!=v&&this.handleLicense(v,
-c)}}}catch(x){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var f=0;f<e.length;f++)e[f].id==b.id&&e.splice(f,1);null!=e&&(e.unshift(b),e=e.slice(0,10),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(e){}return null}};
-App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(d);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var e=document.createElement("img");
+e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.setAttribute("title","1 star");e.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(e);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(c);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","3 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(k);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","4 star");m.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(m);this.bannerShowing=!0;var u=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(z){mxEvent.consume(z);u()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);u()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(z){mxEvent.consume(z);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");u()}));d=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){u()}),1E3)});window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(d,6E4)}};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),d=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=d&&null!=b.id){var e=d.lastIndexOf("@"),c=0<=e?d.substring(e+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(k){try{if(200<=k.getStatus()&&299>=k.getStatus()){var m=k.getText();if(0<m.length){var u=JSON.parse(m);null!=u&&this.handleLicense(u,
+c)}}}catch(z){}}))}};App.prototype.handleLicense=function(b,d){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==b.id&&d.splice(e,1);null!=d&&(d.unshift(b),d=d.slice(0,10),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(d){}return null}};
+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),m=mxUtils.bind(this,function(z){window.clearTimeout(l);c&&e(z)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,x=v.backgroundImage,E=null!=v.themes&&"darkTheme"==v.defaultThemeName;if(null!=this.pages&&(E||this.currentPage!=this.pages[0])){var d=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?v.setBackgroundImage(x):null!=g.viewState&&null!=g.viewState&&(x=g.viewState.backgroundImage,v.setBackgroundImage(x));v.getGlobalVariable=function(z){return"page"==z?g.getName():"pagenumber"==z?1:d.apply(this,arguments)};v.getGlobalVariable=d;document.body.appendChild(v.container);v.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(z){try{v!=this.editor.graph&&
-null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(F){z=null}m(z)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=v.getGraphBounds(),q=v.view.translate,p=v.view.scale;null!=x&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((q.x+x.x)*p,(q.y+x.y)*p,x.width*p,x.height*p)));var y=b/n.width;
-y=Math.min(1,Math.min(3*b/(4*n.height),y));var A=Math.floor(n.x),C=Math.floor(n.y);k.setAttribute("width",Math.ceil(y*(n.width+4)));k.setAttribute("height",Math.ceil(y*(n.height+4)));var B=k.getContext("2d");B.scale(y,y);B.translate(-A,-C);var I=v.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";B.save();B.fillStyle=I;B.fillRect(A,C,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=x){var M=new Image;M.src=x.src;B.drawImage(M,x.x*y,x.y*y,x.width*y,x.height*y)}var G=new mxJsCanvas(k),
-S=new mxAsyncCanvas(this.thumbImageCache);G.images=this.thumbImageCache.images;var u=new mxImageExport;u.drawShape=function(z,F){z.shape instanceof mxShape&&z.shape.checkBounds()&&(F.save(),F.translate(.5,.5),z.shape.paint(F),F.translate(-.5,-.5),F.restore())};u.drawText=function(z,F){};u.drawState(v.getView().getState(v.model.root),S);S.finish(mxUtils.bind(this,function(){try{u.drawState(v.getView().getState(v.model.root),G),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(z){k=
-null}m(k)}));f=!0}}catch(z){f=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(m){}}})();
-App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),f=null!=e?e.getMode():null;f==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?null!=
-e&&null!=e.meta&&null!=e.meta.webUrl?(f=e.meta.webUrl,e=encodeURIComponent(e.meta.name),f.substring(f.length-e.length,f.length)==e&&(f=f.substring(0,f.length-e.length)),this.openLink(f)):this.openLink("https://onedrive.live.com/"):f==App.MODE_DROPBOX?null!=e&&null!=e.stat&&null!=e.stat.path_display?(f="https://www.dropbox.com/home/Apps/drawio"+e.stat.path_display,mxEvent.isShiftDown(b)||(f=f.substring(0,f.length-e.stat.name.length)),this.openLink(f)):this.openLink("https://www.dropbox.com/"):f==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):f==App.MODE_GITHUB?null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"):f==App.MODE_GITLAB?null!=e&&e.constructor==GitLabFile?this.openLink(e.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):f==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
-App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var e=b.indexOf("#");0<e&&(b=b.substring(0,e))}return b};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var e=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(f,c,l){this.spinner.stop();null==c&&(c=urlParams.title,l=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,f,c):new LocalFile(this,f,c,l))}))}}catch(f){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=d&&(b=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
+App.prototype.getThumbnail=function(b,d){var e=!1;try{var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(null)}),this.timeout),m=mxUtils.bind(this,function(v){window.clearTimeout(k);c&&d(v)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,z=u.backgroundImage,C=null!=u.themes&&"darkTheme"==u.defaultThemeName;if(null!=this.pages&&(C||this.currentPage!=this.pages[0])){var A=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?u.setBackgroundImage(z):null!=B.viewState&&null!=B.viewState&&(z=B.viewState.backgroundImage,u.setBackgroundImage(z));u.getGlobalVariable=function(v){return"page"==v?B.getName():"pagenumber"==v?1:A.apply(this,arguments)};u.getGlobalVariable=A;document.body.appendChild(u.container);u.model.setRoot(B.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(v){try{u!=this.editor.graph&&
+null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(H){v=null}m(v)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,u,null,null,null,null,"diagram",null),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var J=document.createElement("canvas"),f=u.getGraphBounds(),g=u.view.translate,l=u.view.scale;null!=z&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((g.x+z.x)*l,(g.y+z.y)*l,z.width*l,z.height*l)));var q=b/f.width;
+q=Math.min(1,Math.min(3*b/(4*f.height),q));var t=Math.floor(f.x),x=Math.floor(f.y);J.setAttribute("width",Math.ceil(q*(f.width+4)));J.setAttribute("height",Math.ceil(q*(f.height+4)));var E=J.getContext("2d");E.scale(q,q);E.translate(-t,-x);var F=u.background;if(null==F||""==F||F==mxConstants.NONE)F="#ffffff";E.save();E.fillStyle=F;E.fillRect(t,x,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=z){var G=new Image;G.src=z.src;E.drawImage(G,z.x*q,z.y*q,z.width*q,z.height*q)}var y=new mxJsCanvas(J),
+T=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var n=new mxImageExport;n.drawShape=function(v,H){v.shape instanceof mxShape&&v.shape.checkBounds()&&(H.save(),H.translate(.5,.5),v.shape.paint(H),H.translate(-.5,-.5),H.restore())};n.drawText=function(v,H){};n.drawState(u.getView().getState(u.model.root),T);T.finish(mxUtils.bind(this,function(){try{n.drawState(u.getView().getState(u.model.root),y),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(v){J=
+null}m(J)}));e=!0}}catch(v){e=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}e||window.clearTimeout(k);return e};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(d,e){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();d=null!=c?c.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
+this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=d==App.MODE_DEVICE?"pointer":"default")}if(e)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+d+"; expires="+k.toUTCString()}}catch(m){}}})();
+App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d&&null!=d.desc&&null!=d.desc.parents&&0<d.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):null!=d&&null!=d.getId()?this.openLink("https://drive.google.com/open?id="+d.getId()):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_ONEDRIVE?null!=
+d&&null!=d.meta&&null!=d.meta.webUrl?(e=d.meta.webUrl,d=encodeURIComponent(d.meta.name),e.substring(e.length-d.length,e.length)==d&&(e=e.substring(0,e.length-d.length)),this.openLink(e)):this.openLink("https://onedrive.live.com/"):e==App.MODE_DROPBOX?null!=d&&null!=d.stat&&null!=d.stat.path_display?(e="https://www.dropbox.com/home/Apps/drawio"+d.stat.path_display,mxEvent.isShiftDown(b)||(e=e.substring(0,e.length-d.stat.name.length)),this.openLink(e)):this.openLink("https://www.dropbox.com/"):e==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):e==App.MODE_GITHUB?null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"):e==App.MODE_GITLAB?null!=d&&d.constructor==GitLabFile?this.openLink(d.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):e==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
+App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var d=b.indexOf("#");0<d&&(b=b.substring(0,d))}return b};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var d=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(e,c,k){this.spinner.stop();null==c&&(c=urlParams.title,k=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,e,c):new LocalFile(this,e,c,k))}))}}catch(e){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),e||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&f.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,d){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),d||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&e.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
-App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},
+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";d.style.maxWidth="80%";d.style.width="max-content";d.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");d.appendChild(b);mxEvent.addListener(b,"click",function(e){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(e))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,v,x,E,d){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),v,x,E,d,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(m){var v=this.getCurrentFile();EditorUi.debug("storage event",[m],[v]);null!=v&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=v.draftId&&(this.draftAliveCheck=m.newValue,v.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog();
-var v=this.getDiagramId(),x=this.getCurrentFile();null!=x&&x.getHash()==v||this.loadFile(v,!0)}catch(E){null!=document.body&&this.handleError(E,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m,
-mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(E){Editor.isPngDataUrl(E)&&(E=Editor.extractGraphModelFromPng(E));var d=urlParams.title;d=null!=d?decodeURIComponent(d):
-this.defaultFilename;E=new LocalFile(this,E,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(E.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(E);this.getCurrentFile().setModified(!this.editor.chromeless)}),v=window.opener||window.parent;if(v!=window){var x=urlParams.create;null!=x?m(v[decodeURIComponent(x)]):(x=urlParams.data,null!=x?m(decodeURIComponent(x)):this.installMessageHandler(mxUtils.bind(this,function(E,d){d.source==v&&m(E)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)x=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=x;else{x=!1;try{x=null!=window.opener&&null!=window.opener.openFile}catch(E){}x?this.spinner.spin(document.body,mxResources.get("loading")):(x=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=x&&0!=x.length||this.editor.isChromelessView()?null!=x&&0<x.length?this.loadFile(x,null,null,mxUtils.bind(this,
-function(){var E=decodeURIComponent(urlParams.viewbox||"");if(""!=E)try{var d=JSON.parse(E);this.editor.graph.fitWindow(d,d.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var v=urlParams.title;v=null!=v?decodeURIComponent(v):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var x=4>=
-m?2:6<m?4:3;v=new CreateDialog(this,v,mxUtils.bind(this,function(E,d){if(null==d){this.hideDialog();var g=Editor.useLocalStorage;this.createFile(0<E.length?E:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(E,this.getFileData(!0),null,d,null,!0,k)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,x,null,null,null,this.editor.fileExtensions);this.showDialog(v.container,420,m>x?
-390:280,!0,!1,mxUtils.bind(this,function(E){E&&null==this.getCurrentFile()&&this.showSplash()}));v.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),
-c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
-e())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var v=0;v<m.length;v++)try{var x=m[v].key;if(null!=x&&".draft_"==x.substring(0,7)){var E=JSON.parse(m[v].data);null!=E&&"draft"==E.type&&E.aliveCheck!=e&&(null==b&&null==E.fileObject||null!=E.fileObject&&E.fileObject.path==b)&&(E.key=x,l.push(E))}}catch(d){}c()},c))}catch(m){c()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key);null!=l&&l()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<e.length?e:null);this.showDialog(f.container,
-640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var e=this.getServiceCount(!0),f=mxUtils.bind(this,function(){var l=new SplashDialog(this);this.showDialog(l.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(m){m&&!mxClient.IS_CHROMEAPP&&(m=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=m)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<e?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor=
-"pointer",c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
-var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var v=mxUtils.getOffset(c);m.popup(v.x,v.y+c.offsetHeight,null,l);this.setCurrentMenu(m)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=e){var v=m.target.result;"image/png"==c.type&&(v=this.extractGraphModelFromPng(v));e(new LocalFile(this,v,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(x){f(x)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
-"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};
-App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,
-l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(v){null!=v&&0<v.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(v[0])}),
-mxUtils.bind(this,function(v){"AbortError"!=v.name&&this.handleError(v)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,E){StorageFile.getFileContent(this,v,x,E)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,E){StorageFile.deleteFile(this,v,x,E)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(v,x){var E=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=x.substring(x.length-4)||(x=x.substring(0,x.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,v,x):new LocalFile(this,v,x))}),d=this.getCurrentFile();null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=
-c;m.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(v){this.handleError(v)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(l,m){if(null!=m)try{this.loadLibrary(m)}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&e.getLibrary(l,mxUtils.bind(this,function(v){this.spinner.stop();try{this.loadLibrary(v)}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(v){this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=
-f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var v=new FileReader;v.onload=mxUtils.bind(this,function(x){try{this.loadLibrary(new LocalLibrary(this,x.target.result,m.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}});v.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(l,m){StorageFile.listFiles(this,"L",l,m)});window.openBrowserFile=mxUtils.bind(this,function(l,m,v){StorageFile.getFileContent(this,l,m,v)});window.deleteBrowserFile=mxUtils.bind(this,function(l,m,v){StorageFile.deleteFile(this,l,m,v)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(l){this.hideDialog(l)}));window.openFile.setConsumer(mxUtils.bind(this,function(l,m){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,l,m):new LocalLibrary(this,l,m))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,e,f,c,l,m,v){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var x=this.createLibraryDataFromImages(e),E=mxUtils.bind(this,function(k){this.spinner.stop();null!=v&&v();this.handleError(k,null!=k?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,x,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(k){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,x,k,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_BROWSER?(k=mxUtils.bind(this,function(){var n=new StorageLibrary(this,x,b);n.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(n,e)}),E)}),null==localStorage.getItem(b)?
-k():this.confirm(mxResources.get("replaceIt",[b]),k)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(x);var d=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,e);null!=v&&v()}),E)});if(b!=f.getTitle()){var g=f.getHash();f.rename(b,mxUtils.bind(this,function(k){f.constructor!=LocalLibrary&&g!=f.getHash()&&
-(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(g);d()}),E)}else d()}}catch(k){this.handleError(k)}};
-App.prototype.saveFile=function(b,e){var f=this.getCurrentFile();if(null!=f){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(E,d){f.invalidFileHandle=null;f.fileHandle=E;f.title=d.name;f.desc=d;this.save(d.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,v=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var x=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(E,d,g){null!=E&&0<E.length&&(/(\.pdf)$/i.test(E)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){g.value=E.split(".").slice(0,-1).join(".");g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==v&&d==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,n){f.fileHandle=k;f.mode=App.MODE_DEVICE;f.title=n.name;
-f.desc=n;this.setMode(App.MODE_DEVICE);this.save(n.name,c)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(E)):(this.setMode(App.MODE_DEVICE),this.save(E,c)):"download"==d?(new LocalFile(this,null,E)).save():"_blank"==d?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):v!=d?this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(E,
-this.getFileData(/(\.xml)$/i.test(E)||0>E.indexOf(".")||/(\.drawio)$/i.test(E),/(\.svg)$/i.test(E),/(\.html)$/i.test(E)),null,d,c,null==this.mode,k)})):null!=d&&this.save(E,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,x,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>x?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}};
-App.prototype.loadTemplate=function(b,e,f,c,l){var m=!1,v=b,x=null!=c?c:b,E=/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x);c=/\.png$/i.test(x)||/\.pdf$/i.test(x);this.editor.isCorsEnabledForUrl(v)||(m=c||E,v="t="+(new Date).getTime(),v=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+v+(m?"&base64=1":""));this.editor.loadUrl(v,mxUtils.bind(this,function(d){try{var g=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(E||this.isVisioData(g))E||(x=l?this.isRemoteVisioData(g)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(k){e(k)},f,x);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,x))this.isExternalDataComms()?this.parseFileData(g,mxUtils.bind(this,function(k){4==k.readyState&&200<=k.status&&299>=k.status&&"<mxGraphModel"==k.responseText.substring(0,13)&&e(k.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);
-else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(k){e(k)}),mxUtils.bind(this,function(k){f(k)}));else{if(/(\.png)($|\?)/i.test(x)||Editor.isPngData(g))g=Editor.extractGraphModelFromPng(d);e(g)}}catch(k){f(k)}}),f,/(\.png)($|\?)/i.test(x)||/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x),null,null,m)};
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,u,z,C,A){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),u,z,C,A,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(m){var u=this.getCurrentFile();EditorUi.debug("storage event",[m],[u]);null!=u&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=u.draftId&&(this.draftAliveCheck=m.newValue,u.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog();
+var u=this.getDiagramId(),z=this.getCurrentFile();null!=z&&z.getHash()==u||this.loadFile(u,!0)}catch(C){null!=document.body&&this.handleError(C,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var A=this.getCurrentFile();window.location.hash=null!=A?A.getHash():""}))}}))}"1"==urlParams["live-ui"]&&"sketch"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("sketch",0));if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),
+null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var d=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 m=mxUtils.bind(this,
+function(C){Editor.isPngDataUrl(C)&&(C=Editor.extractGraphModelFromPng(C));var A=urlParams.title;A=null!=A?decodeURIComponent(A):this.defaultFilename;C=new LocalFile(this,C,A,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(C.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(C);this.getCurrentFile().setModified(!this.editor.chromeless)}),u=window.opener||window.parent;if(u!=window){var z=urlParams.create;null!=z?m(u[decodeURIComponent(z)]):(z=
+urlParams.data,null!=z?m(decodeURIComponent(z)):this.installMessageHandler(mxUtils.bind(this,function(C,A){A.source==u&&m(C)})))}}else if(null==this.dialog)if("1"==urlParams.demo)z=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=z;else{z=!1;try{z=null!=window.opener&&null!=window.opener.openFile}catch(C){}z?this.spinner.spin(document.body,mxResources.get("loading")):(z=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||
+"draw.io"!=this.getServiceName()||null!=z&&0!=z.length||this.editor.isChromelessView()?null!=z&&0<z.length?this.loadFile(z,null,null,mxUtils.bind(this,function(){var C=decodeURIComponent(urlParams.viewbox||"");if(""!=C)try{var A=JSON.parse(C);this.editor.graph.fitWindow(A,A.border)}catch(B){console.error(B)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),
+e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);
+this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var z=4>=m?2:6<m?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(C,A){if(null==A){this.hideDialog();var B=Editor.useLocalStorage;this.createFile(0<C.length?C:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=B}else this.pickFolder(A,mxUtils.bind(this,function(J){this.createFile(C,this.getFileData(!0),null,
+A,null,!0,J)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,z,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,m>z?390:280,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?k(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(m){k(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):
+(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&
+(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),d())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,d){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&(e.fileChanged(),null!=d&&d())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,d,e){function c(){e(k)}var k=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var u=0;u<m.length;u++)try{var z=m[u].key;if(null!=z&&".draft_"==z.substring(0,7)){var C=JSON.parse(m[u].data);null!=C&&"draft"==C.type&&C.aliveCheck!=d&&(null==b&&null==C.fileObject||null!=C.fileObject&&C.fileObject.path==b)&&(C.key=z,k.push(C))}}catch(A){}c()},c))}catch(m){c()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(d){if(1==d.length)this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)}));else if(1<d.length){var e=new Date(d[0].modified);e=new DraftDialog(this,1<d.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<d.length?null:d[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(d[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key)}))}),mxUtils.bind(this,function(c,k){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key);null!=k&&k()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<d.length?d:null);this.showDialog(e.container,
+640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));e.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(d){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var d=this.getServiceCount(!0),e=mxUtils.bind(this,function(){var k=new SplashDialog(this);this.showDialog(k.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(m){m&&!mxClient.IS_CHROMEAPP&&(m=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=m)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&e();else{b=4==d?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),b);this.showDialog(c.container,3>b?200:300,3<d?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,d,e){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor=
+"pointer",c.style.bottom="20px",c.style.right=null!=e?e:"22px",d&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=e?e:"24px",d=document.createElement("span"),d.style.display="inline-block",d.style.fontSize="12px",d.style.margin="2px 24px 0 0",d.style.userSelect="none",mxUtils.write(d,mxResources.get("language")),c.appendChild(d),d.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(k){this.editor.graph.popupMenuHandler.hideMenu();
+var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var u=mxUtils.getOffset(c);m.popup(u.x,u.y+c.offsetHeight,null,k);this.setCurrentMenu(m)})),b.appendChild(c));return c};
+App.prototype.loadFileSystemEntry=function(b,d,e){e=null!=e?e:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var k=new FileReader;k.onload=mxUtils.bind(this,function(m){try{if(null!=d){var u=m.target.result;"image/png"==c.type&&(u=this.extractGraphModelFromPng(u));d(new LocalFile(this,u,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(z){e(z)}});k.onerror=e;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
+"image/svg"===c.type.substring(0,9)?k.readAsText(c):k.readAsDataURL(c)}),e)}catch(c){e(c)}};
+App.prototype.createFileSystemOptions=function(b){var d=[],e=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(e=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var k={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};k.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==e?d.splice(0,0,
+k):this.editor.diagramFileTypes[c].extension==e?d.splice(0,0,k):d.push(k)}return{types:d,fileName:b}};App.prototype.showSaveFilePicker=function(b,d,e){d=null!=d?d:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});e=null!=e?e:this.createFileSystemOptions();window.showSaveFilePicker(e).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(k){b(c,k)}),d)}),d)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var d=this.getPeerForMode(b);if(null!=d)d.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(u){null!=u&&0<u.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(u[0])}),
+mxUtils.bind(this,function(u){"AbortError"!=u.name&&this.handleError(u)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var e=document.createElement("input");e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){null!=e.files&&(this.openFiles(e.files),e.type="",e.type="file",e.value="")}));e.style.display="none";document.body.appendChild(e);this.openFileInputElt=e}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(u,z){StorageFile.listFiles(this,"F",u,z)});window.openBrowserFile=mxUtils.bind(this,function(u,z,C){StorageFile.getFileContent(this,u,z,C)});window.deleteBrowserFile=mxUtils.bind(this,function(u,z,C){StorageFile.deleteFile(this,u,z,C)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(u,z){var C=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=z.substring(z.length-4)||(z=z.substring(0,z.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,u,z):new LocalFile(this,u,z))}),A=this.getCurrentFile();null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}));var k=this.dialog,m=k.close;this.dialog.close=mxUtils.bind(this,function(u){Editor.useLocalStorage=
+c;m.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(u){this.handleError(u)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var d=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(k,m){if(null!=m)try{this.loadLibrary(m)}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&d.getLibrary(k,mxUtils.bind(this,function(u){this.spinner.stop();try{this.loadLibrary(u)}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(u){this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var e=document.createElement("input");e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if(null!=
+e.files){for(var k=0;k<e.files.length;k++)mxUtils.bind(this,function(m){var u=new FileReader;u.onload=mxUtils.bind(this,function(z){try{this.loadLibrary(new LocalLibrary(this,z.target.result,m.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}});u.readAsText(m)})(e.files[k]);e.type="";e.type="file";e.value=""}}));e.style.display="none";document.body.appendChild(e);this.libFileInputElt=e}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(k,m){StorageFile.listFiles(this,"L",k,m)});window.openBrowserFile=mxUtils.bind(this,function(k,m,u){StorageFile.getFileContent(this,k,m,u)});window.deleteBrowserFile=mxUtils.bind(this,function(k,m,u){StorageFile.deleteFile(this,k,m,u)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(k){this.hideDialog(k)}));window.openFile.setConsumer(mxUtils.bind(this,function(k,m){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,k,m):new LocalLibrary(this,k,m))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,d,e,c,k,m,u){try{c=null!=c?c:this.mode;k=null!=k?k:!1;m=null!=m?m:!1;var z=this.createLibraryDataFromImages(d),C=mxUtils.bind(this,function(J){this.spinner.stop();null!=u&&u();this.handleError(J,null!=J?mxResources.get("errorSavingFile"):null)});null==e&&c==App.MODE_DEVICE&&(e=new LocalLibrary(this,z,b));if(null==e)this.pickFolder(c,mxUtils.bind(this,function(J){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,z,J,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,z,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+z,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,z,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,z,mxUtils.bind(this,function(f){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,z,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_BROWSER?(J=mxUtils.bind(this,function(){var f=new StorageLibrary(this,z,b);f.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(f,d)}),C)}),null==localStorage.getItem(b)?
+J():this.confirm(mxResources.get("replaceIt",[b]),J)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){e.setData(z);var A=mxUtils.bind(this,function(){e.save(!0,mxUtils.bind(this,function(J){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(e,d);null!=u&&u()}),C)});if(b!=e.getTitle()){var B=e.getHash();e.rename(b,mxUtils.bind(this,function(J){e.constructor!=LocalLibrary&&B!=e.getHash()&&
+(mxSettings.removeCustomLibrary(B),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(B);A()}),C)}else A()}}catch(J){this.handleError(J)}};
+App.prototype.saveFile=function(b,d){var e=this.getCurrentFile();if(null!=e){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&e.removeDraft();this.getCurrentFile()==e||e.isModified()||(e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(b||null==e.getTitle()||null!=e.invalidFileHandle||null==this.mode)if(null!=e&&e.constructor==LocalFile&&null!=e.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
+function(C,A){e.invalidFileHandle=null;e.fileHandle=C;e.title=A.name;e.desc=A;this.save(A.name,c)}),null,this.createFileSystemOptions(e.getTitle()));else{var k=null!=e.getTitle()?e.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,u=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var z=4>=b?2:6<b?4:3;k=new CreateDialog(this,k,mxUtils.bind(this,function(C,A,B){null!=C&&0<C.length&&(/(\.pdf)$/i.test(C)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){B.value=C.split(".").slice(0,-1).join(".");B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==u&&A==App.MODE_DEVICE?null!=e&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(J,f){e.fileHandle=J;e.mode=App.MODE_DEVICE;e.title=f.name;
+e.desc=f;this.setMode(App.MODE_DEVICE);this.save(f.name,c)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&this.handleError(J)}),this.createFileSystemOptions(C)):(this.setMode(App.MODE_DEVICE),this.save(C,c)):"download"==A?(new LocalFile(this,null,C)).save():"_blank"==A?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):u!=A?this.pickFolder(A,mxUtils.bind(this,function(J){this.createFile(C,
+this.getFileData(/(\.xml)$/i.test(C)||0>C.indexOf(".")||/(\.drawio)$/i.test(C),/(\.svg)$/i.test(C),/(\.html)$/i.test(C)),null,A,c,null==this.mode,J)})):null!=A&&this.save(C,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,z,null,null,null,this.editor.fileExtensions,!1);this.showDialog(k.container,420,b>z?390:280,!0,!0);k.init()}else this.save(e.getTitle(),c)}};
+App.prototype.loadTemplate=function(b,d,e,c,k){var m=!1,u=b,z=null!=c?c:b,C=/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z);c=/\.png$/i.test(z)||/\.pdf$/i.test(z);this.editor.isCorsEnabledForUrl(u)||(m=c||C,u="t="+(new Date).getTime(),u=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+u+(m?"&base64=1":""));this.editor.loadUrl(u,mxUtils.bind(this,function(A){try{var B=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(A):atob(A):A;if(C||this.isVisioData(B))C||(z=k?this.isRemoteVisioData(B)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(B)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(J){d(J)},e,z);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,z))this.isExternalDataComms()?this.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&200<=J.status&&299>=J.status&&"<mxGraphModel"==J.responseText.substring(0,13)&&d(J.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,e);
+else if(this.isLucidChartData(B))this.convertLucidChart(B,mxUtils.bind(this,function(J){d(J)}),mxUtils.bind(this,function(J){e(J)}));else{if(/(\.png)($|\?)/i.test(z)||Editor.isPngData(B))B=Editor.extractGraphModelFromPng(A);d(B)}}catch(J){e(J)}}),e,/(\.png)($|\?)/i.test(z)||/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z),null,null,m)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,e,f,c,l,m,v,x,E){c=x?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){d();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==v&&null!=this.stateArg&&null!=this.stateArg.folderId&&(v=this.stateArg.folderId),
-this.drive.insertFile(b,e,v,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,
-!1,v):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g):!x&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(d(),this.showSaveFilePicker(mxUtils.bind(this,
-function(k,n){var q=new LocalFile(this,e,n.name,null,k,n);q.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(q,f,m,l,E)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(d(),this.fileCreated(new LocalFile(this,e,b,null==c),f,m,l,E))}catch(k){d(),this.handleError(k)}}};
-App.prototype.fileCreated=function(b,e,f,c,l){var m=window.location.pathname;null!=e&&0<e.length&&(m+="?libs="+e);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var x=window.location.protocol+"//"+window.location.hostname+m,E=v,d=null;null!=v&&/\.svg$/i.test(b.getTitle())&&
-(d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),E=this.decodeNodeIntoGraph(E,d));b.setData(this.createFileData(v,d,b,x));null!=d&&d.container.parentNode.removeChild(d.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var q=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var y=[],A=l.split(";"),C=0;C<A.length;C++)y.push(decodeURIComponent(A[C]));this.loadLibraries(y)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?q():this.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=c&&c(),window.openWindow(m,null,p))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(n){g();null!=n&&"AbortError"==n.name||this.handleError(n)}))}};
-App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var E=mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
-window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(q){null!=q?(this.fileLoaded(new StorageFile(this,q,b)),null!=c&&c()):E({message:mxResources.get("fileNotFound")})}),E)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else if(null!=f)this.spinner.stop(),
-this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var d=decodeURIComponent(b.substring(1));"<"!=d.charAt(0)&&(d=Graph.decompress(d));d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);d.getHash=function(){return b};this.fileLoaded(d);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(q,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,q,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var q=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,e,null,mxUtils.bind(this,function(){var y=this.getCurrentFile();null!=y&&this.editor.chromeless&&
-!this.editor.editable&&(y.getHash=function(){return"G"+p},window.location.hash="#"+y.getHash());null!=c&&c()}));return!0}return!1});!q()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",q);return!0});this.loadTemplate(g,mxUtils.bind(this,function(q){this.spinner.stop();if(null!=q&&0<q.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var y=g,A=g.lastIndexOf("."),C=y.lastIndexOf("/");A>C&&0<C&&(y=y.substring(C+1,A),A=g.substring(A),
-this.useCanvasForExport||".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(p=y+A)}q=new LocalFile(this,q,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);q.getHash=function(){return b};this.fileLoaded(q,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
-function(){k()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(d=null,"G"==b.charAt(0)?d=this.drive:"D"==b.charAt(0)?d=this.dropbox:"W"==b.charAt(0)?d=this.oneDrive:"H"==b.charAt(0)?d=this.gitHub:"A"==b.charAt(0)?d=this.gitLab:"T"==b.charAt(0)&&(d=this.trello),null==d)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));d.getFile(b,mxUtils.bind(this,function(q){this.spinner.stop();this.fileLoaded(q);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):q==p&&null==q.getMode()&&
-(q=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+q+'" class="geStatusAlert">'+q+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(q){null!=window.console&&null!=q&&console.log("error in loadFile:",b,q);var p=mxUtils.bind(this,function(){var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):window.location.hash="#"+y.getHash()});null==q||"AbortError"!=q.name?this.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}),
-v=this.getCurrentFile(),x=mxUtils.bind(this,function(){l||null==v||!v.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?x():null==v||e?x():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,x)).container,320,140,!0,!0)};
-App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(d,g){g||mxSettings.removeCustomLibrary(d);delete this.loadedLibraries[d]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=l[d]&&this.loadLibrary(l[d],d<=m);null!=e&&e()}});if(null!=b)for(var x=0;x<b.length;x++){var E=encodeURIComponent(decodeURIComponent(b[x]));
-mxUtils.bind(this,function(d,g){if(null!=d&&0<d.length&&null==this.loadedLibraries[d]&&null==this.sidebar.palettes[d]){this.loadedLibraries[d]=!0;c++;var k=mxUtils.bind(this,function(C){l[g]=C;c--;v()}),n=mxUtils.bind(this,function(C){f(d,C);c--;v()}),q=d.substring(0,1);if("L"==q)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var C=decodeURIComponent(d.substring(1));StorageFile.getFileContent(this,C,mxUtils.bind(this,function(B){".scratchpad"==C&&null==
-B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,C)):n()}),n)}catch(B){n()}}),0);else if("U"==q){var p=decodeURIComponent(d.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(C){null!=C&&0<C.length?k(new UrlLibrary(this,C,p)):n()}),function(){n()},null,!0)}else if("R"==q){q=decodeURIComponent(d.substring(1));try{q=JSON.parse(q);var y={id:q[0],title:q[1],downloadUrl:q[2]};this.remoteInvoke("getFileContent",[y.downloadUrl],null,mxUtils.bind(this,function(C){try{k(new RemoteLibrary(this,
-C,y))}catch(B){n()}}),function(){n()})}catch(C){n()}}else if("S"==q&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(d.substring(1)),function(C){k(C)},n)}catch(C){n()}else{var A=null;"G"==q?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==q?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==q?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==q?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==q&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(d.substring(1)),mxUtils.bind(this,function(C){try{k(C)}catch(B){n()}}),function(C){n()}):n(!0)}}})(E,x)}v()}};
+App.prototype.createFile=function(b,d,e,c,k,m,u,z,C){c=z?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var A=mxUtils.bind(this,function(){this.spinner.stop()}),B=mxUtils.bind(this,function(J){A();null==J&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=J&&this.handleError(J)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==u&&null!=this.stateArg&&null!=this.stateArg.folderId&&(u=this.stateArg.folderId),
+this.drive.insertFile(b,d,u,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B,!1,u):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B,!1,u):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B,
+!1,u):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B,!1,u):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,k,C)}),B):!z&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(A(),this.showSaveFilePicker(mxUtils.bind(this,
+function(J,f){var g=new LocalFile(this,d,f.name,null,J,f);g.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(g,e,m,k,C)}),B,!0)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&B(J)}),this.createFileSystemOptions(b))):(A(),this.fileCreated(new LocalFile(this,d,b,null==c),e,m,k,C))}catch(J){A(),this.handleError(J)}}};
+App.prototype.fileCreated=function(b,d,e,c,k){var m=window.location.pathname;null!=d&&0<d.length&&(m+="?libs="+d);null!=k&&0<k.length&&(m+="?clibs="+k);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var z=window.location.protocol+"//"+window.location.hostname+m,C=u,A=null;null!=u&&/\.svg$/i.test(b.getTitle())&&
+(A=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(A.container),C=this.decodeNodeIntoGraph(C,A));b.setData(this.createFileData(u,A,b,z));null!=A&&A.container.parentNode.removeChild(A.container);var B=mxUtils.bind(this,function(){this.spinner.stop()}),J=mxUtils.bind(this,function(){B();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);e&&b.addAllSavedStatus();
+null!=d&&this.sidebar.showEntries(d);if(null!=k){for(var q=[],t=k.split(";"),x=0;x<t.length;x++)q.push(decodeURIComponent(t[x]));this.loadLibraries(q)}}),l=mxUtils.bind(this,function(){e||null==f||!f.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==e||e?l():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=c&&c(),window.openWindow(m,null,l))});b.constructor==LocalFile?J():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){J()}),mxUtils.bind(this,function(f){B();null!=f&&"AbortError"==f.name||this.handleError(f)}))}};
+App.prototype.loadFile=function(b,d,e,c,k){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var C=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();
+window.location.hash=null!=l?l.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=e)this.spinner.stop(),
+this.fileLoaded(e),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var A=decodeURIComponent(b.substring(1));"<"!=A.charAt(0)&&(A=Graph.decompress(A));A=new LocalFile(this,A,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);A.getHash=function(){return b};this.fileLoaded(A);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,l){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,l));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var B=decodeURIComponent(b.substring(1)),J=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=B.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var l=B.substring(31,B.lastIndexOf("&ex"));this.loadFile("G"+l,d,null,mxUtils.bind(this,function(){var q=this.getCurrentFile();null!=q&&this.editor.chromeless&&
+!this.editor.editable&&(q.getHash=function(){return"G"+l},window.location.hash="#"+q.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(B,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var l=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var q=B,t=B.lastIndexOf("."),x=q.lastIndexOf("/");t>x&&0<x&&(q=q.substring(x+1,t),t=B.substring(t),
+this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(l=q+t)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):l,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+function(){J()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(A=null,"G"==b.charAt(0)?A=this.drive:"D"==b.charAt(0)?A=this.dropbox:"W"==b.charAt(0)?A=this.oneDrive:"H"==b.charAt(0)?A=this.gitHub:"A"==b.charAt(0)?A=this.gitLab:"T"==b.charAt(0)&&(A=this.trello),null==A)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else{var f=b.charAt(0);b=decodeURIComponent(b.substring(1));A.getFile(b,mxUtils.bind(this,function(g){this.spinner.stop();this.fileLoaded(g);var l=this.getCurrentFile();null==l?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(l.getHash=function(){return f+b},window.location.hash="#"+l.getHash()):g==l&&null==g.getMode()&&
+(g=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+g+'" class="geStatusAlert">'+g+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(g){null!=window.console&&null!=g&&console.log("error in loadFile:",b,g);var l=mxUtils.bind(this,function(){var q=this.getCurrentFile();null==q?(window.location.hash="",this.showSplash()):window.location.hash="#"+q.getHash()});null==g||"AbortError"!=g.name?this.handleError(g,null!=g?mxResources.get("errorLoadingFile"):null,l,null,null,"#"+f+b):l()}))}}),
+u=this.getCurrentFile(),z=mxUtils.bind(this,function(){k||null==u||!u.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=u&&(window.location.hash=u.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?z():null==u||d?z():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,z)).container,320,140,!0,!0)};
+App.prototype.getLibraryStorageHint=function(b){var d=b.getTitle();b.constructor!=LocalLibrary&&(d+="\n"+b.getHash());b.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?d+=" ("+
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){function b(e){for(var c=0;c<e.length;c++)""!=e[c]&&0>mxUtils.indexOf(d,e[c])&&d.push(e[c])}var d=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(d)};
+App.prototype.loadLibraries=function(b,d){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var e=mxUtils.bind(this,function(A,B){B||mxSettings.removeCustomLibrary(A);delete this.loadedLibraries[A]}),c=0,k=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,u=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var A=b.length-1;0<=A;A--)null!=k[A]&&this.loadLibrary(k[A],A<=m);null!=d&&d()}});if(null!=b)for(var z=0;z<b.length;z++){var C=encodeURIComponent(decodeURIComponent(b[z]));
+mxUtils.bind(this,function(A,B){if(null!=A&&0<A.length&&null==this.loadedLibraries[A]&&null==this.sidebar.palettes[A]){this.loadedLibraries[A]=!0;c++;var J=mxUtils.bind(this,function(x){k[B]=x;c--;u()}),f=mxUtils.bind(this,function(x){e(A,x);c--;u()}),g=A.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(A.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(E){".scratchpad"==x&&null==
+E&&(E=this.emptyLibraryXml);null!=E?J(new StorageLibrary(this,E,x)):f()}),f)}catch(E){f()}}),0);else if("U"==g){var l=decodeURIComponent(A.substring(1));this.isOffline()||this.loadTemplate(l,mxUtils.bind(this,function(x){null!=x&&0<x.length?J(new UrlLibrary(this,x,l)):f()}),function(){f()},null,!0)}else if("R"==g){g=decodeURIComponent(A.substring(1));try{g=JSON.parse(g);var q={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(x){try{J(new RemoteLibrary(this,
+x,q))}catch(E){f()}}),function(){f()})}catch(x){f()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(A.substring(1)),function(x){J(x)},f)}catch(x){f()}else{var t=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==g&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(A.substring(1)),mxUtils.bind(this,function(x){try{J(x)}catch(E){f()}}),function(x){f()}):f(!0)}}})(C,z)}u()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",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":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",
mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=
b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,
"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(E){return!E.targets||-1<E.targets.indexOf(b)||null!=e&&-1<E.targets.indexOf(e)});for(var m=b+"NotifReadTS",v=isLocalStorage?parseInt(localStorage.getItem(m)):!0,x=0;x<l.length;x++)l[x].isNew=!v||l[x].timestamp>v;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,v){return v.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(f.notifs)}};
-App.prototype.showNotification=function(b,e){function f(d){var g=document.querySelector(".geNotification-count");null!=g&&(g.innerHTML=d,g.style.display=0==d?"none":"",g=document.querySelector(".geNotification-bell"),g.style.animation=0==d?"none":"",g.className="geNotification-bell"+(0==d?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==d?"none":"")}var c=b.length;if("min"==uiTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&&
-(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var d=this.notificationWin.querySelectorAll(".circle.active"),g=0;g<d.length;g++)d[g].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
-(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==uiTheme?"0.5":"";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);
-l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className=
-"header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var v=document.createElement("div");v.setAttribute("id","geNotifList");v.style.position="relative";l.appendChild(v);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var d=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=d.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=d.right-this.notificationWin.clientWidth+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var x=0,E=document.getElementById("geNotifList");
-if(null!=E){E.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(d,g){g.isNew&&x++;var k=document.createElement("div");k.className="notification";d=d.timeSince(new Date(g.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));k.innerHTML='<div class="circle'+(g.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(g.content)+"</p>";g.link&&mxEvent.addListener(k,"click",function(){window.open(g.link,
-"notifWin")});E.appendChild(k)})(this,b[l]);f(x)}}};
-App.prototype.save=function(b,e){var f=this.getCurrentFile();if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){f.handleFileSuccess(!0);null!=e&&e()}),l=mxUtils.bind(this,function(m){f.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,e)}));f.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==f.getTitle()?f.save(!0,c,
-l):f.saveAs(b,c,l)}catch(m){l(m)}}};
-App.prototype.pickFolder=function(b,e,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(v){m();if(v.action==google.picker.Action.PICKED){var x=null;null!=v.docs&&0<v.docs.length&&"folder"==v.docs[0].type&&(x=v.docs[0].id);e(x)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(v){m();null!=v&&null!=v.value&&0<v.value.length&&(v=OneDriveFile.prototype.getIdOf(v.value[0]),
-e(v))}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,e,f,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,m,mxUtils.bind(this,function(v){this.spinner.stop()}),
-mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!0,m,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!0,m,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,
-f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!1,m):l==App.MODE_BROWSER&&(f=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.confirm(mxResources.get("replaceIt",[e]),f))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?
-window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(v){this.editor.setStatus(mxUtils.htmlEntities(v.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,e,f,c,l,m,v,x){var E=e;/\.svg$/i.test(E)||(E=E.substring(0,e.lastIndexOf("."))+c);var d=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(d=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);d||(g.responseType="blob");if(x)for(var k in x)g.setRequestHeader(k,x[k]);g.onload=mxUtils.bind(this,function(){if(200<=
-g.status&&299>=g.status){var q=null;d?(q=JSON.parse(g.responseText),q=this.base64ToBlob(q.content,"application/octet-stream")):q=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(q,mxUtils.bind(this,function(p){l(new LocalFile(this,p,E,!0))}),m,e)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(q){try{if(/\.pdf$/i.test(e)){var p=Editor.extractGraphModelFromPdf(q);null!=p&&0<p.length&&l(new LocalFile(this,
-p,E,!0))}else/\.png$/i.test(e)?(p=this.extractGraphModelFromPng(q),null!=p?l(new LocalFile(this,p,E,!0)):l(new LocalFile(this,q,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(q,b)?this.parseFileData(q,mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?l(new LocalFile(this,y.responseText,E,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,q,E,!0))}catch(y){null!=m&&m(y)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
-/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);d?mxUtils.get(b,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus()){if(null!=l){q=JSON.parse(q.getText());var p=q.content;"base64"===q.encoding&&(p=/\.png$/i.test(e)?"data:image/png;base64,"+p:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},x):null!=v?v(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,x)}};
+App.prototype.fetchAndShowNotification=function(b,d){if(!this.fetchingNotif){b=b||"online";var e=null,c=mxUtils.bind(this,function(k){k=k.filter(function(C){return!C.targets||-1<C.targets.indexOf(b)||null!=d&&-1<C.targets.indexOf(d)});for(var m=b+"NotifReadTS",u=isLocalStorage?parseInt(localStorage.getItem(m)):!0,z=0;z<k.length;z++)k[z].isNew=!u||k[z].timestamp>u;this.showNotification(k,m)});try{isLocalStorage&&(e=JSON.parse(localStorage.getItem(".notifCache")))}catch(k){}null==e||e.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(k){200<=k.getStatus()&&299>=k.getStatus()&&(k=JSON.parse(k.getText()),k.sort(function(m,u){return u.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:k})),this.fetchingNotif=!1,c(k))}))):c(e.notifs)}};
+App.prototype.showNotification=function(b,d){function e(A){var B=document.querySelector(".geNotification-count");null!=B&&(B.innerHTML=A,B.style.display=0==A?"none":"",B=document.querySelector(".geNotification-bell"),B.style.animation=0==A?"none":"",B.className="geNotification-bell"+(0==A?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==A?"none":"")}var c=b.length;if("min"==uiTheme)for(var k=c=0;k<b.length;k++)b[k].isNew&&c++;if(0==c)null!=this.notificationBtn&&
+(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var A=this.notificationWin.querySelectorAll(".circle.active"),B=0;B<A.length;B++)A[B].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(d,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
+(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==uiTheme?"0.5":"";k=document.createElement("span");k.className="geBell-top";c.appendChild(k);k=document.createElement("span");k.className="geBell-middle";c.appendChild(k);
+k=document.createElement("span");k.className="geBell-bottom";c.appendChild(k);k=document.createElement("span");k.className="geBell-rad";c.appendChild(k);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);k=document.createElement("div");k.className=
+"header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");k.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";k.appendChild(c);this.notificationWin.appendChild(k);k=document.createElement("div");k.className="notifications clearfix";var u=document.createElement("div");u.setAttribute("id","geNotifList");u.style.position="relative";k.appendChild(u);this.notificationWin.appendChild(k);mxEvent.addListener(this.notificationBtn,
+"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var A=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=A.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=A.right-this.notificationWin.clientWidth+"px";e(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var z=0,C=document.getElementById("geNotifList");
+if(null!=C){C.innerHTML='<div class="line"></div>';for(k=0;k<b.length;k++)(function(A,B){B.isNew&&z++;var J=document.createElement("div");J.className="notification";A=A.timeSince(new Date(B.timestamp));null==A&&(A=mxResources.get("lessThanAMinute"));J.innerHTML='<div class="circle'+(B.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[A],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(B.content)+"</p>";B.link&&mxEvent.addListener(J,"click",function(){window.open(B.link,
+"notifWin")});C.appendChild(J)})(this,b[k]);e(z)}}};
+App.prototype.save=function(b,d){var e=this.getCurrentFile();if(null!=e&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){e.handleFileSuccess(!0);null!=d&&d()}),k=mxUtils.bind(this,function(m){e.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,d)}));e.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==e.getTitle()?e.save(!0,c,
+k):e.saveAs(b,c,k)}catch(m){k(m)}}};
+App.prototype.pickFolder=function(b,d,e,c,k){e=null!=e?e:!0;var m=this.spinner.pause();e&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){m();if(u.action==google.picker.Action.PICKED){var z=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(z=u.docs[0].id);d(z)}}),k):e&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){m();null!=u&&null!=u.value&&0<u.value.length&&(u=OneDriveFile.prototype.getIdOf(u.value[0]),
+d(u))}),c):e&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){m();d(u)})):e&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){m();d(u)})):e&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){m();d(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,d,e,c,k,m){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,c?this.base64ToBlob(b,e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,b,m,mxUtils.bind(this,function(u){this.spinner.stop()}),
+mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),e,c):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,c?this.base64ToBlob(b,e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,m):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,m,c):k==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(d,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!0,m,c):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,c?this.base64ToBlob(b,
+e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),!1,m):k==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,b)}),null==localStorage.getItem(d)?e():this.confirm(mxResources.get("replaceIt",[d]),e))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var d=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}d=this.editor.graph;var e=b.isEditable()&&!b.invalidChecksum;d.isEnabled()&&!e&&d.reset();d.setEnabled(e);null==urlParams.rev&&(this.updateDocumentTitle(),d=b.getHash(),0<d.length?
+window.location.hash=d:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
+App.prototype.showAuthDialog=function(b,d,e,c){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,b,d,mxUtils.bind(this,function(m){try{null!=e&&e(m,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(u){this.editor.setStatus(mxUtils.htmlEntities(u.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,d,e,c,k,m,u,z){var C=d;/\.svg$/i.test(C)||(C=C.substring(0,d.lastIndexOf("."))+c);var A=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(A=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var B=new XMLHttpRequest;B.open("GET",b,!0);A||(B.responseType="blob");if(z)for(var J in z)B.setRequestHeader(J,z[J]);B.onload=mxUtils.bind(this,function(){if(200<=
+B.status&&299>=B.status){var g=null;A?(g=JSON.parse(B.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([B.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(l){k(new LocalFile(this,l,C,!0))}),m,d)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});B.onerror=m;B.send()}else{var f=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(d)){var l=Editor.extractGraphModelFromPdf(g);null!=l&&0<l.length&&k(new LocalFile(this,
+l,C,!0))}else/\.png$/i.test(d)?(l=this.extractGraphModelFromPng(g),null!=l?k(new LocalFile(this,l,C,!0)):k(new LocalFile(this,g,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(q){4==q.readyState&&(200<=q.status&&299>=q.status?k(new LocalFile(this,q.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),d):k(new LocalFile(this,g,C,!0))}catch(q){null!=m&&m(q)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||
+/\.pdf$/i.test(d)||null!=e&&"image/"==e.substring(0,6);A?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=k){g=JSON.parse(g.getText());var l=g.content;"base64"===g.encoding&&(l=/\.png$/i.test(d)?"data:image/png;base64,"+l:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+l:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l));f(l)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},z):null!=u?u(b,f,m,e):this.editor.loadUrl(b,f,m,e,null,null,null,z)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
-"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(l){this.appIconClicked(l)}));var e=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",e);e();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
-mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l=l.getMode(),l==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70% 70%"):l==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):l==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
+"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(k){this.appIconClicked(k)}));var d=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",d);d();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
+mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k=k.getMode(),k==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):k==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):k==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70% 70%"):k==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):k==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):k==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";
-this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
-function(l){var m=this.getCurrentFile();null!=m&&m.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(l)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
-this.menubar.container.style.top="34px");e="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=e+"px";this.toggleFormatElement.style.padding=
-"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);e+=20;mxEvent.addListener(this.toggleFormatElement,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(l)}));var f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
-f);f();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=e+"px";this.toolbarContainer.appendChild(this.fullscreenElement);e+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
-"click",mxUtils.bind(this,function(l){var m=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:m});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(m);m||(c=this.hsplitPosition);this.hsplitPosition=m?c:0;this.toggleFormatPanel(m);this.fullscreenMode=!m;mxEvent.consume(l)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
-this.darkModeElement.style.right=e+"px",this.toolbarContainer.appendChild(this.darkModeElement),e+=20,e=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",e),e(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
-mxUtils.bind(this,function(l){this.actions.get("toggleDarkMode").funct();mxEvent.consume(l)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var c=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
+this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
+function(k){var m=this.getCurrentFile();null!=m&&m.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(k)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
+this.menubar.container.style.top="34px");d="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=d+"px";this.toggleFormatElement.style.padding="2px";
+this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);d+=20;mxEvent.addListener(this.toggleFormatElement,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(k){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(k)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
+e);e();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=d+"px";this.toolbarContainer.appendChild(this.fullscreenElement);d+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
+"click",mxUtils.bind(this,function(k){var m=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:m});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(m);m||(c=this.hsplitPosition);this.hsplitPosition=m?c:0;this.toggleFormatPanel(m);this.fullscreenMode=!m;mxEvent.consume(k)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
+this.darkModeElement.style.right=d+"px",this.toolbarContainer.appendChild(this.darkModeElement),d+=20,d=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",d),d(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
+mxUtils.bind(this,function(k){this.actions.get("toggleDarkMode").funct();mxEvent.consume(k)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var c=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat=
-"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(l)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
+"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(k){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(k)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility=
"visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",
this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')");this.compactMode=!b};
-App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(e){e.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(e){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.zIndex=5;f.style.right="36px";f.style.padding="0px";f.style.cursor="default";f.style.minWidth="300px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var c=!1;this.userPanel.innerText="";f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.className="geDialogClose";f.style.top="8px";f.style.right="8px";mxEvent.addListener(f,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(f);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var m=mxUtils.bind(this,
-function(E,d){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,d),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();E()}),2E3)):E()});f=mxUtils.bind(this,function(E){var d=document.createElement("tr");d.setAttribute("title","User ID: "+E.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50");
-k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=E.pictureUrl?E.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,E.displayName+(E.isCurrent&&1<l.length?" ("+mxResources.get("default")+
-")":""));null!=E.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,E.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);d.appendChild(g);E.isCurrent||(d.style.cursor="pointer",d.style.opacity="0.3",mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(E);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(q)})));return d});c=!0;var v=document.createElement("table");v.style.borderSpacing="0";v.style.fontSize="10pt";v.style.width="100%";v.style.padding="10px";for(var x=0;x<l.length;x++)v.appendChild(f(l[x]));this.userPanel.appendChild(v);f=document.createElement("div");f.style.textAlign=
-"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";v=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));v.className="geBtn";v.style.float="right";f.appendChild(v);v=mxUtils.button(mxResources.get("addAccount"),
-mxUtils.bind(this,function(){var E=this.drive.createAuthWin();E.blur();window.focus();m(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(d){this.handleError(d)}),!0,E)}),mxResources.get("closingFile")+"...")}));v.className="geBtn";v.style.margin="0px";f.appendChild(v);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(E,d,g,k){if(null!=E){c&&this.userPanel.appendChild(document.createElement("hr"));
-c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var q=document.createElement("tbody"),p=document.createElement("tr"),y=document.createElement("td");y.setAttribute("valig","top");y.style.width="40px";if(null!=d){var A=document.createElement("img");A.setAttribute("width","40");A.setAttribute("height","40");A.setAttribute("border","0");A.setAttribute("src",d);A.style.marginRight="6px";y.appendChild(A)}p.appendChild(y);
-y=document.createElement("td");y.setAttribute("valign","middle");y.style.whiteSpace="nowrap";y.style.maxWidth="0";y.style.overflow="hidden";y.style.textOverflow="ellipsis";mxUtils.write(y,E.displayName);null!=E.email&&(mxUtils.br(y),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,E.email),y.appendChild(d));null!=k&&(E=document.createElement("div"),E.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,k),E.appendChild(d),y.appendChild(E));p.appendChild(y);q.appendChild(p);
-n.appendChild(q);this.userPanel.appendChild(n);E=document.createElement("div");E.style.textAlign="center";E.style.padding="10px";E.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",E.appendChild(g));this.userPanel.appendChild(E)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==DropboxFile){var d=mxUtils.bind(this,function(){this.dropbox.logout();
-window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==OneDriveFile){var d=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
-""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==GitHubFile){var d=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&f(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==GitLabFile){var d=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):
-d()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&f(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==TrelloFile){var d=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.trello.logout()}),mxResources.get("trello"));"min"==
-uiTheme&&(v=this.getCurrentFile(),null!=v&&v.isRealtimeEnabled()&&v.isRealtimeSupported()&&(f=document.createElement("div"),f.style.padding="10px",f.style.whiteSpace="nowrap",f.style.borderTop="1px solid rgb(224, 224, 224)",f.style.marginTop="4px",f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",x=v.getRealtimeError(),1!=v.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=x&&null!=x.message?x.message:mxResources.get("disconnected"))),
-this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(e)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?
-b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
-this.userElement=null);this.updateUserElementStyle();this.updateUserElementIcon()};
-App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var e=mxResources.get("changeUser");if("none"!=b.style.display){var f=this.getCurrentFile();if(null!=f&&f.isRealtimeEnabled()&&f.isRealtimeSupported()){var c=document.createElement("img");c.setAttribute("border","0");c.style.position="absolute";c.style.left="16px";c.style.top="2px";c.style.width="12px";c.style.height="12px";var l=f.getRealtimeError();f=f.getRealtimeState();e+=" ("+mxResources.get("realtimeCollaboration")+
-": ";1==f?(c.src=Editor.syncImage,e+=mxResources.get("online")):(c.src=Editor.syncProblemImage,e=null!=l&&null!=l.message?e+l.message:e+mxResources.get("disconnected"));e+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(c))}b.setAttribute("title",e)}}};
+App.prototype.updateUserElement=function(){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement));if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){this.userElement.style.display="inline-block";
+var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&
+(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else this.userElement.style.display="none";this.updateUserElementStyle();this.updateUserElementIcon()};
App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("sketch"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.top="3px",b.style.right=""):(b.className="geItem",b.style.backgroundImage=
"url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||"1"!=urlParams["live-ui"]?"8px":"30px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
-App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";return b};
-App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
-var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function f(u,z,F){this.ui=u;this.previousExtFonts=this.extFonts=z;this.prevCustomFonts=this.customFonts=F}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),x=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),E=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),d="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var z=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,u?350:620,u?70:460,!0,!0,function(J){c.sidebar.hideTooltip();J&&null==c.getCurrentFile()&&c.showSplash()});
-z.init()}else{var F=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};u=new TemplatesDialog(c,function(J,K,H){var N=H.libs,U=H.clibs;c.pickFolder(c.mode,function(Q){c.createFile(K,J,null!=N&&0<N.length?N:null,null,function(){c.hideDialog()},null,Q,null,null!=U&&0<U.length?U:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(J,K,H){var N=new Date;N.setDate(N.getDate()-
-7);c.drive.listFiles(null,N,H?!0:!1,function(U){for(var Q=[],V=0;V<U.items.length;V++)Q.push(F(U.items[V]));J(Q)},K)},function(J,K,H,N){c.drive.listFiles(J,null,N?!0:!1,function(U){for(var Q=[],V=0;V<U.items.length;V++)Q.push(F(U.items[V]));K(Q)},H)},function(J,K,H){c.drive.getFile(J.id,function(N){K(N.data)},H)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&
-!l.isCellLocked(l.getDefaultParent())){var u=new NewDialog(c,null,!1,function(z){c.hideDialog();if(null!=z){var F=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(z,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=m;var g=c.actions.addAction("shareCursor",
-function(){c.setShareCursorPosition(!c.isShareCursorPosition())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShareCursorPosition()});g=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShowRemoteCursors()});g=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==
-mxConstants.POINTS});g=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});g=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});g=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
-g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,["points","inches","millimeters","meters"],z)})));g=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});g.setEnabled(c.canvasSupported&&9!=document.documentMode);
-g.setToggleAction(!0);g.setSelectedCallback(function(){return null!=c.ruler});g=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});g.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;g.setToggleAction(!0);g.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});g=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(u){c.setDarkMode(!Editor.isDarkMode());u=mxSettings.getUi();"atlas"!=u&&"min"!=u&&"sketch"!=u&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=
-m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==c.freehandWindow){var u=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",
-new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(F);var J=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),K=c.addCheckbox(u,mxResources.get("compressed"),!0),H=c.addCheckbox(u,mxResources.get("allPages"),
-!z,z);H.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,z||!H.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,
-null,function(u,z,F,J,K,H,N,U,Q){N=[];Q&&N.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,z,F,J,K,H,null,!0,N));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(z,F,J,K,H,N,U,Q,V,W,t){c.createHtml(z,F,J,K,H,N,U,Q,V,
-W,t,mxUtils.bind(this,function(D,L){var T=c.getBaseFilename(U);D='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(T)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+D+"\n"+L+"\n</body>\n</html>";c.saveData(T+(".drawio"==T.substring(T.lenth-7)?"":".drawio")+".html","html",D,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,z=document.createElement("div");z.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(F);var J=function(){U!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!l.pageVisible):(L.setAttribute("disabled","disabled"),L.checked=!1)};F=200;var K=1,H=null;if(c.pdfPageExport&&
-!u){var N=function(){t.value=Math.max(1,Math.min(K,Math.max(parseInt(t.value),parseInt(V.value))));V.value=Math.max(1,Math.min(K,Math.min(parseInt(t.value),parseInt(V.value))))},U=c.addRadiobox(z,"pages",mxResources.get("allPages"),!0),Q=c.addRadiobox(z,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");V.setAttribute("min","1");V.style.width="50px";z.appendChild(V);var W=
-document.createElement("span");mxUtils.write(W,mxResources.get("to"));z.appendChild(W);var t=V.cloneNode(!0);z.appendChild(t);mxEvent.addListener(V,"focus",function(){Q.checked=!0});mxEvent.addListener(t,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"change",N);mxEvent.addListener(t,"change",N);if(null!=c.pages&&(K=c.pages.length,null!=c.currentPage))for(N=0;N<c.pages.length;N++)if(c.currentPage==c.pages[N]){H=N+1;V.value=H;t.value=H;break}V.setAttribute("max",K);t.setAttribute("max",K);
-mxUtils.br(z);var D=c.addRadiobox(z,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),L=c.addCheckbox(z,mxResources.get("crop"),!1,!0),T=c.addCheckbox(z,mxResources.get("grid"),!1,!1);mxEvent.addListener(U,"change",J);mxEvent.addListener(Q,"change",J);mxEvent.addListener(D,"change",J);F+=64}else D=c.addCheckbox(z,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),L=c.addCheckbox(z,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),T=c.addCheckbox(z,mxResources.get("grid"),
-!1,!1),c.pdfPageExport||mxEvent.addListener(D,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var O=null,P=null;if(EditorUi.isElectronApp||J)P=c.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;J&&(O=c.addCheckbox(z,mxResources.get("transparentBackground"),!1),F+=30);z=new CustomDialog(c,z,mxUtils.bind(this,function(){var R=null;if(!u){R=parseInt(V.value);var X=parseInt(t.value);R=U.checked||R==H&&X==H?null:{from:Math.max(0,
-Math.min(K-1,R-1)),to:Math.max(0,Math.min(K-1,X-1))}}c.downloadFile("pdf",null,null,!D.checked,u?!0:!U.checked&&null==R,!L.checked,null!=O&&O.checked,null,null,T.checked,null!=P&&P.checked,R)}),null,mxResources.get("export"));c.showDialog(z.container,300,F,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});
-c.actions.addAction("close",function(){function u(){null!=z&&z.removeDraft();c.fileLoaded(null)}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var u=l.getSelectionCell(),z=l.view.getState(u);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+
-":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,z){c.spinner.stop();u=new RevisionDialog(c,u,z);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",
-function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");g=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(g.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
-(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(u),null,!0))});"undefined"!==typeof MathJax&&(g=c.actions.addAction("mathematicalTypesetting",function(){var u=new ChangePageSetup(c);u.ignoreColor=!0;u.ignoreImage=!0;u.mathEnabled=!c.isMathEnabled();l.model.execute(u)}),g.setToggleAction(!0),g.setSelectedCallback(function(){return c.isMathEnabled()}),g.isEnabled=m);isLocalStorage&&(g=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var k=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=l.getSelectionCells(),z=[],F=0;F<u.length;F++)l.getModel().isVertex(u[F])&&z.push(u[F]);0<z.length&&(u=new EditGeometryDialog(c,z),c.showDialog(u.container,
-200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var n=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(n=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=n&&l.pasteStyle(n,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=
-new BackgroundImageDialog(c,function(z){c.setBackgroundImage(z)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D,L,T){Q=parseInt(u);!isNaN(Q)&&0<Q&&(T?c.downloadFile("remoteSvg",null,null,F,null,U,z,u,N,null,K):c.exportSvg(Q/100,z,F,
-J,K,H,N,!U,!1,V,t,D,L))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,z,F,J,K,N,!U,!1,null,W,null,t,D)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,z,F,J,K){c.downloadFile(z?"xmlpng":"png",null,null,u,null,null,F,J,K)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,
-F,J,!1,N,!U,!1,"jpeg",W,null,t,D)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,z,F,J,K){c.downloadFile("jpeg",null,null,u,null,null,null,J,K)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(0==u.length?c.editor.getGraphXml():l.encodeCells(u));c.copyImage(u,z)}));g.visible=
-Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;g=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var d=mxResources.get("changeUser");if("none"!=b.style.display){var e=this.getCurrentFile();if(null!=e&&e.isRealtimeEnabled()&&e.isRealtimeSupported()){var c=document.createElement("img");c.setAttribute("border","0");c.style.position="absolute";c.style.left="16px";c.style.top="2px";c.style.width="12px";c.style.height="12px";var k=e.getRealtimeError();e=e.getRealtimeState();d+=" (";1==e?(c.src=Editor.syncImage,d+=mxResources.get("online")):
+(c.src=Editor.syncProblemImage,d=null!=k&&null!=k.message?d+k.message:d+mxResources.get("disconnected"));d+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(c))}b.setAttribute("title",d)}}};
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){if(null==this.userPanel){var e=document.createElement("div");e.className="geDialog";e.style.position="absolute";
+e.style.top=b.clientTop+b.clientHeight+6+"px";e.style.zIndex=5;e.style.right="36px";e.style.padding="0px";e.style.cursor="default";e.style.minWidth="300px";this.userPanel=e}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerText="";e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.className="geDialogClose";e.style.top="8px";e.style.right="8px";
+mxEvent.addListener(e,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(e);if(null!=this.drive){var k=this.drive.getUsersList();if(0<k.length){var m=mxUtils.bind(this,function(C,A){var B=this.getCurrentFile();null!=B&&B.constructor==DriveFile?(this.spinner.spin(document.body,A),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();C()}),2E3)):C()});e=mxUtils.bind(this,
+function(C){var A=document.createElement("tr");A.setAttribute("title","User ID: "+C.id);var B=document.createElement("td");B.setAttribute("valig","middle");B.style.height="59px";B.style.width="66px";var J=document.createElement("img");J.setAttribute("width","50");J.setAttribute("height","50");J.setAttribute("border","0");J.setAttribute("src",null!=C.pictureUrl?C.pictureUrl:this.defaultUserPicture);J.style.borderRadius="50%";J.style.margin="4px 8px 0 8px";B.appendChild(J);A.appendChild(B);B=document.createElement("td");
+B.setAttribute("valign","middle");B.style.whiteSpace="nowrap";B.style.paddingTop="4px";B.style.maxWidth="0";B.style.overflow="hidden";B.style.textOverflow="ellipsis";mxUtils.write(B,C.displayName+(C.isCurrent&&1<k.length?" ("+mxResources.get("default")+")":""));null!=C.email&&(mxUtils.br(B),J=document.createElement("small"),J.style.color="gray",mxUtils.write(J,C.email),B.appendChild(J));J=document.createElement("div");J.style.marginTop="4px";var f=document.createElement("i");mxUtils.write(f,mxResources.get("googleDrive"));
+J.appendChild(f);B.appendChild(J);A.appendChild(B);C.isCurrent||(A.style.cursor="pointer",A.style.opacity="0.3",mxEvent.addListener(A,"click",mxUtils.bind(this,function(g){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(l){this.handleError(l)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(g)})));return A});c=!0;var u=
+document.createElement("table");u.style.borderSpacing="0";u.style.fontSize="10pt";u.style.width="100%";u.style.padding="10px";for(var z=0;z<k.length;z++)u.appendChild(e(k[z]));this.userPanel.appendChild(u);e=document.createElement("div");e.style.textAlign="left";e.style.padding="10px";e.style.whiteSpace="nowrap";e.style.borderTop="1px solid rgb(224, 224, 224)";u=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,
+function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));u.className="geBtn";u.style.float="right";e.appendChild(u);u=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();m(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,C)}),mxResources.get("closingFile")+"...")}));u.className="geBtn";u.style.margin="0px";e.appendChild(u);this.userPanel.appendChild(e)}}e=mxUtils.bind(this,function(C,A,B,J){if(null!=C){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var f=document.createElement("table");f.style.borderSpacing="0";f.style.fontSize="10pt";f.style.width="100%";f.style.padding="10px";var g=document.createElement("tbody"),l=document.createElement("tr"),
+q=document.createElement("td");q.setAttribute("valig","top");q.style.width="40px";if(null!=A){var t=document.createElement("img");t.setAttribute("width","40");t.setAttribute("height","40");t.setAttribute("border","0");t.setAttribute("src",A);t.style.marginRight="6px";q.appendChild(t)}l.appendChild(q);q=document.createElement("td");q.setAttribute("valign","middle");q.style.whiteSpace="nowrap";q.style.maxWidth="0";q.style.overflow="hidden";q.style.textOverflow="ellipsis";mxUtils.write(q,C.displayName);
+null!=C.email&&(mxUtils.br(q),A=document.createElement("small"),A.style.color="gray",mxUtils.write(A,C.email),q.appendChild(A));null!=J&&(C=document.createElement("div"),C.style.marginTop="4px",A=document.createElement("i"),mxUtils.write(A,J),C.appendChild(A),q.appendChild(C));l.appendChild(q);g.appendChild(l);f.appendChild(g);this.userPanel.appendChild(f);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=B&&(B=mxUtils.button(mxResources.get("signOut"),
+B),B.className="geBtn",C.appendChild(B));this.userPanel.appendChild(C)}});null!=this.dropbox&&e(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var A=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.dropbox.logout()}),mxResources.get("dropbox"));
+null!=this.oneDrive&&e(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var A=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&
+e(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var A=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&e(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,
+function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var A=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&e(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==
+TrelloFile){var A=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(u=this.getCurrentFile(),null!=u&&u.isRealtimeEnabled()&&u.isRealtimeSupported()&&(e=document.createElement("div"),e.style.padding="10px",e.style.whiteSpace="nowrap",e.style.borderTop="1px solid rgb(224, 224, 224)",
+e.style.marginTop="4px",e.style.textAlign="center",e.style.padding="10px",e.style.fontSize="9pt",z=u.getRealtimeError(),1!=u.getRealtimeState()&&(mxUtils.write(e,mxResources.get("realtimeCollaboration")+": "+(null!=z&&null!=z.message?z.message:mxResources.get("disconnected"))),this.userPanel.appendChild(e))));document.body.appendChild(this.userPanel)}mxEvent.consume(d)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||null==this.userPanel||null==this.userPanel.parentNode||
+this.userPanel.parentNode.removeChild(this.userPanel)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(e){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
+var 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);c.appendChild(k);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(e);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(e,c){null!=e&&e.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var d=Menus.prototype.init;
+Menus.prototype.init=function(){function e(n,v,H){this.ui=n;this.previousExtFonts=this.extFonts=v;this.prevCustomFonts=this.customFonts=H}d.apply(this,arguments);var c=this.editorUi,k=c.editor.graph,m=mxUtils.bind(k,k.isEnabled),u=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),z=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),C=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),A="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));c.actions.addAction("new...",function(){var n=c.isOffline();if(n||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var v=new NewDialog(c,n,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(v.container,n?350:620,n?70:460,!0,!0,function(K){c.sidebar.hideTooltip();K&&null==c.getCurrentFile()&&c.showSplash()});
+v.init()}else{var H=function(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}};n=new TemplatesDialog(c,function(K,N,I){var M=I.libs,Q=I.clibs;c.pickFolder(c.mode,function(P){c.createFile(N,K,null!=M&&0<M.length?M:null,null,function(){c.hideDialog()},null,P,null,null!=Q&&0<Q.length?Q:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(K,N,I){var M=new Date;M.setDate(M.getDate()-
+7);c.drive.listFiles(null,M,I?!0:!1,function(Q){for(var P=[],U=0;U<Q.items.length;U++)P.push(H(Q.items[U]));K(P)},N)},function(K,N,I,M){c.drive.listFiles(K,null,M?!0:!1,function(Q){for(var P=[],U=0;U<Q.items.length;U++)P.push(H(Q.items[U]));N(P)},I)},function(K,N,I){c.drive.getFile(K.id,function(M){N(M.data)},I)},null,null,!1,!1);c.showDialog(n.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(k.isEnabled()&&
+!k.isCellLocked(k.getDefaultParent())){var n=new NewDialog(c,null,!1,function(v){c.hideDialog();if(null!=v){var H=c.editor.graph.getFreeInsertPoint();k.setSelectionCells(c.importXml(v,Math.max(H.x,20),Math.max(H.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(n.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});n.init()}})).isEnabled=m;var B=c.actions.addAction("shareCursor",
+function(){c.setShareCursorPosition(!c.isShareCursorPosition())});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.isShareCursorPosition()});B=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.isShowRemoteCursors()});B=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==
+mxConstants.POINTS});B=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});B=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});B=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
+B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["points","inches","millimeters","meters"],v)})));B=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});B.setEnabled(c.canvasSupported&&9!=document.documentMode);
+B.setToggleAction(!0);B.setSelectedCallback(function(){return null!=c.ruler});B=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});B.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;B.setToggleAction(!0);B.setSelectedCallback(function(){return"1"==urlParams.embedInline?
+Editor.inlineFullscreen:null!=document.fullscreenElement});B=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(n){c.setDarkMode(!Editor.isDarkMode());n=mxSettings.getUi();"atlas"!=n&&"min"!=n&&"sketch"!=n&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.isDarkMode()});B=c.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(n){c.setCurrentTheme("sketch"==Editor.currentTheme?
+"":"sketch")}));B.setToggleAction(!0);B.setSelectedCallback(function(){return"sketch"==Editor.currentTheme});B=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(n){c.setSketchMode(!Editor.sketchMode)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){var n=new FilePropertiesDialog(c);c.showDialog(n.container,320,120,!0,!0);n.init()}).isEnabled=m;window.mxFreehand&&(c.actions.put("insertFreehand",
+new Action(mxResources.get("freehand")+"...",function(){if(k.isEnabled()){if(null==c.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,n?120:84,n)}k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing();c.freehandWindow.window.setVisible(k.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",
+function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var v=null==c.pages||1>=c.pages.length,H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatXml"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(H);var K=c.addCheckbox(n,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),N=c.addCheckbox(n,mxResources.get("compressed"),!0),I=c.addCheckbox(n,mxResources.get("allPages"),!v,v);I.style.marginBottom="16px";mxEvent.addListener(K,
+"change",function(){K.checked?I.setAttribute("disabled","disabled"):I.removeAttribute("disabled")});n=new CustomDialog(c,n,mxUtils.bind(this,function(){c.downloadFile("xml",!N.checked,null,!K.checked,v||!I.checked)}),null,mxResources.get("export"));c.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(n,v,H,K,N,I,M,Q,P){M=[];P&&M.push("tags=%7B%7D");
+n=new EmbedDialog(c,c.createLink(n,v,H,K,N,I,null,!0,M));c.showDialog(n.container,450,240,!0,!0);n.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(n){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,n,function(v,H,K,N,I,M,Q,P,U,W,p){c.createHtml(v,H,K,N,I,M,Q,P,U,W,p,mxUtils.bind(this,function(D,L){var V=c.getBaseFilename(Q);
+D='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(V)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+D+"\n"+L+"\n</body>\n</html>";c.saveData(V+(".drawio"==V.substring(V.lenth-7)?"":".drawio")+".html","html",D,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var n=null==c.pages||
+1>=c.pages.length,v=document.createElement("div");v.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatPdf"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(H);var K=function(){Q!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!k.pageVisible):(L.setAttribute("disabled","disabled"),L.checked=!1)};H=200;var N=1,I=null;if(c.pdfPageExport&&!n){var M=function(){p.value=Math.max(1,Math.min(N,Math.max(parseInt(p.value),
+parseInt(U.value))));U.value=Math.max(1,Math.min(N,Math.min(parseInt(p.value),parseInt(U.value))))},Q=c.addRadiobox(v,"pages",mxResources.get("allPages"),!0),P=c.addRadiobox(v,"pages",mxResources.get("pages")+":",!1,null,!0),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";v.appendChild(U);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));v.appendChild(W);
+var p=U.cloneNode(!0);v.appendChild(p);mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(p,"focus",function(){P.checked=!0});mxEvent.addListener(U,"change",M);mxEvent.addListener(p,"change",M);if(null!=c.pages&&(N=c.pages.length,null!=c.currentPage))for(M=0;M<c.pages.length;M++)if(c.currentPage==c.pages[M]){I=M+1;U.value=I;p.value=I;break}U.setAttribute("max",N);p.setAttribute("max",N);mxUtils.br(v);var D=c.addRadiobox(v,"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),
+L=c.addCheckbox(v,mxResources.get("crop"),!1,!0),V=c.addCheckbox(v,mxResources.get("grid"),!1,!1);mxEvent.addListener(Q,"change",K);mxEvent.addListener(P,"change",K);mxEvent.addListener(D,"change",K);H+=64}else D=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),L=c.addCheckbox(v,mxResources.get("crop"),!k.pageVisible||!c.pdfPageExport,!c.pdfPageExport),V=c.addCheckbox(v,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(D,"change",K);K=!mxClient.IS_CHROMEAPP&&
+!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var O=null,R=null;if(EditorUi.isElectronApp||K)R=c.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),H+=30;K&&(O=c.addCheckbox(v,mxResources.get("transparentBackground"),!1),H+=30);v=new CustomDialog(c,v,mxUtils.bind(this,function(){var S=null;if(!n){S=parseInt(U.value);var X=parseInt(p.value);S=Q.checked||S==I&&X==I?null:{from:Math.max(0,Math.min(N-1,S-1)),to:Math.max(0,Math.min(N-1,X-1))}}c.downloadFile("pdf",
+null,null,!D.checked,n?!0:!Q.checked&&null==S,!L.checked,null!=O&&O.checked,null,null,V.checked,null!=R&&R.checked,S)}),null,mxResources.get("export"));c.showDialog(v.container,300,H,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function n(){null!=v&&v.removeDraft();
+c.fileLoaded(null)}var v=c.getCurrentFile();null!=v&&v.isModified()?c.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var n=k.getSelectionCell(),v=k.view.getState(n);null!=v&&null!=v.shape&&null!=v.shape.stencil&&(n=new EditShapeDialog(c,n,mxResources.get("editShape")+":",630,400),c.showDialog(n.container,640,480,!0,
+!1),n.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(n,v){c.spinner.stop();n=new RevisionDialog(c,n,v);c.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,function(n){c.handleError(n)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},
+null,null,Editor.ctrlKey+"+S");B=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(B.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var n=c.getCurrentFile();null!=n&&(window.drawdata=c.getFileData(),n=null!=n.getTitle()?n.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":
+"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&(B=c.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(c);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!c.isMathEnabled();k.model.execute(n)}),B.setToggleAction(!0),B.setSelectedCallback(function(){return c.isMathEnabled()}),B.isEnabled=m);isLocalStorage&&(B=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),
+B.setToggleAction(!0),B.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var J=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});J.setToggleAction(!0);J.setSelectedCallback(function(){return J.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var n=k.getSelectionCells(),v=[],H=0;H<n.length;H++)k.getModel().isVertex(n[H])&&v.push(n[H]);0<v.length&&(n=new EditGeometryDialog(c,v),c.showDialog(n.container,200,
+270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");var f=null;c.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(f=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=f&&k.pasteStyle(f,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var n=
+new BackgroundImageDialog(c,function(v){c.setBackgroundImage(v)});c.showDialog(n.container,400,170,!0,!0);n.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,H,K,N,I,M,Q,P,U,W,p,D,L,V){P=parseInt(n);!isNaN(P)&&0<P&&(V?c.downloadFile("remoteSvg",null,null,H,null,Q,v,n,M,null,N):c.exportSvg(P/100,v,H,
+K,N,I,M,!Q,!1,U,p,D,L))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,H,K,N,I,M,Q,P,U,W,p,D){n=parseInt(n);!isNaN(n)&&0<n&&c.exportImage(n/100,v,H,K,N,M,!Q,!1,null,W,null,p,D)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,H,K,N){c.downloadFile(v?"xmlpng":"png",null,null,n,null,null,H,K,N)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,H,K,N,I,M,Q,P,U,W,p,D){n=parseInt(n);!isNaN(n)&&0<n&&c.exportImage(n/100,!1,
+H,K,!1,M,!Q,!1,"jpeg",W,null,p,D)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,H,K,N){c.downloadFile("jpeg",null,null,n,null,null,null,K,N)}),!0,!0)}));B=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),v=mxUtils.getXml(0==n.length?c.editor.getGraphXml():k.encodeCells(n));c.copyImage(n,v)}));B.visible=
+Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;B=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));
c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,
-212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));g=c.actions.addAction("findReplace",mxUtils.bind(this,function(u,z){var F=(u=l.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))?"findReplace":"find";z=F+"Window";if(null==this[z]){var J=u?"min"==uiTheme?330:300:240;this[z]=new FindWindow(c,document.body.offsetWidth-(J+20),100,J,u?"min"==uiTheme?304:288:170,u);this[z].window.addListener("show",function(){c.fireEvent(new mxEventObject(F))});this[z].window.addListener("hide",function(){c.fireEvent(new mxEventObject(F))});
-this[z].window.setVisible(!0)}else this[z].window.setVisible(!this[z].window.isVisible())}),null,null,Editor.ctrlKey+"+F");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){var u=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[u]&&this[u].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var u=null==c.pages||1>=c.pages.length;if(u)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace=
-"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(F);var J=c.addCheckbox(z,mxResources.get("allPages"),!u,u);J.style.marginBottom="16px";u=new CustomDialog(c,z,mxUtils.bind(this,function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
-function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var z=document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(u);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(K){mxEvent.getSource(K)!=u&&
-(u.checked=!u.checked)});header=z}var F=localStorage.getItem(Editor.configurationKey);z=[[mxResources.get("reset"),function(K,H){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(K)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(N){c.handleError(N)}})},"Shift+Click to Reset Settings"]];var J=c.actions.get("plugins");
-null!=J&&"1"==urlParams.sketch&&z.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||z.push([mxResources.get("share"),function(K,H){if(0<H.value.length)try{var N=JSON.parse(H.value),U=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),Q=new EmbedDialog(c,U);c.showDialog(Q.container,450,240,!0);Q.init()}catch(V){c.handleError(V)}else c.handleError({message:mxResources.get("invalidInput")})}]);z=new TextareaDialog(c,mxResources.get("configuration")+
-":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(K){if(null!=K)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),K==F)c.hideDialog();else{if(0<K.length){var H=JSON.parse(K);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(N){c.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-z,u.parentNode);c.showDialog(z.container,620,460,!0,!1);z.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,z){var F=mxUtils.bind(this,function(K){var H=""==K?mxResources.get("automatic"):mxLanguageMap[K],N=null;""!=H&&(N=u.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(K);mxSettings.save();mxClient.language=K;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
-z),(K==mxLanguage||""==K&&null==mxLanguage)&&u.addCheckmark(N,Editor.checkmarkImage));return N});F("");u.addSeparator(z);for(var J in mxLanguageMap)F(J)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(u){var z=q.apply(this,arguments);if(null!=z&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var F=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=F){var J=z.addMenu("",F.funct);J.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
-"theme":"language"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundImage="url("+Editor.globeImage+")";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";J.style.display="inline-block";J.style.verticalAlign="top";J.style.marginLeft="2px";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right=
-"11px",J.style.top="10px"):(J.style.right="14px",J.style.top="5px");"1"==urlParams.winCtrls&&(J.style.right="95px",J.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(J);z.langIcon=J;"1"==urlParams["live-ui"]?(F=mxUtils.bind(this,function(){J.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",F),F()):mxUtils.setOpacity(J,40);this.editorUi.switchThemeElt=
-J}}return z}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(z){if(0<z.length)try{var F=JSON.parse(z);c.executeLayouts(l.createLayouts(F));c.customLayoutConfig=F;c.hideDialog()}catch(J){c.handleError(J)}},null,null,null,null,function(z,
-F){var J=mxUtils.button(mxResources.get("copy"),function(){try{var K=F.value;F.value=JSON.stringify(JSON.parse(K));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));F.value=K}catch(H){c.handleError(H)}});J.setAttribute("title","copy");J.className="geBtn";z.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,
-620,460,!0,!0);u.init()});g=this.get("viewZoom");var p=g.funct;g.funct=mxUtils.bind(this,function(u,z){p.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(u,["-","outline","fullscreen"],z)});g=this.get("layout");var y=g.funct;g.funct=function(u,z){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){var F=null,J=20,K=20,H=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=F){var L=c.editor.graph,T=new mxOrgChartLayout(L,
-F,J,K),O=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(O=L.getSelectionCell());T.execute(O)}},N=document.createElement("div"),U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,mxResources.get("orgChartType")+": ");N.appendChild(U);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";U=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var V=0;V<U.length;V++){var W=document.createElement("option");mxUtils.write(W,U[V]);W.value=V;2==V&&W.setAttribute("selected","selected");Q.appendChild(W)}mxEvent.addListener(Q,"change",function(){F=Q.value});N.appendChild(Q);U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,
-mxResources.get("parentChildSpacing")+": ");N.appendChild(U);var t=document.createElement("input");t.type="number";t.value=J;t.style.width="200px";t.style.boxSizing="border-box";N.appendChild(t);mxEvent.addListener(t,"change",function(){J=t.value});U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,mxResources.get("siblingSpacing")+": ");N.appendChild(U);var D=document.createElement("input");D.type="number";D.value=K;D.style.width=
-"200px";D.style.boxSizing="border-box";N.appendChild(D);mxEvent.addListener(D,"change",function(){K=D.value});N=new CustomDialog(c,N,function(){null==F&&(F=2);c.loadOrgChartLayouts(H)});c.showDialog(N.container,355,140,!0,!0)},z,null,m());u.addSeparator(z);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(l);F.checkOverlap=!0;c.prompt(mxResources.get("spacing"),F.spacing,mxUtils.bind(this,function(J){F.spacing=J;c.executeLayout(function(){F.execute(l.getDefaultParent(),
-l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),z);u.addSeparator(z);c.menus.addMenuItem(u,"runLayout",z,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,z){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],z);else{var F=u.addItem("Search:",null,null,z,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";F.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");
-J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var H=mxUtils.trim(J.value);13==K.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
-K.keyCode&&(J.value="")}));F.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickStart website support -".split(" "),
-z),"1"!=urlParams.disableUpdate&&this.addMenuItems(u,["check4Updates"],z),this.addMenuItems(u,["openDevTools","-","about"],z)):this.addMenuItems(u,"- keyboardShortcuts quickStart support - about".split(" "),z)}"1"==urlParams.test&&(u.addSeparator(z),this.addSubmenu("testDevelop",u,z))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var u=prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,
-l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
-mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var u=l.cloneCells(l.getSelectionCells()),z=l.getBoundingBoxFromGeometry(u);u=l.moveCells(u,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(u)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=
-l.getGraphBounds(),z=l.view.translate,F=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",u.x/F-z.x,u.y/F-z.y,u.width/F,u.height/F,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(z){if(0<z.length)try{var F=function(U){function Q(X){if(null==R[X]){if(R[X]=!0,null!=t[X]){for(;0<t[X].length;){var Z=
-t[X].pop();Q(Z)}delete t[X]}}else mxLog.debug(V+": Visited: "+X)}var V=U.parentNode.id,W=U.childNodes;U={};for(var t={},D=null,L={},T=0;T<W.length;T++){var O=W[T];if(null!=O.id&&0<O.id.length)if(null==U[O.id]){U[O.id]=O.id;var P=O.getAttribute("parent");null==P?null!=D?mxLog.debug(V+": Multiple roots: "+O.id):D=O.id:(null==t[P]&&(t[P]=[]),t[P].push(O.id))}else L[O.id]=O.id}W=Object.keys(L);0<W.length?(W=V+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(V+": Checked");
-var R={};null==D?mxLog.debug(V+": No root"):(Q(D),Object.keys(R).length!=Object.keys(U).length&&(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",t)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var J=mxUtils.parseXml(z),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var H=c.getHashValueForPages(K);mxLog.debug("Checksum: ",H)}catch(U){mxLog.debug("Error: ",U.message)}else mxLog.debug("No pages found for checksum");
-var N=J.getElementsByTagName("root");for(z=0;z<N.length;z++)F(N[z]);mxLog.show()}catch(U){c.handleError(U),null!=window.console&&console.error(U)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(z){var F=c.getCurrentFile();if(0<z.length&&null!=F)try{var J=JSON.parse(z);F.patch([J],null,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,
-null,!0,null,"Patch",null,[["Snapshot",function(z,F){A=c.getPagesForXml(c.getFileData(!0));u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(z,F){try{u.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),u.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):u.textarea.value=JSON.stringify(c.diffPages(A,
-c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var z=u.getShadowPages();null!=z&&
-(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",c.diffPages(z,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,z)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,
-u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
-c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var u=l.model.cells,z=0,F=[],J=[],K;for(K in u){var H=u[K],N=l.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];
-null!=N&&"data:"==N.substring(0,5)&&(null==F[N]&&(F[N]=(F[N]||0)+1,z++),J.push(H))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",z,"image(s) from",J.length,"cell(s): ",[J,F])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var u=new mxImageExport,z=l.getGraphBounds(),F=l.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");
-J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-z.x)/F),Math.floor((1-z.y)/F));J.scale(1/F);var H=0,N=J.save;J.save=function(){H++;N.apply(this,arguments)};var U=J.restore;J.restore=function(){H--;U.apply(this,arguments)};var Q=u.drawShape;u.drawShape=function(V){mxLog.debug("entering shape",V,H);Q.apply(this,arguments);mxLog.debug("leaving shape",V,H)};u.drawState(l.getView().getState(l.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",H)}));
-c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),z)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?
-c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(u){l.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),
-u.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(z,F,J,K,H,N,U,Q,V,W,t){c.createHtml(z,F,J,K,H,N,U,Q,V,W,t,mxUtils.bind(this,function(D,L){var T=new EmbedDialog(c,D+"\n"+L,null,null,function(){var O=window.open(),P=O.document;
-if(null!=P){"CSS1Compat"===document.compatMode&&P.writeln("<!DOCTYPE html>");P.writeln("<html>");P.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');P.writeln("<body>");P.writeln(D);var R=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;R&&P.writeln(L);P.writeln("</body>");P.writeln("</html>");P.close();if(!R){var X=O.document.createElement("div");X.marginLeft="26px";X.marginTop="26px";mxUtils.write(X,mxResources.get("updatingDocument"));
-R=O.document.createElement("img");R.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");R.style.marginLeft="6px";X.appendChild(R);O.document.body.insertBefore(X,O.document.body.firstChild);window.setTimeout(function(){var Z=document.createElement("script");Z.type="text/javascript";Z.src=/<script.*?src="(.*?)"/.exec(L)[1];P.body.appendChild(Z);X.parentNode.removeChild(X)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});
-c.showDialog(T.container,450,240,!0,!0);T.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(z){c.spinner.stop();null!=z?(z=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));
-c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,z,F,J,K,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,z,F,J,K,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){c.showEmbedImageDialog(function(u,z,F,J,K,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,z,F,J,K,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=l.getGraphBounds();
-c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/l.view.scale)+2,function(z,F,J,K,H,N,U,Q,V){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var t=[];V&&t.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+U+";height:"+Q+';" src="'+c.createLink(z,F,J,K,H,N,W,null,t)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",
-new Action(mxResources.get("notion")+"...",function(){var u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));u.appendChild(z);mxEvent.addListener(z,"click",function(F){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(F)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,J,K,H,N,U,Q,V,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();var D=["border=0"];W&&D.push("tags=%7B%7D");t=new EmbedDialog(c,c.createLink(F,J,K,H,N,U,t,null,D,!0));c.showDialog(t.container,450,240,!0,!0);t.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
-"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,z,F,J,K,H,N,U,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=[];Q&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(u,z,F,J,K,H,V,null,W));c.showDialog(V.container,450,240,!0,!0);V.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
-c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=c.actions.addAction("scratchpad",
-function(){c.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});g=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});g.label=mxResources.get("searchShapes");g.setToggleAction(!0);g.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){l.isEditing()&&l.stopEditing();var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var F=c.createLoadMessage("save");F.xml=z;u&&(F.exit=!0);z=JSON.stringify(F)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==
-EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
-"";(window.opener||window.parent).postMessage(z,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,z){c.isExportToCanvas()?(this.addMenuItems(u,["exportPng"],z),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],z)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],z);this.addMenuItems(u,["exportSvg",
-"-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(u,["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],z);this.addMenuItems(u,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(u.addSeparator(z),this.addMenuItem(u,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
-function(u,z){function F(H){H.pickFile(function(N){c.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(N,function(U){var Q="data:image/"==U.getData().substring(0,11)?K(U.getTitle()):"text/xml";/\.svg$/i.test(U.getTitle())&&!c.editor.isDataSvg(U.getData())&&(U.setData(Editor.createSvgDataUri(U.getData())),Q="image/svg+xml");J(U.getData(),Q,U.getTitle())},function(U){c.handleError(U,null!=U?mxResources.get("errorLoadingFile"):null)},H==c.drive)},!0)}var J=mxUtils.bind(this,function(H,
-N,U){var Q=l.view,V=l.getGraphBounds(),W=l.snap(Math.ceil(Math.max(0,V.x/Q.scale-Q.translate.x)+4*l.gridSize)),t=l.snap(Math.ceil(Math.max(0,(V.y+V.height)/Q.scale-Q.translate.y)+4*l.gridSize));"data:image/"==H.substring(0,11)?c.loadImage(H,mxUtils.bind(this,function(D){var L=!0,T=mxUtils.bind(this,function(){c.resizeImage(D,H,mxUtils.bind(this,function(O,P,R){O=L?Math.min(1,Math.min(c.maxImageSize/P,c.maxImageSize/R)):1;c.importFile(H,N,W,t,Math.round(P*O),Math.round(R*O),U,function(X){c.spinner.stop();
-l.setSelectionCells(X);l.scrollCellToVisible(l.getSelectionCell())})}),L)});H.length>c.resampleThreshold?c.confirmImageResize(function(O){L=O;T()}):T()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(H,N,W,t,0,0,U,function(D){c.spinner.stop();l.setSelectionCells(D);l.scrollCellToVisible(l.getSelectionCell())})}),K=mxUtils.bind(this,function(H){var N="text/xml";/\.png$/i.test(H)?N="image/png":/\.jpe?g$/i.test(H)?N="image/jpg":/\.gif$/i.test(H)?
-N="image/gif":/\.pdf$/i.test(H)&&(N="application/pdf");return N});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){F(c.drive)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){F(c.oneDrive)},z):E&&"function"===typeof window.OneDriveClient&&
-u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){F(c.dropbox)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){F(c.gitHub)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+
-"...",null,function(){F(c.gitLab)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){F(c.trello)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},
-z);c.isOffline()||(u.addSeparator(z),u.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var U=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(N),function(Q){J(Q,U,N)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==U)}},mxResources.get("url"));
-c.showDialog(H.container,300,80,!0,!0);H.init()},z))}))).isEnabled=m;this.put("appearance",new Menu(mxUtils.bind(this,function(u,z){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(u,["toggleDarkMode"],z);z=u.addItem(mxResources.get("simple"),null,function(){c.setCurrentTheme("sketch"==Editor.currentTheme?"":"sketch")},z);"sketch"==Editor.currentTheme&&u.addCheckmark(z,Editor.checkmarkImage)})));this.put("theme",new Menu(mxUtils.bind(this,function(u,z){var F="1"==urlParams.sketch?
-"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(u,["toggleDarkMode"],z);u.addSeparator(z);var J=u.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},z);"kennedy"!=F&&"atlas"!=F&&"dark"!=F&&"min"!=F&&"sketch"!=F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("kennedy")},z);"kennedy"!=F&&"dark"!=F||u.addCheckmark(J,Editor.checkmarkImage);
-J=u.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},z);"sketch"==F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},z);"min"==F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},z);"atlas"==F&&u.addCheckmark(J,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();
-if(null!=u)if(u.constructor==LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(F,J){u.invalidFileHandle=null;u.fileHandle=F;u.title=J.name;u.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var z=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=u&&F!=u.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
-u.rename(F,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),u.constructor==DriveFile||u.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=F&&0<F.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,
-340,96,!0,!0);z.init()}}));g.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};g.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(null!=u){var z=c.getCopyFilename(u);u.constructor==DriveFile?(z=new CreateDialog(c,z,mxUtils.bind(this,function(F,J){"_blank"==J?c.editor.editAsNew(c.getFileData(),F):("download"==J&&(J=App.MODE_GOOGLE),null!=F&&0<F.length&&(J==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
-u.saveAs(F,mxUtils.bind(this,function(K){u.desc=K;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(H){c.handleError(H)}))}),mxUtils.bind(this,function(K){c.handleError(K)})):c.createFile(F,c.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(z.container,420,380,!0,!0),
-z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(u,z){c.appIconClicked(z)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var z=!1;if(u.getMode()==App.MODE_GOOGLE&&null!=u.desc.parents)for(var F=0;F<u.desc.parents.length;F++)if(u.desc.parents[F].isRoot){z=!0;break}c.pickFolder(u.getMode(),
-mxUtils.bind(this,function(J){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(J,mxUtils.bind(this,function(K){c.spinner.stop()}),mxUtils.bind(this,function(K){c.handleError(K)}))}),null,!0,z)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,["publishLink"],z)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var u=
-c.getCurrentFile();null!=u&&u.share()}catch(z){c.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||this.addMenuItems(u,["liveImage","-"],z);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(u,["embedIframe"],z);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
-z)})));c.addInsertItem=function(u,z,F,J){("plantUml"!=J||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var K=new ParseDialog(c,F,J);c.showDialog(K.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else K=new CreateGraphDialog(c,F,J),c.showDialog(K.container,620,420,!0,!1);K.init()}),z,null,m())};var C=function(u){l.getModel().beginUpdate();try{u=l.addCell(u),l.fireEvent(new mxEventObject("cellsInserted",
-"cells",[u]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(u);l.setSelectionCell(u);l.container.focus();l.editAfterInsert&&l.startEditing(u);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(u))},0);return u},B=function(u,z,F,J,K){u=new mxCell(u,new mxGeometry(0,0,z,F),J);u.vertex=!0;null==K&&(K=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([u],!0)));u.geometry.x=K.x;u.geometry.y=K.y;return C(u)};c.actions.put("insertText",new Action(mxResources.get("text"),
-function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(B("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",
-120,60,"whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
-B("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(u){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var z=l.defaultEdgeLength;u=null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint();null==u&&(u=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,z,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-F.geometry.setTerminalPoint(u,!0);F.geometry.setTerminalPoint(new mxPoint(u.x+F.geometry.width,u.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=m;g=c.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){null!=c.formatWindow&&c.formatWindow.window.setVisible(!c.formatWindow.window.isVisible())}));g.shortcut=c.actions.get("formatPanel").shortcut;g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-c.formatWindow&&c.formatWindow.window.isVisible()}));g=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow&&c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible())}));g.shortcut=c.actions.get("formatPanel").shortcut;g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()}));c.addInsertMenuItems=mxUtils.bind(this,function(u,z,F){for(var J=0;J<F.length;J++)"-"==
-F[J]?u.addSeparator(z):c.addInsertItem(u,z,mxResources.get(F[J])+"...",F[J])});this.put("insert",new Menu(mxUtils.bind(this,function(u,z){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(c.menus.addMenuItems(u,["toggleShapes"],z),c.menus.addSubmenu("table",u,z),u.addSeparator(z),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(u,["insertTemplate"],z),c.menus.addMenuItems(u,["insertImage","insertLink","-"],z),c.menus.addSubmenu("insertAdvanced",u,z,mxResources.get("advanced")),c.menus.addSubmenu("layout",
-u,z)):(this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],z),u.addSeparator(z),this.addSubmenu("insertLayout",u,z,mxResources.get("layout")),this.addSubmenu("insertAdvanced",u,z,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",u,z))})));this.put("table",new Menu(mxUtils.bind(this,
-function(u,z){c.menus.addInsertTableCellItem(u,z)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,z){c.addInsertMenuItems(u,z,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,z){c.addInsertMenuItems(u,z,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();c.showImportCsvDialog()},
-z,null,m());"min"==uiTheme&&this.addMenuItems(u,["-","createShape","editDiagram"],z)})));this.put("openRecent",new Menu(function(u,z){var F=c.getRecent();if(null!=F){for(var J=0;J<F.length;J++)(function(K){var H=K.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");u.addItem(K.title+" ("+mxResources.get(H)+")",null,function(){c.loadFile(K.id)},z)})(F[J]);u.addSeparator(z)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(u,
-z){null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
-function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},
-z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},
-z);c.isOffline()||(u.addSeparator(z),u.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));c.showDialog(F.container,300,80,!0,!0);F.init()},z))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(u,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=
-c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z)})),this.put("openLibraryFrom",new Menu(function(u,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+
-"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+
-"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",
-null,function(){c.pickLibrary(App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(u.addSeparator(z),
-u.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var K=J;c.editor.isCorsEnabledForUrl(J)||(K=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(K,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,H.getText(),J))}catch(N){c.handleError(N,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),
-c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(F.container,300,80,!0,!0);F.init()},z));"1"==urlParams.confLib&&(u.addSeparator(z),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-g=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var u=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));g=this.get("viewPanels");var I=g.funct;g.funct=
-function(u,z){I.apply(this,arguments);c.menus.addMenuItems(u,["tags"],z);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],z)};this.put("view",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(u,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(u,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",u,z);this.addMenuItems(u,"- scrollbars tooltips ruler - grid guides".split(" "),z);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(u,"shadowVisible",z);this.addMenuItems(u,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(u,
-["-","fullscreen"],z)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;g=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();M=!M;c.alert(mxResources.get("restartForChangeRequired"))});g.setToggleAction(!0);g.setSelectedCallback(function(){return M});var G="1"==urlParams.enableStoreBkp;g=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();G=!G});g.setToggleAction(!0);g.setSelectedCallback(function(){return G});c.actions.addAction("openDevTools",function(){c.openDevTools()});
-c.actions.addAction("drafts...",function(){var u=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(z){z=parseInt(z);0<=z&&(EditorUi.draftSaveDelay=1E3*z,EditorUi.enableDrafts=0<z,mxSettings.setDraftSaveDelay(z),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(u.container,320,80,!0,!0);u.init()})}var S=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(u,z){var F="sketch"==
-Editor.currentTheme||"1"==urlParams.sketch;if(F||"min"==uiTheme){null==S||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",u,z);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",u,z);c.menus.addSubmenu("units",u,z);u.addSeparator(z);F||c.menus.addMenuItems(u,["scrollbars","-","tooltips","copyConnect","collapseExpand"],z);"1"==urlParams.embedInline||F||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||c.mode==App.MODE_ATLAS||
-c.menus.addMenuItems(u,["-","showStartScreen","search","scratchpad"],z);u.addSeparator(z);F&&c.menus.addMenuItems(u,["copyConnect","collapseExpand","tooltips","-"],z);EditorUi.isElectronApp&&c.menus.addMenuItems(u,["-","spellCheck","autoBkp","drafts","-"],z);var J=c.getCurrentFile();null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(u,["-","showRemoteCursors","shareCursor","-"],z);Graph.translateDiagram&&c.menus.addMenuItems(u,["diagramLanguage"],z);c.mode!=App.MODE_ATLAS&&
-c.menus.addMenuItem(u,"configuration",z);F||!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(u,"plugins",z);u.addSeparator(z)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",u,z),"1"!=urlParams.embed&&this.addSubmenu("theme",u,z),u.addSeparator(z),"undefined"!==typeof MathJax&&(F=this.addMenuItem(u,"mathematicalTypesetting",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")),
-EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp","drafts"],z),this.addMenuItems(u,["copyConnect","collapseExpand","-"],z),"1"!=urlParams.embed&&(J=c.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],z),this.addMenuItems(u,["autosave"],z)),u.addSeparator(z),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",z),this.addMenuItems(u,["-","editDiagram"],z),Graph.translateDiagram&&this.addMenuItems(u,
-["diagramLanguage"]),u.addSeparator(z),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(u,["showStartScreen"],z),this.addMenuItems(u,["configuration"],z),u.addSeparator(z),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function K(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var H=new TemplatesDialog(c,function(N){console.log(arguments)},null,
-null,null,"user",function(N,U,Q){var V=new Date;V.setDate(V.getDate()-7);c.drive.listFiles(null,V,Q?!0:!1,function(W){for(var t=[],D=0;D<W.items.length;D++)t.push(K(W.items[D]));N(t)},U)},function(N,U,Q,V){c.drive.listFiles(N,null,V?!0:!1,function(W){for(var t=[],D=0;D<W.items.length;D++)t.push(K(W.items[D]));U(t)},Q)},function(N,U,Q){c.drive.getFile(N.id,function(V){U(V.data)},Q)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
-!0)}),this.addMenuItem(u,"templates",z))})));this.put("diagram",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();c.menus.addSubmenu("extras",u,z,mxResources.get("preferences"));u.addSeparator(z);var J="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(u,"new open - synchronize - save saveAs -".split(" "),z);else if("1"==urlParams.embed||c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
-c.menus.addMenuItems(u,["-","save"],z);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(u,["saveAndExit"],z),null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["revisionHistory"],z);u.addSeparator(z)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(u,["save","synchronize","-"],z):"1"!=urlParams.noFileMenu&&(J?c.menus.addSubmenu("file",u,z):(c.menus.addMenuItems(u,["new"],z),c.menus.addSubmenu("openFrom",
-u,z),isLocalStorage&&this.addSubmenu("openRecent",u,z),u.addSeparator(z),null!=F&&(F.constructor==DriveFile&&c.menus.addMenuItems(u,["share"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||F.constructor==LocalFile||c.menus.addMenuItems(u,["synchronize"],z)),u.addSeparator(z),c.menus.addSubmenu("save",u,z)));c.menus.addSubmenu("exportAs",u,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(u,["import"],z):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",u,z);c.menus.addMenuItems(u,
-["-","findReplace"],z);c.commentsSupported()&&c.menus.addMenuItems(u,["comments","-"],z);c.menus.addMenuItems(u,["toggleFormat","layers","tags","-","pageSetup"],z);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(u,["print"],z);J||null==F||null==c.fileNode||"1"==urlParams.embedInline||(F=null!=F.getTitle()?F.getTitle():c.defaultFilename,/(\.html)$/i.test(F)||/(\.svg)$/i.test(F)||this.addMenuItems(u,["-","properties"]));u.addSeparator(z);c.menus.addSubmenu("help",
-u,z);"1"==urlParams.embed||c.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||c.mode==App.MODE_ATLAS)&&c.menus.addMenuItems(u,["-","exit"],z):"1"!=urlParams.noFileMenu&&c.menus.addMenuItems(u,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();null!=F&&F.constructor==DriveFile?c.menus.addMenuItems(u,["save","makeCopy","-","rename","moveToFolder"],z):(c.menus.addMenuItems(u,["save","saveAs","-","rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):c.menus.addMenuItems(u,["makeCopy"],z));c.menus.addMenuItems(u,["-","autosave"],z);null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["-","revisionHistory"],z)})));this.put("file",new Menu(mxUtils.bind(this,function(u,z){var F="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",u,z),this.addSubmenu("exportAs",u,z),this.addSubmenu("embed",u,z),"1"==urlParams.libraries&&
-(this.addMenuItems(u,["-"],z),this.addSubmenu("newLibrary",u,z),this.addSubmenu("openLibraryFrom",u,z)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],z),this.addMenuItems(u,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],z):(this.addMenuItems(u,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],z))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,
-["exit"],z);else if(F){F=c.getCurrentFile();c.menus.addMenuItems(u,["new"],z);c.menus.addSubmenu("openFrom",u,z);isLocalStorage&&this.addSubmenu("openRecent",u,z);u.addSeparator(z);c.menus.addMenuItems(u,["-","save"],z);null!=F&&F.constructor==DriveFile||c.menus.addMenuItems(u,["saveAs"],z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||c.menus.addMenuItems(u,["synchronize"],z);null!=F&&F.constructor==DriveFile?c.menus.addMenuItems(u,"- rename makeCopy - moveToFolder openFolder".split(" "),
-z):(c.menus.addMenuItems(u,["-","rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):c.menus.addMenuItems(u,["makeCopy"],z));null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["-","revisionHistory"],z);if(null!=F){if(null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=F.getTitle()?F.getTitle():c.defaultFilename;(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
-this.addMenuItems(u,["properties"],z)}F.constructor==DriveFile&&c.menus.addMenuItems(u,["share"],z)}c.menus.addMenuItems(u,["-","autosave"],z)}else F=this.editorUi.getCurrentFile(),null!=F&&F.constructor==DriveFile?(F.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],z),this.addMenuItems(u,["save","-","share"],z),J=this.addMenuItem(u,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize"),u.addSeparator(z)):
-this.addMenuItems(u,["new"],z),this.addSubmenu("openFrom",u,z),isLocalStorage&&this.addSubmenu("openRecent",u,z),null!=F&&F.constructor==DriveFile?this.addMenuItems(u,"new - rename makeCopy openFolder moveToFolder".split(" "),z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(u.addSeparator(z),J=this.addMenuItem(u,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),
-this.addMenuItems(u,["-","save","saveAs","-"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==F||this.addMenuItems(u,["share","-"],z),this.addMenuItems(u,["rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):(this.addMenuItems(u,["makeCopy"],z),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(u,["moveToFolder"],z))),u.addSeparator(z),this.addSubmenu("importFrom",
-u,z),this.addSubmenu("exportAs",u,z),u.addSeparator(z),this.addSubmenu("embed",u,z),this.addSubmenu("publish",u,z),u.addSeparator(z),this.addSubmenu("newLibrary",u,z),this.addSubmenu("openLibraryFrom",u,z),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],z),null!=F&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=F.getTitle()?F.getTitle():c.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
-this.addMenuItems(u,["-","properties"])),this.addMenuItems(u,["-","pageSetup"],z),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],z),this.addMenuItems(u,["-","close"])})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var z=u.extFonts,F=0;null!=z&&F<z.length;F++){var J=
-document.getElementById("extFont_"+z[F].name);null!=J&&J.parentNode.removeChild(J)}u.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=z};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,z){for(var F=mxUtils.bind(this,function(t,D,L,T,O){var P=c.editor.graph;T=this.styleChange(u,T||t,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
-"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[t,null!=D?encodeURIComponent(D):null,null]:[t],null,z,function(){"1"!=urlParams["ext-fonts"]?P.setFont(t,D):(document.execCommand("fontname",!1,t),P.addExtFont(t,D));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[t,null!=D?encodeURIComponent(D):null,null]:[t],"cells",
-[P.cellEditor.getEditingCell()]))},function(){P.updateLabelElements(P.getSelectionCells(),function(R){R.removeAttribute("face");R.style.fontFamily=null;"PRE"==R.nodeName&&P.replaceElement(R,"div")});"1"==urlParams["ext-fonts"]&&P.addExtFont(t,D)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",T.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
-function(R){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[t.toLowerCase()];for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==t&&this.customFonts[X].url==D){this.customFonts.splice(X,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Z=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Z&&0<Z.length)for(X=0;X<Z.length;X++)if(Z[X].name==t){Z.splice(X,1);break}var Y=mxUtils.clone(this.customFonts);for(X=0;X<Y.length;X++)if(Y[X].name==
-t){Y.splice(X,1);break}X=new f(this.editorUi,Z,Y);this.editorUi.editor.graph.model.execute(X)}this.editorUi.hideCurrentMenu();mxEvent.consume(R)})));Graph.addFont(t,D);T.firstChild.nextSibling.style.fontFamily=t;null!=O&&T.setAttribute("title",O)}),J={},K=0;K<this.defaultFonts.length;K++){var H=this.defaultFonts[K];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(J[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}u.addSeparator(z);if("1"!=
-urlParams["ext-fonts"]){H=function(t){var D=encodeURIComponent(t.name)+(null==t.url?"":"@"+encodeURIComponent(t.url));if(!J[D]){for(var L=t.name,T=0;null!=U[L.toLowerCase()];)L=t.name+" ("+ ++T+")";null==N[D]&&(Q.push({name:t.name,url:t.url,label:L,title:t.url}),U[L.toLowerCase()]=t,N[D]=t)}};var N={},U={},Q=[];for(K=0;K<this.customFonts.length;K++)H(this.customFonts[K]);for(var V in Graph.recentCustomFonts)H(Graph.recentCustomFonts[V]);Q.sort(function(t,D){return t.label<D.label?-1:t.label>D.label?
-1:0});if(0<Q.length){for(K=0;K<Q.length;K++)F(Q[K].name,Q[K].url,!0,Q[K].label,Q[K].url);u.addSeparator(z)}u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);u.addSeparator(z)}else{V=this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){H={};var W=!1;for(K=0;K<this.customFonts.length;K++)H[this.customFonts[K].name]=!0;for(K=0;K<V.length;K++)H[V[K].name]||(this.customFonts.push(V[K]),
-W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(K=0;K<this.customFonts.length;K++)V=this.customFonts[K].name,H=this.customFonts[K].url,F(V,H,!0),this.editorUi.editor.graph.addExtFont(V,H,!0);u.addSeparator(z);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var t=new f(this.editorUi,[],[]);c.editor.graph.model.execute(t)}),z);u.addSeparator(z)}}u.addItem(mxResources.get("custom")+"...",null,
-mxUtils.bind(this,function(){var t=this.editorUi.editor.graph,D=t.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",T=null;if("1"!=urlParams["ext-fonts"]&&t.isEditing()){var O=t.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(D=Graph.stripQuotes(O.fontFamily),T=Graph.getFontUrl(D,null),null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,L="g"):L="w")))}else O=t.getView().getState(t.getSelectionCell()),null!=O&&(D=O.style[mxConstants.STYLE_FONTFAMILY]||
-D,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?L="g":(L="w",T=O))):(L=O.style.FType||L,"w"==L&&(T=this.editorUi.editor.graph.extFonts,O=null,null!=T&&(O=T.find(function(R){return R.name==D})),T=null!=O?O.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=T&&T.substring(0,PROXY_URL.length)==PROXY_URL&&(T=decodeURIComponent(T.substr((PROXY_URL+"?url=").length)));var P=null;document.activeElement==t.cellEditor.textarea&&(P=
-t.cellEditor.saveSelection());L=new FontDialog(this.editorUi,D,T,L,mxUtils.bind(this,function(R,X,Z){null!=P&&(t.cellEditor.restoreSelection(P),P=null);if(null!=R&&0<R.length)if("1"!=urlParams["ext-fonts"]&&t.isEditing())t.setFont(R,X);else{t.getModel().beginUpdate();try{t.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(t.setCellStyles(mxConstants.STYLE_FONTFAMILY,R),t.setCellStyles("fontSource",null!=X?encodeURIComponent(X):null),t.setCellStyles("FType",null)):(t.setCellStyles(mxConstants.STYLE_FONTFAMILY,
-R),"s"!=Z&&(t.setCellStyles("FType",Z),0==X.indexOf("http://")&&(X=PROXY_URL+"?url="+encodeURIComponent(X)),this.editorUi.editor.graph.addExtFont(R,X)));Z=!0;for(var Y=0;Y<this.customFonts.length;Y++)if(this.customFonts[Y].name==R){Z=!1;break}Z&&(this.customFonts.push({name:R,url:X}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{t.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);L.init()}),
-z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,f=e.graph,c=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=f.getViewState();b.root=f.model.root;null!=b.model&&b.model.rootChanged(b.root);f.view.clear(b.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;f.model.prefix=Editor.guid()+"-";f.model.rootChanged(b.root);
-f.setViewState(b.viewState);f.gridEnabled=f.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();f.view.validate();f.blockMathRender=!0;f.sizeDidChange();f.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,f.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,f,c,l){SelectPage.call(this,b,f);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage);
+c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var n=new FeedbackDialog(c);c.showDialog(n.container,610,360,!0,!1);n.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});B=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,
+212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));B=c.actions.addAction("findReplace",mxUtils.bind(this,function(n,v){var H=(n=k.isEnabled()&&(null==v||!mxEvent.isShiftDown(v)))?"findReplace":"find";v=H+"Window";if(null==this[v]){var K=n?"min"==uiTheme?330:300:240;this[v]=new FindWindow(c,document.body.offsetWidth-(K+20),100,K,n?"min"==uiTheme?304:288:170,n);this[v].window.addListener("show",function(){c.fireEvent(new mxEventObject(H))});this[v].window.addListener("hide",function(){c.fireEvent(new mxEventObject(H))});
+this[v].window.setVisible(!0)}else this[v].window.setVisible(!this[v].window.isVisible())}),null,null,Editor.ctrlKey+"+F");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){var n=k.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[n]&&this[n].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var n=null==c.pages||1>=c.pages.length;if(n)c.exportVisio();else{var v=document.createElement("div");v.style.whiteSpace=
+"nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatVsdx"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(H);var K=c.addCheckbox(v,mxResources.get("allPages"),!n,n);K.style.marginBottom="16px";n=new CustomDialog(c,v,mxUtils.bind(this,function(){c.exportVisio(!K.checked)}),null,mxResources.get("export"));c.showDialog(n.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
+function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="4px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var v=document.createElement("span");v.style["float"]="right";v.style.cursor="pointer";v.style.userSelect="none";v.style.marginTop="-4px";v.appendChild(n);mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,"click",function(N){mxEvent.getSource(N)!=n&&
+(n.checked=!n.checked)});header=v}var H=localStorage.getItem(Editor.configurationKey);v=[[mxResources.get("reset"),function(N,I){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(N)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(M){c.handleError(M)}})},"Shift+Click to Reset Settings"]];var K=c.actions.get("plugins");
+null!=K&&"1"==urlParams.sketch&&v.push([mxResources.get("plugins"),K.funct]);EditorUi.isElectronApp||v.push([mxResources.get("share"),function(N,I){if(0<I.value.length)try{var M=JSON.parse(I.value),Q=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(M)),P=new EmbedDialog(c,Q);c.showDialog(P.container,450,240,!0);P.init()}catch(U){c.handleError(U)}else c.handleError({message:mxResources.get("invalidInput")})}]);v=new TextareaDialog(c,mxResources.get("configuration")+
+":",null!=H?JSON.stringify(JSON.parse(H),null,2):"",function(N){if(null!=N)try{if(null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save()),N==H)c.hideDialog();else{if(0<N.length){var I=JSON.parse(N);localStorage.setItem(Editor.configurationKey,JSON.stringify(I))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(M){c.handleError(M)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+v,n.parentNode);c.showDialog(v.container,620,460,!0,!1);v.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(n,v){var H=mxUtils.bind(this,function(N){var I=""==N?mxResources.get("automatic"):mxLanguageMap[N],M=null;""!=I&&(M=n.addItem(I,null,mxUtils.bind(this,function(){mxSettings.setLanguage(N);mxSettings.save();mxClient.language=N;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
+v),(N==mxLanguage||""==N&&null==mxLanguage)&&n.addCheckmark(M,Editor.checkmarkImage));return M});H("");n.addSeparator(v);for(var K in mxLanguageMap)H(K)})));var g=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(n){var v=g.apply(this,arguments);if(null!=v&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var H=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=H){var K=v.addMenu("",H.funct);K.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
+"theme":"language"));K.className="geToolbarButton geAdaptiveAsset";K.style.backgroundImage="url("+Editor.globeImage+")";K.style.backgroundPosition="center center";K.style.backgroundRepeat="no-repeat";K.style.backgroundSize="100% 100%";K.style.display="inline-block";K.style.verticalAlign="top";K.style.marginLeft="2px";K.style.cursor="pointer";K.style.zIndex="1";K.style.position="absolute";K.style.height="18px";K.style.width="18px";"atlas"==Editor.currentTheme?(K.style.filter="invert(100%)",K.style.right=
+"11px",K.style.top="10px"):(K.style.right="14px",K.style.top="5px");"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(K);v.langIcon=K;"1"==urlParams["live-ui"]?(H=mxUtils.bind(this,function(){K.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",H),H()):mxUtils.setOpacity(K,40);this.editorUi.switchThemeElt=
+K}}return v}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var n=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(v){if(0<v.length)try{var H=JSON.parse(v);c.executeLayouts(k.createLayouts(H));c.customLayoutConfig=H;c.hideDialog()}catch(K){c.handleError(K)}},null,null,null,null,function(v,
+H){var K=mxUtils.button(mxResources.get("copy"),function(){try{var N=H.value;H.value=JSON.stringify(JSON.parse(N));H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));H.value=N}catch(I){c.handleError(I)}});K.setAttribute("title","copy");K.className="geBtn";v.appendChild(K)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(n.container,
+620,460,!0,!0);n.init()});B=this.get("viewZoom");var l=B.funct;B.funct=mxUtils.bind(this,function(n,v){l.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(n,["-","outline","fullscreen"],v)});B=this.get("layout");var q=B.funct;B.funct=function(n,v){q.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var H=null,K=20,N=20,I=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=H){var L=c.editor.graph,V=new mxOrgChartLayout(L,
+H,K,N),O=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(O=L.getSelectionCell());V.execute(O)}},M=document.createElement("div"),Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("orgChartType")+": ");M.appendChild(Q);var P=document.createElement("select");P.style.width="200px";P.style.boxSizing="border-box";Q=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<Q.length;U++){var W=document.createElement("option");mxUtils.write(W,Q[U]);W.value=U;2==U&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){H=P.value});M.appendChild(P);Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,
+mxResources.get("parentChildSpacing")+": ");M.appendChild(Q);var p=document.createElement("input");p.type="number";p.value=K;p.style.width="200px";p.style.boxSizing="border-box";M.appendChild(p);mxEvent.addListener(p,"change",function(){K=p.value});Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("siblingSpacing")+": ");M.appendChild(Q);var D=document.createElement("input");D.type="number";D.value=N;D.style.width=
+"200px";D.style.boxSizing="border-box";M.appendChild(D);mxEvent.addListener(D,"change",function(){N=D.value});M=new CustomDialog(c,M,function(){null==H&&(H=2);c.loadOrgChartLayouts(I)});c.showDialog(M.container,355,140,!0,!0)},v,null,m());n.addSeparator(v);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var H=new mxParallelEdgeLayout(k);H.checkOverlap=!0;c.prompt(mxResources.get("spacing"),H.spacing,mxUtils.bind(this,function(K){H.spacing=K;c.executeLayout(function(){H.execute(k.getDefaultParent(),
+k.isSelectionEmpty()?null:k.getSelectionCells())},!1)}))}),v);n.addSeparator(v);c.menus.addMenuItem(n,"runLayout",v,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,v){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(n,["about"],v);else{var H=n.addItem("Search:",null,null,v,null,null,!1);H.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";H.style.cursor="default";var K=document.createElement("input");K.setAttribute("type","text");
+K.setAttribute("size","25");K.style.marginLeft="8px";mxEvent.addListener(K,"keydown",mxUtils.bind(this,function(N){var I=mxUtils.trim(K.value);13==N.keyCode&&0<I.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(I)),K.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:I}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
+N.keyCode&&(K.value="")}));H.firstChild.nextSibling.appendChild(K);mxEvent.addGestureListeners(K,function(N){document.activeElement!=K&&K.focus();mxEvent.consume(N)},function(N){mxEvent.consume(N)},function(N){mxEvent.consume(N)});window.setTimeout(function(){K.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),
+v),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates"],v),this.addMenuItems(n,["openDevTools","-","about"],v)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),v)}"1"==urlParams.test&&(n.addSeparator(v),this.addSubmenu("testDevelop",n,v))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var n=prompt("Language Code",Graph.diagramLanguage||"");null!=n&&(Graph.diagramLanguage=0<n.length?n:null,
+k.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
+mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var n=k.cloneCells(k.getSelectionCells()),v=k.getBoundingBoxFromGeometry(n);n=k.moveCells(n,-v.x,-v.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+v.width+", "+v.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(n)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var n=
+k.getGraphBounds(),v=k.view.translate,H=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",n.x/H-v.x,n.y/H-v.y,n.width/H,n.height/H,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";n=new TextareaDialog(c,"Paste Data:",n,function(v){if(0<v.length)try{var H=function(Q){function P(X){if(null==S[X]){if(S[X]=!0,null!=p[X]){for(;0<p[X].length;){var Y=
+p[X].pop();P(Y)}delete p[X]}}else mxLog.debug(U+": Visited: "+X)}var U=Q.parentNode.id,W=Q.childNodes;Q={};for(var p={},D=null,L={},V=0;V<W.length;V++){var O=W[V];if(null!=O.id&&0<O.id.length)if(null==Q[O.id]){Q[O.id]=O.id;var R=O.getAttribute("parent");null==R?null!=D?mxLog.debug(U+": Multiple roots: "+O.id):D=O.id:(null==p[R]&&(p[R]=[]),p[R].push(O.id))}else L[O.id]=O.id}W=Object.keys(L);0<W.length?(W=U+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(U+": Checked");
+var S={};null==D?mxLog.debug(U+": No root"):(P(D),Object.keys(S).length!=Object.keys(Q).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",p)))};"<"!=v.charAt(0)&&(v=Graph.decompress(v),mxLog.debug("See console for uncompressed XML"),console.log("xml",v));var K=mxUtils.parseXml(v),N=c.getPagesForNode(K.documentElement,"mxGraphModel");if(null!=N&&0<N.length)try{var I=c.getHashValueForPages(N);mxLog.debug("Checksum: ",I)}catch(Q){mxLog.debug("Error: ",Q.message)}else mxLog.debug("No pages found for checksum");
+var M=K.getElementsByTagName("root");for(v=0;v<M.length;v++)H(M[v]);mxLog.show()}catch(Q){c.handleError(Q),null!=window.console&&console.error(Q)}});c.showDialog(n.container,620,460,!0,!0);n.init()}));var t=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var n=new TextareaDialog(c,"Diff/Sync:","",function(v){var H=c.getCurrentFile();if(0<v.length&&null!=H)try{var K=JSON.parse(v);H.patch([K],null,!0);c.hideDialog()}catch(N){c.handleError(N)}},null,"Close",null,null,
+null,!0,null,"Patch",null,[["Snapshot",function(v,H){t=c.getPagesForXml(c.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(t)}],["Diff",function(v,H){try{n.textarea.value=JSON.stringify(c.diffPages(t,c.pages),null,2)}catch(K){c.handleError(K)}}]]);null==t?(t=c.getPagesForXml(c.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(t)):n.textarea.value=JSON.stringify(c.diffPages(t,
+c.pages),null,2);c.showDialog(n.container,620,460,!0,!0);n.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var n=c.getCurrentFile();console.log("editorUi",c,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",c.diffPages(n.ownPages,n.theirPages));var v=n.getShadowPages();null!=v&&
+(console.log("Checksum shadowPages",c.getHashValueForPages(v)),console.log("diff shadowPages/ownPages",c.diffPages(v,n.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(n.ownPages,v)),console.log("diff theirPages/shadowPages",c.diffPages(n.theirPages,v)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(n.theirPages,
+n.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(n.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(n.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(n.theirPages,c.pages)))}null!=n&&console.log("Shadow pages",[c.getXmlForPages(n.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
+c);var n=c.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([c.diffPages(n.shadowPages,c.pages)])),n.ownPages=c.clonePages(c.pages),n.theirPages=c.clonePages(c.pages),n.shadowPages=c.clonePages(c.pages),null!=n.sync&&(n.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){k.model.beginUpdate();try{var n=k.model.cells,v=0,H=[],K=[],N;for(N in n){var I=n[N],M=k.getCurrentCellStyle(I)[mxConstants.STYLE_IMAGE];
+null!=M&&"data:"==M.substring(0,5)&&(null==H[M]&&(H[M]=(H[M]||0)+1,v++),K.push(I))}k.setCellStyles(mxConstants.STYLE_IMAGE,null,K);console.log("Removed",v,"image(s) from",K.length,"cell(s): ",[K,H])}finally{k.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,v=k.getGraphBounds(),H=k.view.scale,K=mxUtils.createXmlDocument(),N=K.createElement("output");
+K.appendChild(N);K=new mxXmlCanvas2D(N);K.translate(Math.floor((1-v.x)/H),Math.floor((1-v.y)/H));K.scale(1/H);var I=0,M=K.save;K.save=function(){I++;M.apply(this,arguments)};var Q=K.restore;K.restore=function(){I--;Q.apply(this,arguments)};var P=n.drawShape;n.drawShape=function(U){mxLog.debug("entering shape",U,I);P.apply(this,arguments);mxLog.debug("leaving shape",U,I)};n.drawState(k.getView().getState(k.model.root),K);mxLog.show();mxLog.debug(mxUtils.getXml(N));mxLog.debug("stateCounter",I)}));
+c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),v)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?
+c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(n){k.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(c,n,mxResources.get("editShape")+":",630,400),c.showDialog(n.container,640,480,!0,!1),
+n.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(n){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",n,function(v,H,K,N,I,M,Q,P,U,W,p){c.createHtml(v,H,K,N,I,M,Q,P,U,W,p,mxUtils.bind(this,function(D,L){var V=new EmbedDialog(c,D+"\n"+L,null,null,function(){var O=window.open(),R=O.document;
+if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(D);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&R.writeln(L);R.writeln("</body>");R.writeln("</html>");R.close();if(!S){var X=O.document.createElement("div");X.marginLeft="26px";X.marginTop="26px";mxUtils.write(X,mxResources.get("updatingDocument"));
+S=O.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";X.appendChild(S);O.document.body.insertBefore(X,O.document.body.firstChild);window.setTimeout(function(){var Y=document.createElement("script");Y.type="text/javascript";Y.src=/<script.*?src="(.*?)"/.exec(L)[1];R.body.appendChild(Y);X.parentNode.removeChild(X)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});
+c.showDialog(V.container,450,240,!0,!0);V.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var n=c.getCurrentFile();null!=n&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();null!=v?(v=new EmbedDialog(c,'<img src="'+(n.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+n.getId())+'"/>'),c.showDialog(v.container,450,240,!0,!0),v.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));
+c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(n,v,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(n,v,H,K,N,I,function(M){c.spinner.stop();M=new EmbedDialog(c,M);c.showDialog(M.container,450,240,!0,!0);M.init()},function(M){c.spinner.stop();c.handleError(M)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){c.showEmbedImageDialog(function(n,v,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(n,v,H,K,N,I,function(M){c.spinner.stop();M=new EmbedDialog(c,M);c.showDialog(M.container,450,240,!0,!0);M.init()},function(M){c.spinner.stop();c.handleError(M)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var n=k.getGraphBounds();
+c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(n.height/k.view.scale)+2,function(v,H,K,N,I,M,Q,P,U){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var p=[];U&&p.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+Q+";height:"+P+';" src="'+c.createLink(v,H,K,N,I,M,W,null,p)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",
+new Action(mxResources.get("notion")+"...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var v=document.createElement("a");v.setAttribute("href","javascript:void(0);");v.setAttribute("target","_blank");v.style.cursor="pointer";mxUtils.write(v,mxResources.get("getNotionChromeExtension"));n.appendChild(v);mxEvent.addListener(v,"click",function(H){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(H)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(H,K,N,I,M,Q,P,U,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var D=["border=0"];W&&D.push("tags=%7B%7D");p=new EmbedDialog(c,c.createLink(H,K,N,I,M,Q,p,null,D,!0));c.showDialog(p.container,450,240,!0,!0);p.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",n)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(n,v,H,K,N,I,M,Q,P){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(U){c.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");U=new EmbedDialog(c,c.createLink(n,v,H,K,N,I,U,null,W));c.showDialog(U.container,450,240,!0,!0);U.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
+c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(n){c.spinner.stop();n=new GoogleSitesDialog(c,n);c.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)B=c.actions.addAction("scratchpad",
+function(){c.toggleScratchpad()}),B.setToggleAction(!0),B.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});B=c.actions.addAction("search",function(){var n=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!n);isLocalStorage&&(mxSettings.settings.search=!n,mxSettings.save())});B.label=mxResources.get("searchShapes");B.setToggleAction(!0);B.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(c.actions.get("save").funct=function(n){k.isEditing()&&k.stopEditing();var v="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var H=c.createLoadMessage("save");H.xml=v;n&&(H.exit=!0);v=JSON.stringify(H)}(window.opener||window.parent).postMessage(v,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));n=c.getCurrentFile();null==n||n.constructor==
+EmbedFile||n.constructor==LocalFile&&null==n.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var n=function(){c.editor.modified=!1;var v="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
+"";(window.opener||window.parent).postMessage(v,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){c.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],v),c.jpgSupported&&this.addMenuItems(n,["exportJpg"],v)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],v);this.addMenuItems(n,["exportSvg",
+"-"],v);c.isOffline()||c.printPdfExport?this.addMenuItems(n,["exportPdf"],v):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],v);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(n,["exportVsdx"],v);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],v);c.isOffline()||(n.addSeparator(v),this.addMenuItem(n,"export",v).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
+function(n,v){function H(I){I.pickFile(function(M){c.spinner.spin(document.body,mxResources.get("loading"))&&I.getFile(M,function(Q){var P="data:image/"==Q.getData().substring(0,11)?N(Q.getTitle()):"text/xml";/\.svg$/i.test(Q.getTitle())&&!c.editor.isDataSvg(Q.getData())&&(Q.setData(Editor.createSvgDataUri(Q.getData())),P="image/svg+xml");K(Q.getData(),P,Q.getTitle())},function(Q){c.handleError(Q,null!=Q?mxResources.get("errorLoadingFile"):null)},I==c.drive)},!0)}var K=mxUtils.bind(this,function(I,
+M,Q){var P=k.view,U=k.getGraphBounds(),W=k.snap(Math.ceil(Math.max(0,U.x/P.scale-P.translate.x)+4*k.gridSize)),p=k.snap(Math.ceil(Math.max(0,(U.y+U.height)/P.scale-P.translate.y)+4*k.gridSize));"data:image/"==I.substring(0,11)?c.loadImage(I,mxUtils.bind(this,function(D){var L=!0,V=mxUtils.bind(this,function(){c.resizeImage(D,I,mxUtils.bind(this,function(O,R,S){O=L?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/S)):1;c.importFile(I,M,W,p,Math.round(R*O),Math.round(S*O),Q,function(X){c.spinner.stop();
+k.setSelectionCells(X);k.scrollCellToVisible(k.getSelectionCell())})}),L)});I.length>c.resampleThreshold?c.confirmImageResize(function(O){L=O;V()}):V()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(I,M,W,p,0,0,Q,function(D){c.spinner.stop();k.setSelectionCells(D);k.scrollCellToVisible(k.getSelectionCell())})}),N=mxUtils.bind(this,function(I){var M="text/xml";/\.png$/i.test(I)?M="image/png":/\.jpe?g$/i.test(I)?M="image/jpg":/\.gif$/i.test(I)?
+M="image/gif":/\.pdf$/i.test(I)&&(M="application/pdf");return M});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){H(c.drive)},v):u&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){H(c.oneDrive)},v):C&&"function"===typeof window.OneDriveClient&&
+n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){H(c.dropbox)},v):z&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=c.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){H(c.gitHub)},v);null!=c.gitLab&&n.addItem(mxResources.get("gitlab")+
+"...",null,function(){H(c.gitLab)},v);null!=c.trello?n.addItem(mxResources.get("trello")+"...",null,function(){H(c.trello)},v):A&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},
+v);c.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var I=new FilenameDialog(c,"",mxResources.get("import"),function(M){if(null!=M&&0<M.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var Q=/(\.png)($|\?)/i.test(M)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(M),function(P){K(P,Q,M)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==Q)}},mxResources.get("url"));
+c.showDialog(I.container,300,80,!0,!0);I.init()},v))}))).isEnabled=m;this.put("appearance",new Menu(mxUtils.bind(this,function(n,v){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(n,["toggleDarkMode"],v);this.addMenuItems(n,["toggleSimpleMode","toggleSketchMode","fullscreen"],v)})));this.put("theme",new Menu(mxUtils.bind(this,function(n,v){var H="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&
+this.addMenuItems(n,["toggleDarkMode"],v);n.addSeparator(v);var K=n.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},v);"kennedy"!=H&&"atlas"!=H&&"dark"!=H&&"min"!=H&&"sketch"!=H&&n.addCheckmark(K,Editor.checkmarkImage);K=n.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("kennedy")},v);"kennedy"!=H&&"dark"!=H||n.addCheckmark(K,Editor.checkmarkImage);K=n.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},v);"sketch"==H&&n.addCheckmark(K,
+Editor.checkmarkImage);K=n.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},v);"min"==H&&n.addCheckmark(K,Editor.checkmarkImage);K=n.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},v);"atlas"==H&&n.addCheckmark(K,Editor.checkmarkImage)})));B=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,
+function(H,K){n.invalidFileHandle=null;n.fileHandle=H;n.title=K.name;n.desc=K;c.save(K.name)}),null,c.createFileSystemOptions(n.getTitle()));else{var v=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;v=new FilenameDialog(this.editorUi,v,mxResources.get("rename"),mxUtils.bind(this,function(H){null!=H&&0<H.length&&null!=n&&H!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&n.rename(H,mxUtils.bind(this,function(K){this.editorUi.spinner.stop()}),mxUtils.bind(this,
+function(K){this.editorUi.handleError(K,null!=K?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==StorageFile?mxResources.get("diagramName"):null,function(H){if(null!=H&&0<H.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(v.container,340,96,!0,!0);v.init()}}));B.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};
+B.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=c.getCurrentFile();if(null!=n){var v=c.getCopyFilename(n);n.constructor==DriveFile?(v=new CreateDialog(c,v,mxUtils.bind(this,function(H,K){"_blank"==K?c.editor.editAsNew(c.getFileData(),H):("download"==K&&(K=App.MODE_GOOGLE),null!=H&&0<H.length&&(K==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&n.saveAs(H,mxUtils.bind(this,function(N){n.desc=N;n.save(!1,mxUtils.bind(this,
+function(){c.spinner.stop();n.setModified(!1);n.addAllSavedStatus()}),mxUtils.bind(this,function(I){c.handleError(I)}))}),mxUtils.bind(this,function(N){c.handleError(N)})):c.createFile(H,c.getFileData(!0),null,K)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(v.container,420,380,!0,!0),v.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),v)}}));c.actions.put("openFolder",
+new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(n,v){c.appIconClicked(v)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=c.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var v=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var H=0;H<n.desc.parents.length;H++)if(n.desc.parents[H].isRoot){v=!0;break}c.pickFolder(n.getMode(),mxUtils.bind(this,function(K){c.spinner.spin(document.body,mxResources.get("moving"))&&
+n.move(K,mxUtils.bind(this,function(N){c.spinner.stop()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),null,!0,v)}}));this.put("publish",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["publishLink"],v)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var n=c.getCurrentFile();null!=n&&n.share()}catch(v){c.handleError(v)}}));
+this.put("embed",new Menu(mxUtils.bind(this,function(n,v){var H=c.getCurrentFile();null==H||H.getMode()!=App.MODE_GOOGLE&&H.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(H.getTitle())||this.addMenuItems(n,["liveImage","-"],v);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],v);navigator.standalone||c.isOffline()||this.addMenuItems(n,["embedIframe"],v);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
+v)})));c.addInsertItem=function(n,v,H,K){("plantUml"!=K||EditorUi.enablePlantUml&&!c.isOffline())&&n.addItem(H,null,mxUtils.bind(this,function(){if("fromText"==K||"formatSql"==K||"plantUml"==K||"mermaid"==K){var N=new ParseDialog(c,H,K);c.showDialog(N.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else N=new CreateGraphDialog(c,H,K),c.showDialog(N.container,620,420,!0,!1);N.init()}),v,null,m())};var x=function(n){k.getModel().beginUpdate();try{n=k.addCell(n),k.fireEvent(new mxEventObject("cellsInserted",
+"cells",[n]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(n);k.setSelectionCell(n);k.container.focus();k.editAfterInsert&&k.startEditing(n);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(n))},0);return n},E=function(n,v,H,K,N){n=new mxCell(n,new mxGeometry(0,0,v,H),K);n.vertex=!0;null==N&&(N=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=N.x;n.geometry.y=N.y;return x(n)};c.actions.put("insertText",new Action(mxResources.get("text"),
+function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(E("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&E("",
+120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&E("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
+E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(n){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())){var v=k.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:k.getInsertPoint();null==n&&(n=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([H],!0)));var H=new mxCell("",new mxGeometry(0,0,v,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+H.geometry.setTerminalPoint(n,!0);H.geometry.setTerminalPoint(new mxPoint(n.x+H.geometry.width,n.y),!1);H.geometry.points=[];H.geometry.relative=!0;H.edge=!0;x(H)}},null,null,"C")).isEnabled=m;B=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):(c.hsplitPosition=0==c.hsplitPosition?EditorUi.prototype.hsplitPosition:0,c.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));B.setToggleAction(!0);
+B.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()}));c.addInsertMenuItems=mxUtils.bind(this,function(n,v,H){for(var K=0;K<H.length;K++)"-"==H[K]?n.addSeparator(v):c.addInsertItem(n,v,mxResources.get(H[K])+"...",H[K])});this.put("insert",new Menu(mxUtils.bind(this,function(n,v){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(c.menus.addMenuItems(n,["toggleShapes"],v),c.menus.addSubmenu("table",n,v),n.addSeparator(v),c.insertTemplateEnabled&&
+!c.isOffline()&&c.menus.addMenuItems(n,["insertTemplate"],v),c.menus.addMenuItems(n,["insertImage","insertLink","-"],v),c.menus.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),c.menus.addSubmenu("layout",n,v)):(this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),v),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(n,["insertTemplate"],v),n.addSeparator(v),this.addSubmenu("insertLayout",
+n,v,mxResources.get("layout")),this.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",n,v))})));this.put("table",new Menu(mxUtils.bind(this,function(n,v){c.menus.addInsertTableCellItem(n,v)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){c.addInsertMenuItems(n,v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,
+v){c.addInsertMenuItems(n,v,["fromText","plantUml","mermaid","-","formatSql"]);n.addItem(mxResources.get("csv")+"...",null,function(){k.popupMenuHandler.hideMenu();c.showImportCsvDialog()},v,null,m());"min"==uiTheme&&this.addMenuItems(n,["-","createShape","editDiagram"],v)})));this.put("openRecent",new Menu(function(n,v){var H=c.getRecent();if(null!=H){for(var K=0;K<H.length;K++)(function(N){var I=N.mode;I==App.MODE_GOOGLE?I="googleDrive":I==App.MODE_ONEDRIVE&&(I="oneDrive");n.addItem(N.title+" ("+
+mxResources.get(I)+")",null,function(){c.loadFile(N.id)},v)})(H[K]);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},v)}));this.put("openFrom",new Menu(function(n,v){null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},v):u&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.oneDrive?n.addItem(mxResources.get("oneDrive")+
+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},v):C&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},v):z&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=c.gitHub&&n.addItem(mxResources.get("github")+
+"...",null,function(){c.pickFile(App.MODE_GITHUB)},v);null!=c.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},v);null!=c.trello?n.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+
+"...",null,function(){c.pickFile(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},v);c.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){null!=K&&0<K.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(K):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(K)))},mxResources.get("url"));c.showDialog(H.container,300,80,!0,!0);H.init()},v))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},v):u&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+
+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},v):C&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},v):z&&"function"===
+typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=c.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},v);null!=c.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},v);null!=c.trello?n.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
+v)})),this.put("openLibraryFrom",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},v):u&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},v):C&&
+"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},v):z&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=c.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},
+v);null!=c.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},v);null!=c.trello?n.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},
+v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},v);c.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){if(null!=K&&0<K.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var N=K;c.editor.isCorsEnabledForUrl(K)||(N=PROXY_URL+"?url="+encodeURIComponent(K));mxUtils.get(N,function(I){if(200<=I.getStatus()&&299>=I.getStatus()){c.spinner.stop();
+try{c.loadLibrary(new UrlLibrary(this,I.getText(),K))}catch(M){c.handleError(M,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(H.container,300,80,!0,!0);H.init()},v));"1"==urlParams.confLib&&(n.addSeparator(v),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},
+v))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));B=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
+function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));B=this.get("viewPanels");var F=B.funct;B.funct=function(n,v){F.apply(this,arguments);c.menus.addMenuItems(n,["tags"],v);c.commentsSupported()&&c.menus.addMenuItems(n,["comments"],v)};this.put("view",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,(null!=
+this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP){var H=this.addMenuItem(n,"scratchpad",v);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(n,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",n,v);this.addMenuItems(n,"- scrollbars tooltips ruler - grid guides".split(" "),
+v);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(n,"shadowVisible",v);this.addMenuItems(n,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),v);"1"!=urlParams.sketch&&this.addMenuItems(n,["-","fullscreen"],v)})));if(EditorUi.isElectronApp){var G="1"==urlParams.enableSpellCheck;B=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();G=!G;c.alert(mxResources.get("restartForChangeRequired"))});B.setToggleAction(!0);B.setSelectedCallback(function(){return G});
+var y="1"==urlParams.enableStoreBkp;B=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();y=!y});B.setToggleAction(!0);B.setSelectedCallback(function(){return y});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var n=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(v){v=parseInt(v);0<=v&&(EditorUi.draftSaveDelay=1E3*v,EditorUi.enableDrafts=0<v,mxSettings.setDraftSaveDelay(v),
+mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(n.container,320,80,!0,!0);n.init()})}var T=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(n,v){var H="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(H||"min"==uiTheme){null==T||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",n,v);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",n,v);c.menus.addSubmenu("units",
+n,v);n.addSeparator(v);H||c.menus.addMenuItems(n,["scrollbars","-","tooltips","copyConnect","collapseExpand"],v);"1"==urlParams.embedInline||H||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||c.mode==App.MODE_ATLAS||c.menus.addMenuItems(n,["-","showStartScreen","search","scratchpad"],v);n.addSeparator(v);H&&c.menus.addMenuItems(n,["copyConnect","collapseExpand","tooltips","-"],v);EditorUi.isElectronApp&&c.menus.addMenuItems(n,["-","spellCheck","autoBkp","drafts","-"],v);var K=c.getCurrentFile();
+null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(n,["-","showRemoteCursors","shareCursor","-"],v);Graph.translateDiagram&&c.menus.addMenuItems(n,["diagramLanguage"],v);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(n,"configuration",v);H||!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(n,"plugins",v);n.addSeparator(v)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",n,v),"1"!=urlParams.embed&&this.addSubmenu("theme",n,
+v),n.addSeparator(v),"undefined"!==typeof MathJax&&(H=this.addMenuItem(n,"mathematicalTypesetting",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(n,["spellCheck","autoBkp","drafts"],v),this.addMenuItems(n,["copyConnect","collapseExpand","-"],v),"1"!=urlParams.embed&&(K=c.getCurrentFile(),null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(n,
+["showRemoteCursors","shareCursor"],v),this.addMenuItems(n,["autosave"],v)),n.addSeparator(v),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,"plugins",v),this.addMenuItems(n,["-","editDiagram"],v),Graph.translateDiagram&&this.addMenuItems(n,["diagramLanguage"]),n.addSeparator(v),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],v),this.addMenuItems(n,["configuration"],v),n.addSeparator(v),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",
+function(){function N(M){return{id:M.id,isExt:!0,url:M.downloadUrl,title:M.title,imgUrl:M.thumbnailLink,changedBy:M.lastModifyingUserName,lastModifiedOn:M.modifiedDate}}var I=new TemplatesDialog(c,function(M){console.log(arguments)},null,null,null,"user",function(M,Q,P){var U=new Date;U.setDate(U.getDate()-7);c.drive.listFiles(null,U,P?!0:!1,function(W){for(var p=[],D=0;D<W.items.length;D++)p.push(N(W.items[D]));M(p)},Q)},function(M,Q,P,U){c.drive.listFiles(M,null,U?!0:!1,function(W){for(var p=[],
+D=0;D<W.items.length;D++)p.push(N(W.items[D]));Q(p)},P)},function(M,Q,P){c.drive.getFile(M.id,function(U){Q(U.data)},P)},null,function(M){M({Test:[]},1)},!0,!1);c.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(n,"templates",v))})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,v){var H=c.getCurrentFile();c.menus.addSubmenu("extras",n,v,mxResources.get("preferences"));n.addSeparator(v);var K="sketch"==Editor.currentTheme||"1"==urlParams.sketch;
+if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(n,"new open - synchronize - save saveAs -".split(" "),v);else if("1"==urlParams.embed||c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(n,["-","save"],v);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(n,["saveAndExit"],v),null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["revisionHistory"],
+v);n.addSeparator(v)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(n,["save","synchronize","-"],v):"1"!=urlParams.noFileMenu&&(K?c.menus.addSubmenu("file",n,v):(c.menus.addMenuItems(n,["new"],v),c.menus.addSubmenu("openFrom",n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),n.addSeparator(v),null!=H&&(H.constructor==DriveFile&&c.menus.addMenuItems(n,["share"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||H.constructor==LocalFile||c.menus.addMenuItems(n,["synchronize"],v)),n.addSeparator(v),
+c.menus.addSubmenu("save",n,v)));c.menus.addSubmenu("exportAs",n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(n,["import"],v):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",n,v);c.menus.addMenuItems(n,["-","findReplace"],v);c.commentsSupported()&&c.menus.addMenuItems(n,["comments","-"],v);c.menus.addMenuItems(n,["format","layers","tags","-","pageSetup"],v);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(n,["print"],v);K||
+null==H||null==c.fileNode||"1"==urlParams.embedInline||(H=null!=H.getTitle()?H.getTitle():c.defaultFilename,/(\.html)$/i.test(H)||/(\.svg)$/i.test(H)||this.addMenuItems(n,["-","properties"]));n.addSeparator(v);c.menus.addSubmenu("help",n,v);"1"==urlParams.embed||c.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||c.mode==App.MODE_ATLAS)&&c.menus.addMenuItems(n,["-","exit"],v):"1"!=urlParams.noFileMenu&&c.menus.addMenuItems(n,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(n,v){var H=
+c.getCurrentFile();null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],v):(c.menus.addMenuItems(n,["save","saveAs","-","rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):c.menus.addMenuItems(n,["makeCopy"],v));c.menus.addMenuItems(n,["-","autosave"],v);null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["-","revisionHistory"],v)})));this.put("file",new Menu(mxUtils.bind(this,
+function(n,v){var H="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,v),this.addSubmenu("exportAs",n,v),this.addSubmenu("embed",n,v),"1"==urlParams.libraries&&(this.addMenuItems(n,["-"],v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v)),c.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),this.addMenuItems(n,["-","pageSetup","print","-","rename"],v),"1"!=urlParams.embedInline&&
+("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v):(this.addMenuItems(n,["save"],v),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,["exit"],v);else if(H){H=c.getCurrentFile();c.menus.addMenuItems(n,["new"],v);c.menus.addSubmenu("openFrom",n,v);isLocalStorage&&this.addSubmenu("openRecent",n,v);n.addSeparator(v);c.menus.addMenuItems(n,["-","save"],v);null!=H&&H.constructor==DriveFile||c.menus.addMenuItems(n,
+["saveAs"],v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||c.menus.addMenuItems(n,["synchronize"],v);null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(n,"- rename makeCopy - moveToFolder openFolder".split(" "),v):(c.menus.addMenuItems(n,["-","rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):c.menus.addMenuItems(n,["makeCopy"],v));null!=H&&H.isRevisionHistorySupported()&&
+c.menus.addMenuItems(n,["-","revisionHistory"],v);if(null!=H){if(null!=c.fileNode&&"1"!=urlParams.embedInline){var K=null!=H.getTitle()?H.getTitle():c.defaultFilename;(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(n,["properties"],v)}H.constructor==DriveFile&&c.menus.addMenuItems(n,["share"],v)}c.menus.addMenuItems(n,["-","autosave"],v)}else H=this.editorUi.getCurrentFile(),null!=H&&H.constructor==DriveFile?(H.isRestricted()&&
+this.addMenuItems(n,["exportOptionsDisabled"],v),this.addMenuItems(n,["save","-","share"],v),K=this.addMenuItem(n,"synchronize",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize"),n.addSeparator(v)):this.addMenuItems(n,["new"],v),this.addSubmenu("openFrom",n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),null!=H&&H.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),
+v):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||(n.addSeparator(v),K=this.addMenuItem(n,"synchronize",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(n,["-","save","saveAs","-"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==H||this.addMenuItems(n,["share","-"],v),this.addMenuItems(n,
+["rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):(this.addMenuItems(n,["makeCopy"],v),null!=H&&H.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],v))),n.addSeparator(v),this.addSubmenu("importFrom",n,v),this.addSubmenu("exportAs",n,v),n.addSeparator(v),this.addSubmenu("embed",n,v),this.addSubmenu("publish",n,v),n.addSeparator(v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v),
+c.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),null!=H&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(K=null!=H.getTitle()?H.getTitle():c.defaultFilename,(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(n,["-","properties"])),this.addMenuItems(n,["-","pageSetup"],v),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],v),this.addMenuItems(n,["-","close"])})));e.prototype.execute=
+function(){var n=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var v=n.extFonts,H=0;null!=v&&H<v.length;H++){var K=document.getElementById("extFont_"+v[H].name);null!=K&&K.parentNode.removeChild(K)}n.extFonts=[];for(H=0;null!=this.previousExtFonts&&H<this.previousExtFonts.length;H++)this.ui.editor.graph.addExtFont(this.previousExtFonts[H].name,
+this.previousExtFonts[H].url);this.previousExtFonts=v};this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,v){for(var H=mxUtils.bind(this,function(p,D,L,V,O){var R=c.editor.graph;V=this.styleChange(n,V||p,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[p,null!=D?encodeURIComponent(D):null,null]:[p],null,v,function(){"1"!=urlParams["ext-fonts"]?R.setFont(p,D):(document.execCommand("fontname",!1,p),R.addExtFont(p,
+D));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[p,null!=D?encodeURIComponent(D):null,null]:[p],"cells",[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&R.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(p,
+D)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",V.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[p.toLowerCase()];for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==p&&this.customFonts[X].url==D){this.customFonts.splice(X,1);c.fireEvent(new mxEventObject("customFontsChanged"));
+break}}else{var Y=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Y&&0<Y.length)for(X=0;X<Y.length;X++)if(Y[X].name==p){Y.splice(X,1);break}var aa=mxUtils.clone(this.customFonts);for(X=0;X<aa.length;X++)if(aa[X].name==p){aa.splice(X,1);break}X=new e(this.editorUi,Y,aa);this.editorUi.editor.graph.model.execute(X)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(p,D);V.firstChild.nextSibling.style.fontFamily=p;null!=O&&V.setAttribute("title",O)}),K={},N=0;N<this.defaultFonts.length;N++){var I=
+this.defaultFonts[N];"string"===typeof I?H(I):null!=I.fontFamily&&null!=I.fontUrl&&(K[encodeURIComponent(I.fontFamily)+"@"+encodeURIComponent(I.fontUrl)]=!0,H(I.fontFamily,I.fontUrl))}n.addSeparator(v);if("1"!=urlParams["ext-fonts"]){I=function(p){var D=encodeURIComponent(p.name)+(null==p.url?"":"@"+encodeURIComponent(p.url));if(!K[D]){for(var L=p.name,V=0;null!=Q[L.toLowerCase()];)L=p.name+" ("+ ++V+")";null==M[D]&&(P.push({name:p.name,url:p.url,label:L,title:p.url}),Q[L.toLowerCase()]=p,M[D]=p)}};
+var M={},Q={},P=[];for(N=0;N<this.customFonts.length;N++)I(this.customFonts[N]);for(var U in Graph.recentCustomFonts)I(Graph.recentCustomFonts[U]);P.sort(function(p,D){return p.label<D.label?-1:p.label>D.label?1:0});if(0<P.length){for(N=0;N<P.length;N++)H(P[N].name,P[N].url,!0,P[N].label,P[N].url);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),v);n.addSeparator(v)}else{U=
+this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){I={};var W=!1;for(N=0;N<this.customFonts.length;N++)I[this.customFonts[N].name]=!0;for(N=0;N<U.length;N++)I[U[N].name]||(this.customFonts.push(U[N]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(N=0;N<this.customFonts.length;N++)U=this.customFonts[N].name,I=this.customFonts[N].url,H(U,I,!0),this.editorUi.editor.graph.addExtFont(U,I,!0);n.addSeparator(v);
+n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var p=new e(this.editorUi,[],[]);c.editor.graph.model.execute(p)}),v);n.addSeparator(v)}}n.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph,D=p.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",V=null;if("1"!=urlParams["ext-fonts"]&&p.isEditing()){var O=p.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(D=Graph.stripQuotes(O.fontFamily),
+V=Graph.getFontUrl(D,null),null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,L="g"):L="w")))}else O=p.getView().getState(p.getSelectionCell()),null!=O&&(D=O.style[mxConstants.STYLE_FONTFAMILY]||D,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?L="g":(L="w",V=O))):(L=O.style.FType||L,"w"==L&&(V=this.editorUi.editor.graph.extFonts,O=null,null!=V&&(O=V.find(function(S){return S.name==D})),V=null!=O?O.url:mxResources.get("urlNotFound",null,"URL not found"))));
+null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==p.cellEditor.textarea&&(R=p.cellEditor.saveSelection());L=new FontDialog(this.editorUi,D,V,L,mxUtils.bind(this,function(S,X,Y){null!=R&&(p.cellEditor.restoreSelection(R),R=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&p.isEditing())p.setFont(S,X);else{p.getModel().beginUpdate();try{p.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(p.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+S),p.setCellStyles("fontSource",null!=X?encodeURIComponent(X):null),p.setCellStyles("FType",null)):(p.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),"s"!=Y&&(p.setCellStyles("FType",Y),0==X.indexOf("http://")&&(X=PROXY_URL+"?url="+encodeURIComponent(X)),this.editorUi.editor.graph.addExtFont(S,X)));Y=!0;for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==S){Y=!1;break}Y&&(this.customFonts.push({name:S,url:X}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
+this.customFonts)))}finally{p.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);L.init()}),v,null,!0)})))}})();function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,e){this.ui=b;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,d,e){this.ui=b;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,d,e){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=e&&(d.viewState=e,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,e=d.graph,c=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=e.getViewState();b.root=e.model.root;null!=b.model&&b.model.rootChanged(b.root);e.view.clear(b.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(b.root);
+e.setViewState(b.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,d,e,c,k){SelectPage.call(this,b,e);this.relatedPage=d;this.index=c;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){e=f;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var f=0;f<e.length;f++)if(e[f].getId()==b)return e[f];return null};
-EditorUi.prototype.createImageForPageLink=function(b,e,f){var c=b.indexOf(","),l=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=e&&(l=this.getImageForPage(c,e,f),l.originalSrc=b));null==l&&(l={originalSrc:b});return l};
-EditorUi.prototype.getImageForPage=function(b,e,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=e?e:this.currentPage);l.getGlobalVariable=function(x){return"pagenumber"==x?m+1:"page"==x&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(l.container);
-this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";f=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var v=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(f)),v.width,v.height,v.x,v.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var l=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";l!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var f=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var l=this.currentPage;null!=l&&l!=f&&(null==l.viewState||null==l.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+l.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+l.viewState.scrollTop),f=l);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,
-m){l=m.getProperty("edit").changes;for(m=0;m<l.length;m++)if(l[m]instanceof SelectPage||l[m]instanceof RenamePage||l[m]instanceof MovePage||l[m]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),v=this.parseBackgroundImage(b.getAttribute("backgroundImage")),x=b.getAttribute("extFonts");if(x)try{x=x.split("|").map(function(E){E=E.split("^");return{name:E[0],url:E[1]}})}catch(E){console.log("ExtFonts format error: "+E.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:v,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:x||[]}};
-Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(e.setAttribute("pageWidth",f.width),e.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",
-JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){d=e;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var e=0;e<d.length;e++)if(d[e].getId()==b)return d[e];return null};
+EditorUi.prototype.createImageForPageLink=function(b,d,e){var c=b.indexOf(","),k=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=d&&(k=this.getImageForPage(c,d,e),k.originalSrc=b));null==k&&(k={originalSrc:b});return k};
+EditorUi.prototype.getImageForPage=function(b,d,e){e=null!=e?e:this.editor.graph;var c=e.getGlobalVariable,k=this.createTemporaryGraph(e.getStylesheet());k.defaultPageBackgroundColor=e.defaultPageBackgroundColor;k.shapeBackgroundColor=e.shapeBackgroundColor;k.shapeForegroundColor=e.shapeForegroundColor;var m=this.getPageIndex(null!=d?d:this.currentPage);k.getGlobalVariable=function(z){return"pagenumber"==z?m+1:"page"==z&&null!=d?d.getName():c.apply(this,arguments)};document.body.appendChild(k.container);
+this.updatePageRoot(b);k.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";e=k.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var u=k.getGraphBounds();document.body.removeChild(k.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(e)),u.width,u.height,u.x,u.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var k=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";k!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var e=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var k=this.currentPage;null!=k&&k!=e&&(null==k.viewState||null==k.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+k.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+k.viewState.scrollTop),e=k);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,
+m){k=m.getProperty("edit").changes;for(m=0;m<k.length;m++)if(k[m]instanceof SelectPage||k[m]instanceof RenamePage||k[m]instanceof MovePage||k[m]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,d,e){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(c.setViewState(d),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+d.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+d.scrollTop,c.restoreSelection(e))};
+Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),k=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),u=this.parseBackgroundImage(b.getAttribute("backgroundImage")),z=b.getAttribute("extFonts");if(z)try{z=z.split("|").map(function(C){C=C.split("^");return{name:C[0],url:C[1]}})}catch(C){console.log("ExtFonts format error: "+C.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:u,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(c)||isNaN(k)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:z||[]}};
+Graph.prototype.saveViewState=function(b,d,e,c){e||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(d.setAttribute("pageWidth",e.width),d.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&d.setAttribute("backgroundImage",
+JSON.stringify(c)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(k){return k.name+"^"+k.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var f=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=f)for(e=0;e<f.length;e++){var c=document.getElementById("extFont_"+f[e].name);null!=c&&c.parentNode.removeChild(c)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
+Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=e)for(d=0;d<e.length;d++){var c=document.getElementById("extFont_"+e[d].name);null!=c&&c.parentNode.removeChild(c)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,f){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var l=document.createElement("style");l.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));l.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(l)}if(!f){null==
-this.extFonts&&(this.extFonts=[]);f=this.extFonts;c=!0;for(l=0;l<f.length;l++)if(f[l].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};
-EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var f=Editor.extractParserError(e);if(f)throw Error(f);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),f=new mxCodec(e.ownerDocument),b.root=f.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(f=Editor.extractParserError(e))throw Error(f);null!=e&&(b.graphModelNode=
-e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,f){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var l=new SelectPage(this,b,f);l.execute();c.add(l);c.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(m){this.handleError(m)}};
-EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},v=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var x=new mxGraphModel;x.prefix=Editor.guid()+"-";x.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,v),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);
-f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(E){this.handleError(E)}return f};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
-EditorUi.prototype.clonePages=function(b){for(var e=[],f=0;f<b.length;f++)e.push(this.clonePage(b[f]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
+Graph.prototype.addExtFont=function(b,d,e){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var c="extFont_"+b;if(null==document.getElementById(c))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,c);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));k.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(k)}if(!e){null==
+this.extFonts&&(this.extFonts=[]);e=this.extFonts;c=!0;for(k=0;k<e.length;k++)if(e[k].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var e=Editor.extractParserError(d);if(e)throw Error(e);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),e=new mxCodec(d.ownerDocument),b.root=e.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(e=Editor.extractParserError(d))throw Error(e);null!=d&&(b.graphModelNode=
+d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,d,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var k=new SelectPage(this,b,e);k.execute();c.add(k);c.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(m){this.handleError(m)}};
+EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(b[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=b[e]);return e};
+EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,c=this.pages[e]):1>=this.pages.length&&(c=this.insertPage(),d.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,c))}finally{d.model.endUpdate()}}}catch(k){this.handleError(k)}return b};
+EditorUi.prototype.duplicatePage=function(b,d){var e=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var k=b.node.cloneNode(!1);k.removeAttribute("id");var m={},u=c.createCellLookup([c.model.root]);e=new DiagramPage(k);e.root=c.cloneCell(c.model.root,null,m);var z=new mxGraphModel;z.prefix=Editor.guid()+"-";z.setRoot(e.root);c.updateCustomLinks(c.createCellMapping(m,u),[e.root]);e.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(e);
+e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(d);e=this.insertPage(e,mxUtils.indexOf(this.pages,b)+1)}}catch(C){this.handleError(C)}return e};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
+EditorUi.prototype.clonePages=function(b){for(var d=[],e=0;e<b.length;e++)d.push(this.clonePage(b[e]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),e=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(e,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(e){null!=e&&0<e.length&&this.editor.graph.model.execute(new RenamePage(this,b,e))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-f)/this.pages.length)+
-1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,g){this.pages[d]==this.currentPage?(g.className="geActivePage",g.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):g.className="geInactivePage";g.setAttribute("draggable","true");mxEvent.addListener(g,"dragstart",mxUtils.bind(this,function(k){b.isEnabled()?(mxClient.IS_FF&&k.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(k)}));mxEvent.addListener(g,"dragend",mxUtils.bind(this,function(k){l=null;k.stopPropagation();
-k.preventDefault()}));mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(k){null!=l&&(k.dataTransfer.dropEffect="move");k.stopPropagation();k.preventDefault()}));mxEvent.addListener(g,"drop",mxUtils.bind(this,function(k){null!=l&&d!=l&&this.movePage(l,d);k.stopPropagation();k.preventDefault()}));e.appendChild(g)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
-c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var v=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");v.style.position="absolute";v.style.right=this.editor.chromeless?"29px":"55px";v.style.fontSize="13pt";this.tabContainer.appendChild(v);var x=this.createControlTab(4,"&nbsp;&#10095;");x.style.position="absolute";
-x.style.right=this.editor.chromeless?"0px":"29px";x.style.fontSize="13pt";this.tabContainer.appendChild(x);var E=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=E+"px";mxEvent.addListener(v,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,E-20);mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,E-20);mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
-this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(f){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return e};
-EditorUi.prototype.createControlTab=function(b,e,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=e;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var l=new mxPopupMenu(mxUtils.bind(this,function(x,E){var d=mxUtils.bind(this,function(){for(var q=0;q<this.pages.length;q++)mxUtils.bind(this,function(p){var y=x.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),E),A=this.pages[p].getId();y.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=A?" ["+A+"]":""));this.pages[p]==this.currentPage&&x.addCheckmark(y,Editor.checkmarkImage)})(q)}),g=mxUtils.bind(this,
-function(){x.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),E)});e||d();if(this.editor.graph.isEnabled()){e||(x.addSeparator(E),g());var k=this.currentPage;if(null!=k){x.addSeparator(E);var n=this.getShortPageName(k);x.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),E);x.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),E);e||x.addSeparator(E);x.addItem(mxResources.get("duplicateIt",
-[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),E)}}e&&(x.addSeparator(E),g(),x.addSeparator(E),d())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),v=mxEvent.getClientY(c);l.popup(m,v,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,e,f,c){f=this.createTab(f);var l=b.getName()||mxResources.get("untitled"),m=b.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(f,l);f.style.maxWidth=e+"px";f.style.width=e+"px";this.addTabListeners(b,f);42<e&&(f.style.textOverflow="ellipsis");return f};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,l=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(m){c=null!=this.currentMenu;l=b==this.currentPage;f.isMouseDown||l||this.selectPage(b)}),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)||!c){var v=new mxPopupMenu(this.createPageMenu(b));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);this.resetCurrentMenu();v.destroy()});var x=mxEvent.getClientX(m),E=mxEvent.getClientY(m);v.popup(x,E,null,m);this.setCurrentMenu(v,e)}mxEvent.consume(m)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,f){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var l=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));l+=(0==l.length?"?":"&")+"page-id="+b.getId();null!=e&&(l+="&"+e.join("&"));return(f&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+l+"#"+c.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){var l=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(f.addSeparator(c),f.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,v,x,E,d,g){m=this.createUrlParameters(m,v,x,E,d,g);x||m.push("hide-pages=1");l.isSelectionEmpty()||(x=l.getBoundingBox(l.getSelectionCells()),v=l.view.translate,d=l.view.scale,x.width/=d,x.height/=d,x.x=x.x/d-v.x,x.y=x.y/d-v.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(x.x),y:Math.round(x.y),width:Math.round(x.width),height:Math.round(x.height),border:100}))));
-E=new EmbedDialog(this,this.getLinkForPage(b,m,E));this.showDialog(E.container,450,240,!0,!0);E.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?m:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,
-c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l,
-!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==e.lookup(m)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,m,v,x){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var E=m.slice(),d=0;d<m.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[d]),"treeFolding","0")&&this.foldTreeCell(c,m[d]);m=E;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
-function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(x,E){var d=null!=E&&this.isTreeEdge(E);d&&m.push(E);x==l||null!=E&&!d||m.push(x);return(null==E||d)&&(x==l||!this.model.isCollapsed(x))}));this.model.setCollapsed(l,c);for(var v=0;v<m.length;v++)this.model.setVisible(m[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,v,x,E){return this.model.filterCells(this.getEdges(c,
-l,m,v,x,E),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return y.isVertex(H)&&m(H)}function l(H){var N=
-!1;null!=H&&(N="1"==p.getCurrentCellStyle(H).treeMoving);return N}function m(H){var N=!1;null!=H&&(H=y.getParent(H),N=p.view.getState(H),N="tree"==(null!=N?N.style:p.getCellStyle(H)).containerType);return N}function v(H){var N=!1;null!=H&&(H=y.getParent(H),N=p.view.getState(H),p.view.getState(H),N=null!=(null!=N?N.style:p.getCellStyle(H)).childLayout);return N}function x(H){H=p.view.getState(H);if(null!=H){var N=p.getIncomingTreeEdges(H.cell);if(0<N.length&&(N=p.view.getState(N[0]),null!=N&&(N=N.absolutePoints,
-null!=N&&0<N.length&&(N=N[N.length-1],null!=N)))){if(N.y==H.y&&Math.abs(N.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(N.y==H.y+H.height&&Math.abs(N.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(N.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(H,N){N=null!=N?N:!0;p.model.beginUpdate();try{var U=p.model.getParent(H),Q=p.getIncomingTreeEdges(H),V=p.cloneCells([Q[0],H]);p.model.setTerminal(V[0],p.model.getTerminal(Q[0],
-!0),!0);var W=x(H),t=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=N?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=N?H.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=t.x,V[1].geometry.y-=t.y);var D=p.view.getState(H),L=p.view.scale;if(null!=D){var T=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?T.x+=(N?H.geometry.width+10:-V[1].geometry.width-10)*L:T.y+=(N?
-H.geometry.height+10:-V[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(Q[0],!0));if(null!=O){for(var P=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,R=t=Q=0;R<O.length;R++){var X=p.model.getTerminal(O[R],!1);if(W==x(X)){var Z=p.view.getState(X);X!=H&&null!=Z&&(P&&N!=Z.getCenterX()<D.getCenterX()||!P&&N!=Z.getCenterY()<D.getCenterY())&&mxUtils.intersects(T,Z)&&(Q=10+Math.max(Q,(Math.min(T.x+T.width,Z.x+Z.width)-Math.max(T.x,Z.x))/L),t=10+Math.max(t,(Math.min(T.y+
-T.height,Z.y+Z.height)-Math.max(T.y,Z.y))/L))}}P?t=0:Q=0;for(R=0;R<O.length;R++)if(X=p.model.getTerminal(O[R],!1),W==x(X)&&(Z=p.view.getState(X),X!=H&&null!=Z&&(P&&N!=Z.getCenterX()<D.getCenterX()||!P&&N!=Z.getCenterY()<D.getCenterY()))){var Y=[];p.traverse(Z.cell,!0,function(aa,ba){var ea=null!=ba&&p.isTreeEdge(ba);ea&&Y.push(ba);(null==ba||ea)&&Y.push(aa);return null==ba||ea});p.moveCells(Y,(N?1:-1)*Q,(N?1:-1)*t)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function d(H){p.model.beginUpdate();
-try{var N=x(H),U=p.getIncomingTreeEdges(H),Q=p.cloneCells([U[0],H]);p.model.setTerminal(U[0],Q[1],!1);p.model.setTerminal(Q[0],Q[1],!0);p.model.setTerminal(Q[0],H,!1);var V=p.model.getParent(H),W=V.geometry,t=[];p.view.currentRoot!=V&&(Q[1].geometry.x-=W.x,Q[1].geometry.y-=W.y);p.traverse(H,!0,function(T,O){var P=null!=O&&p.isTreeEdge(O);P&&t.push(O);(null==O||P)&&t.push(T);return null==O||P});var D=H.geometry.width+40,L=H.geometry.height+40;N==mxConstants.DIRECTION_SOUTH?D=0:N==mxConstants.DIRECTION_NORTH?
-(D=0,L=-L):N==mxConstants.DIRECTION_WEST?(D=-D,L=0):N==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(t,D,L);return p.addCells(Q,V)}finally{p.model.endUpdate()}}function g(H,N){p.model.beginUpdate();try{var U=p.model.getParent(H),Q=p.getIncomingTreeEdges(H),V=x(H);0==Q.length&&(Q=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=N);var W=p.cloneCells([Q[0],H]);p.model.setTerminal(W[0],H,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var t=p.getCellStyle(W[1]).newEdgeStyle;
-if(null!=t)try{var D=JSON.parse(t),L;for(L in D)p.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Z){}}Q=p.getOutgoingTreeEdges(H);var T=U.geometry;N=[];p.view.currentRoot==U&&(T=new mxRectangle);for(t=0;t<Q.length;t++){var O=p.model.getTerminal(Q[t],!1);null!=O&&N.push(O)}var P=p.view.getBounds(N),R=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH?
-(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-R.x-T.x+10,W[1].geometry.y+=W[1].geometry.height-T.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-R.x+-T.x+10,W[1].geometry.y-=W[1].geometry.height+T.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+T.x+40):W[1].geometry.x+(W[1].geometry.width-T.x+40),W[1].geometry.y=null==P?H.geometry.y+
-(H.geometry.height-W[1].geometry.height)/2:(P.y+P.height)/X-R.y+-T.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(H,N,U){H=p.getOutgoingTreeEdges(H);U=p.view.getState(U);var Q=[];if(null!=U&&null!=H){for(var V=0;V<H.length;V++){var W=p.view.getState(p.model.getTerminal(H[V],!1));null!=W&&(!N&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||N&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&Q.push(W)}Q.sort(function(t,D){return N?t.x+t.width-D.x-D.width:t.y+t.height-
-D.y-D.height})}return Q}function n(H,N){var U=x(H),Q=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==Q&&U!=N?q.actions.get("selectParent").funct():U==N?(N=p.getOutgoingTreeEdges(H),null!=N&&0<N.length&&p.setSelectionCell(p.model.getTerminal(N[0],!1))):(U=p.getIncomingTreeEdges(H),null!=U&&0<U.length&&(Q=k(p.model.getTerminal(U[0],!0),Q,H),H=p.view.getState(H),null!=H&&(H=mxUtils.indexOf(Q,H),0<=H&&(H+=N==mxConstants.DIRECTION_NORTH||
-N==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=Q.length-1&&p.setSelectionCell(Q[H].cell)))))}var q=this,p=q.editor.graph,y=p.getModel(),A=q.menus.createPopupMenu;q.menus.createPopupMenu=function(H,N,U){A.apply(this,arguments);if(1==p.getSelectionCount()){N=p.getSelectionCell();var Q=p.getOutgoingTreeEdges(N);H.addSeparator();0<Q.length&&(c(p.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));c(p.getSelectionCell())?(H.addSeparator(),
-0<p.getIncomingTreeEdges(N).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(N)&&this.addMenuItems(H,["selectConnections"],null,U)}};q.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getOutgoingTreeEdges(H);if(null!=H){for(var N=[],U=0;U<H.length;U++)N.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(N)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
-1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=p.getOutgoingTreeEdges(p.model.getTerminal(H[0],!0)),null!=H)){for(var N=[],U=0;U<H.length;U++)N.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(N)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);null!=H&&0<H.length&&p.setSelectionCell(p.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(H,N){H=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(H)){if(null!=N&&mxEvent.isAltDown(N))p.setSelectionCells(p.model.getTreeEdges(H,null==N||!mxEvent.isShiftDown(N),null==N||!mxEvent.isControlDown(N)));else{var U=[];p.traverse(H,!0,function(Q,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=N&&mxEvent.isShiftDown(N)||U.push(Q);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D");
-var C=p.removeCells;p.removeCells=function(H,N){N=null!=N?N:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));N&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],Q=0;Q<H.length;Q++){var V=H[Q];y.isEdge(V)&&m(V)&&(U.push(V),V=y.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(t,D){var L=null!=D&&p.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(t);return null==D||L});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(H[Q]),H=H.concat(V))}else null!=V&&U.push(H[Q])}H=
-U;return C.apply(this,arguments)};q.hoverIcons.getStateAt=function(H,N,U){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(N,U))};var B=p.duplicateCells;p.duplicateCells=function(H,N){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),Q=0;Q<U.length;Q++){var V=p.view.getState(U[Q]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],H)}}this.model.beginUpdate();try{var t=B.call(this,H,N);if(t.length==H.length)for(Q=0;Q<H.length;Q++)if(c(H[Q])){var D=
-p.getIncomingTreeEdges(t[Q]);W=p.getIncomingTreeEdges(H[Q]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(W[0],!0),t[Q])}}}finally{this.model.endUpdate()}return t};var I=p.moveCells;p.moveCells=function(H,N,U,Q,V,W,t){var D=null;this.model.beginUpdate();try{var L=V,T=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var O=0;O<H.length;O++)if(c(H[O])||p.model.isEdge(H[O])&&null==p.model.getTerminal(H[O],
-!0)){V=p.model.getParent(H[O]);break}if(null!=L&&V!=L&&null!=this.view.getState(H[0])){var P=p.getIncomingTreeEdges(H[0]);if(0<P.length){var R=p.view.getState(p.model.getTerminal(P[0],!0));if(null!=R){var X=p.view.getState(L);null!=X&&(N=(X.getCenterX()-R.getCenterX())/p.view.scale,U=(X.getCenterY()-R.getCenterY())/p.view.scale)}}}}D=I.apply(this,arguments);if(null!=D&&null!=H&&D.length==H.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(L)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O],
-!0))&&this.model.setTerminal(D[O],L,!0);else if(c(H[O])&&(P=p.getIncomingTreeEdges(H[O]),0<P.length))if(!Q)c(L)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],L,!0);else if(0==p.getIncomingTreeEdges(D[O]).length){T=L;if(null==T||T==p.model.getParent(H[O]))T=p.model.getTerminal(P[0],!0);Q=this.cloneCell(P[0]);this.addEdge(Q,p.getDefaultParent(),T,D[O])}}finally{this.model.endUpdate()}return D};if(null!=q.sidebar){var M=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=
-function(H,N,U,Q){var V=p.model,W=null;V.beginUpdate();try{if(W=M.apply(this,arguments),c(H))for(var t=0;t<W.length;t++)if(V.isEdge(W[t])&&null==V.getTerminal(W[t],!0)){V.setTerminal(W[t],H,!0);var D=p.getCellGeometry(W[t]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var G={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},S=q.onKeyDown;q.onKeyDown=function(H){try{if(p.isEnabled()&&
-!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var N=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==H.which?N=mxEvent.isShiftDown(H)?d(p.getSelectionCell()):g(p.getSelectionCell()):13==H.which&&(N=E(p.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=N&&0<N.length)1==N.length&&p.model.isEdge(N[0])?p.setSelectionCell(p.model.getTerminal(N[0],!1)):p.setSelectionCell(N[N.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(p.view.getState(p.getSelectionCell())),
-p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var U=G[H.keyCode];null!=U&&(U.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(Q){q.handleError(Q)}mxEvent.isConsumed(H)||S.apply(this,arguments)};var u=p.connectVertex;p.connectVertex=function(H,N,U,Q,V,W,t){var D=p.getIncomingTreeEdges(H);if(c(H)){var L=x(H),T=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;return L==N||0==D.length?g(H,N):T==O?d(H):E(H,N!=mxConstants.DIRECTION_NORTH&&N!=mxConstants.DIRECTION_WEST)}return u.apply(this,arguments)};p.getSubtree=function(H){var N=
-[H];!l(H)&&!c(H)||v(H)||p.traverse(H,!0,function(U,Q){var V=null!=Q&&p.isTreeEdge(Q);V&&0>mxUtils.indexOf(N,Q)&&N.push(Q);(null==Q||V)&&0>mxUtils.indexOf(N,U)&&N.push(U);return null==Q||V});return N};var z=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){z.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
-"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(H)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,N){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container",
-function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var x=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");E.geometry.relative=!0;E.edge=!0;v.insertEdge(E,!0);x.insertEdge(E,!1);m.insert(E);m.insert(v);m.insert(x);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-m.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var x=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-x.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;v.insertEdge(E,!0);x.insertEdge(E,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.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;v.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;v.insertEdge(n,!0);k.insertEdge(n,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-q.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;v.insertEdge(p,!0);q.insertEdge(p,!1);m.insert(E);m.insert(g);m.insert(n);m.insert(p);m.insert(v);m.insert(x);m.insert(d);m.insert(k);m.insert(q);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(A,B){this.pages[A]==this.currentPage?(B.className="geActivePage",B.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):B.className="geInactivePage";B.setAttribute("draggable","true");mxEvent.addListener(B,"dragstart",mxUtils.bind(this,function(J){b.isEnabled()?(mxClient.IS_FF&&J.dataTransfer.setData("Text","<diagram/>"),k=A):mxEvent.consume(J)}));mxEvent.addListener(B,"dragend",mxUtils.bind(this,function(J){k=null;J.stopPropagation();
+J.preventDefault()}));mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(J){null!=k&&(J.dataTransfer.dropEffect="move");J.stopPropagation();J.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(J){null!=k&&A!=k&&this.movePage(k,A);J.stopPropagation();J.preventDefault()}));d.appendChild(B)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
+c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",d.style.marginRight="30px");var u=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");u.style.position="absolute";u.style.right=this.editor.chromeless?"29px":"55px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var z=this.createControlTab(4,"&nbsp;&#10095;");z.style.position="absolute";
+z.style.right=this.editor.chromeless?"0px":"29px";z.style.fontSize="13pt";this.tabContainer.appendChild(z);var C=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=C+"px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(A){d.scrollLeft-=Math.max(20,C-20);mxUtils.setOpacity(u,0<d.scrollLeft?100:50);mxUtils.setOpacity(z,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(A)}));mxUtils.setOpacity(u,0<d.scrollLeft?100:50);mxUtils.setOpacity(z,
+d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(z,"click",mxUtils.bind(this,function(A){d.scrollLeft+=Math.max(20,C-20);mxUtils.setOpacity(u,0<d.scrollLeft?100:50);mxUtils.setOpacity(z,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(A)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
+this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(e){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(e))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(e){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(e)})));return d};
+EditorUi.prototype.createControlTab=function(b,d,e){e=this.createTab(null!=e?e:!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=b+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.marginTop="5px";e.style.width="21px";e.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
+var k=new mxPopupMenu(mxUtils.bind(this,function(z,C){var A=mxUtils.bind(this,function(){for(var g=0;g<this.pages.length;g++)mxUtils.bind(this,function(l){var q=z.addItem(this.getShortPageName(this.pages[l]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[l])}),C),t=this.pages[l].getId();q.setAttribute("title",this.pages[l].getName()+" ("+(l+1)+"/"+this.pages.length+")"+(null!=t?" ["+t+"]":""));this.pages[l]==this.currentPage&&z.addCheckmark(q,Editor.checkmarkImage)})(g)}),B=mxUtils.bind(this,
+function(){z.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),C)});d||A();if(this.editor.graph.isEnabled()){d||(z.addSeparator(C),B());var J=this.currentPage;if(null!=J){z.addSeparator(C);var f=this.getShortPageName(J);z.addItem(mxResources.get("removeIt",[f]),null,mxUtils.bind(this,function(){this.removePage(J)}),C);z.addItem(mxResources.get("renameIt",[f]),null,mxUtils.bind(this,function(){this.renamePage(J,J.getName())}),C);d||z.addSeparator(C);z.addItem(mxResources.get("duplicateIt",
+[f]),null,mxUtils.bind(this,function(){this.duplicatePage(J,mxResources.get("copyOf",[J.getName()]))}),C)}}d&&(z.addSeparator(C),B(),z.addSeparator(C),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);k.destroy()});var m=mxEvent.getClientX(c),u=mxEvent.getClientY(c);k.popup(m,u,null,c);this.setCurrentMenu(k);mxEvent.consume(c)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.insertPage();mxEvent.consume(e)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,d,e,c){e=this.createTab(e);var k=b.getName()||mxResources.get("untitled"),m=b.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(e,k);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(b,e);42<d&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,k=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(m){c=null!=this.currentMenu;k=b==this.currentPage;e.isMouseDown||k||this.selectPage(b)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var u=new mxPopupMenu(this.createPageMenu(b));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);this.resetCurrentMenu();u.destroy()});var z=mxEvent.getClientX(m),C=mxEvent.getClientY(m);u.popup(z,C,null,m);this.setCurrentMenu(u,d)}mxEvent.consume(m)}}))};
+EditorUi.prototype.getLinkForPage=function(b,d,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));k+=(0==k.length?"?":"&")+"page-id="+b.getId();null!=d&&(k+="&"+d.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+k+"#"+c.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(e,c){var k=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),c);null!=this.getLinkForPage(b)&&(e.addSeparator(c),e.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,u,z,C,A,B){m=this.createUrlParameters(m,u,z,C,A,B);z||m.push("hide-pages=1");k.isSelectionEmpty()||(z=k.getBoundingBox(k.getSelectionCells()),u=k.view.translate,A=k.view.scale,z.width/=A,z.height/=A,z.x=z.x/A-u.x,z.y=z.y/A-u.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(z.x),y:Math.round(z.y),width:Math.round(z.width),height:Math.round(z.height),border:100}))));
+C=new EmbedDialog(this,this.getLinkForPage(b,m,C));this.showDialog(C.container,450,240,!0,!0);C.init()}))})));e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(c),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,c){d=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=d;return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,c){d=c.previous;c.previous=c.name;c.name=d;return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(e.relatedPage.viewState,function(k,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,k)?m:void 0})),null!=e.relatedPage.root&&d.encodeCell(e.relatedPage.root,
+c));return c};b.beforeDecode=function(d,e,c){c.ui=d.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var k=e.ownerDocument.createElement("diagram");k.setAttribute("id",e.getAttribute("relatedPage"));k.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(k);k=e.getAttribute("viewState");null!=k&&(c.relatedPage.viewState=JSON.parse(k),e.removeAttribute("viewState"));e=e.cloneNode(!0);k=e.firstChild;if(null!=k)for(c.relatedPage.root=d.decodeCell(k,
+!1),c=k.nextSibling,k.parentNode.removeChild(k),k=c;null!=k;){c=k.nextSibling;if(k.nodeType==mxConstants.NODETYPE_ELEMENT){var m=k.getAttribute("id");null==d.lookup(m)&&d.decodeCell(k)}k.parentNode.removeChild(k);k=c}}return e};b.afterDecode=function(d,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,k,m,u,z){k=null!=k?k:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var C=m.slice(),A=0;A<m.length;A++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[A]),"treeFolding","0")&&this.foldTreeCell(c,m[A]);m=C;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
+function(c,k){this.model.beginUpdate();try{var m=[];this.traverse(k,!0,mxUtils.bind(this,function(z,C){var A=null!=C&&this.isTreeEdge(C);A&&m.push(C);z==k||null!=C&&!A||m.push(z);return(null==C||A)&&(z==k||!this.model.isCollapsed(z))}));this.model.setCollapsed(k,c);for(var u=0;u<m.length;u++)this.model.setVisible(m[u],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,k,m,u,z,C){return this.model.filterCells(this.getEdges(c,
+k,m,u,z,C),mxUtils.bind(this,function(A){return this.isTreeEdge(A)}))};Graph.prototype.getIncomingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!1,!0,!1)};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 c(I){return q.isVertex(I)&&m(I)}function k(I){var M=
+!1;null!=I&&(M="1"==l.getCurrentCellStyle(I).treeMoving);return M}function m(I){var M=!1;null!=I&&(I=q.getParent(I),M=l.view.getState(I),M="tree"==(null!=M?M.style:l.getCellStyle(I)).containerType);return M}function u(I){var M=!1;null!=I&&(I=q.getParent(I),M=l.view.getState(I),l.view.getState(I),M=null!=(null!=M?M.style:l.getCellStyle(I)).childLayout);return M}function z(I){I=l.view.getState(I);if(null!=I){var M=l.getIncomingTreeEdges(I.cell);if(0<M.length&&(M=l.view.getState(M[0]),null!=M&&(M=M.absolutePoints,
+null!=M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==I.y&&Math.abs(M.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==I.y+I.height&&Math.abs(M.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function C(I,M){M=null!=M?M:!0;l.model.beginUpdate();try{var Q=l.model.getParent(I),P=l.getIncomingTreeEdges(I),U=l.cloneCells([P[0],I]);l.model.setTerminal(U[0],l.model.getTerminal(P[0],
+!0),!0);var W=z(I),p=Q.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=M?I.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=M?I.geometry.height+10:-U[1].geometry.height-10;l.view.currentRoot!=Q&&(U[1].geometry.x-=p.x,U[1].geometry.y-=p.y);var D=l.view.getState(I),L=l.view.scale;if(null!=D){var V=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V.x+=(M?I.geometry.width+10:-U[1].geometry.width-10)*L:V.y+=(M?
+I.geometry.height+10:-U[1].geometry.height-10)*L;var O=l.getOutgoingTreeEdges(l.model.getTerminal(P[0],!0));if(null!=O){for(var R=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=p=P=0;S<O.length;S++){var X=l.model.getTerminal(O[S],!1);if(W==z(X)){var Y=l.view.getState(X);X!=I&&null!=Y&&(R&&M!=Y.getCenterX()<D.getCenterX()||!R&&M!=Y.getCenterY()<D.getCenterY())&&mxUtils.intersects(V,Y)&&(P=10+Math.max(P,(Math.min(V.x+V.width,Y.x+Y.width)-Math.max(V.x,Y.x))/L),p=10+Math.max(p,(Math.min(V.y+
+V.height,Y.y+Y.height)-Math.max(V.y,Y.y))/L))}}R?p=0:P=0;for(S=0;S<O.length;S++)if(X=l.model.getTerminal(O[S],!1),W==z(X)&&(Y=l.view.getState(X),X!=I&&null!=Y&&(R&&M!=Y.getCenterX()<D.getCenterX()||!R&&M!=Y.getCenterY()<D.getCenterY()))){var aa=[];l.traverse(Y.cell,!0,function(ba,da){var Z=null!=da&&l.isTreeEdge(da);Z&&aa.push(da);(null==da||Z)&&aa.push(ba);return null==da||Z});l.moveCells(aa,(M?1:-1)*P,(M?1:-1)*p)}}}return l.addCells(U,Q)}finally{l.model.endUpdate()}}function A(I){l.model.beginUpdate();
+try{var M=z(I),Q=l.getIncomingTreeEdges(I),P=l.cloneCells([Q[0],I]);l.model.setTerminal(Q[0],P[1],!1);l.model.setTerminal(P[0],P[1],!0);l.model.setTerminal(P[0],I,!1);var U=l.model.getParent(I),W=U.geometry,p=[];l.view.currentRoot!=U&&(P[1].geometry.x-=W.x,P[1].geometry.y-=W.y);l.traverse(I,!0,function(V,O){var R=null!=O&&l.isTreeEdge(O);R&&p.push(O);(null==O||R)&&p.push(V);return null==O||R});var D=I.geometry.width+40,L=I.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?D=0:M==mxConstants.DIRECTION_NORTH?
+(D=0,L=-L):M==mxConstants.DIRECTION_WEST?(D=-D,L=0):M==mxConstants.DIRECTION_EAST&&(L=0);l.moveCells(p,D,L);return l.addCells(P,U)}finally{l.model.endUpdate()}}function B(I,M){l.model.beginUpdate();try{var Q=l.model.getParent(I),P=l.getIncomingTreeEdges(I),U=z(I);0==P.length&&(P=[l.createEdge(Q,null,"",null,null,l.createCurrentEdgeStyle())],U=M);var W=l.cloneCells([P[0],I]);l.model.setTerminal(W[0],I,!0);if(null==l.model.getTerminal(W[0],!1)){l.model.setTerminal(W[0],W[1],!1);var p=l.getCellStyle(W[1]).newEdgeStyle;
+if(null!=p)try{var D=JSON.parse(p),L;for(L in D)l.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&l.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Y){}}P=l.getOutgoingTreeEdges(I);var V=Q.geometry;M=[];l.view.currentRoot==Q&&(V=new mxRectangle);for(p=0;p<P.length;p++){var O=l.model.getTerminal(P[p],!1);null!=O&&M.push(O)}var R=l.view.getBounds(M),S=l.view.translate,X=l.view.scale;U==mxConstants.DIRECTION_SOUTH?
+(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/X-S.x-V.x+10,W[1].geometry.y+=W[1].geometry.height-V.y+40):U==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/X-S.x+-V.x+10,W[1].geometry.y-=W[1].geometry.height+V.y+40):(W[1].geometry.x=U==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+V.x+40):W[1].geometry.x+(W[1].geometry.width-V.x+40),W[1].geometry.y=null==R?I.geometry.y+
+(I.geometry.height-W[1].geometry.height)/2:(R.y+R.height)/X-S.y+-V.y+10);return l.addCells(W,Q)}finally{l.model.endUpdate()}}function J(I,M,Q){I=l.getOutgoingTreeEdges(I);Q=l.view.getState(Q);var P=[];if(null!=Q&&null!=I){for(var U=0;U<I.length;U++){var W=l.view.getState(l.model.getTerminal(I[U],!1));null!=W&&(!M&&Math.min(W.x+W.width,Q.x+Q.width)>=Math.max(W.x,Q.x)||M&&Math.min(W.y+W.height,Q.y+Q.height)>=Math.max(W.y,Q.y))&&P.push(W)}P.sort(function(p,D){return M?p.x+p.width-D.x-D.width:p.y+p.height-
+D.y-D.height})}return P}function f(I,M){var Q=z(I),P=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==P&&Q!=M?g.actions.get("selectParent").funct():Q==M?(M=l.getOutgoingTreeEdges(I),null!=M&&0<M.length&&l.setSelectionCell(l.model.getTerminal(M[0],!1))):(Q=l.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(P=J(l.model.getTerminal(Q[0],!0),P,I),I=l.view.getState(I),null!=I&&(I=mxUtils.indexOf(P,I),0<=I&&(I+=M==mxConstants.DIRECTION_NORTH||
+M==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=P.length-1&&l.setSelectionCell(P[I].cell)))))}var g=this,l=g.editor.graph,q=l.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(I,M,Q){t.apply(this,arguments);if(1==l.getSelectionCount()){M=l.getSelectionCell();var P=l.getOutgoingTreeEdges(M);I.addSeparator();0<P.length&&(c(l.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));c(l.getSelectionCell())?(I.addSeparator(),
+0<l.getIncomingTreeEdges(M).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<l.model.getEdgeCount(M)&&this.addMenuItems(I,["selectConnections"],null,Q)}};g.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var I=l.getSelectionCell();I=l.getOutgoingTreeEdges(I);if(null!=I){for(var M=[],Q=0;Q<I.length;Q++)M.push(l.model.getTerminal(I[Q],!1));l.setSelectionCells(M)}}},null,null,"Alt+Shift+X");g.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&
+1==l.getSelectionCount()){var I=l.getSelectionCell();I=l.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=l.getOutgoingTreeEdges(l.model.getTerminal(I[0],!0)),null!=I)){for(var M=[],Q=0;Q<I.length;Q++)M.push(l.model.getTerminal(I[Q],!1));l.setSelectionCells(M)}}},null,null,"Alt+Shift+S");g.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var I=l.getSelectionCell();I=l.getIncomingTreeEdges(I);null!=I&&0<I.length&&l.setSelectionCell(l.model.getTerminal(I[0],
+!0))}},null,null,"Alt+Shift+P");g.actions.addAction("selectDescendants",function(I,M){I=l.getSelectionCell();if(l.isEnabled()&&l.model.isVertex(I)){if(null!=M&&mxEvent.isAltDown(M))l.setSelectionCells(l.model.getTreeEdges(I,null==M||!mxEvent.isShiftDown(M),null==M||!mxEvent.isControlDown(M)));else{var Q=[];l.traverse(I,!0,function(P,U){var W=null!=U&&l.isTreeEdge(U);W&&Q.push(U);null!=U&&!W||null!=M&&mxEvent.isShiftDown(M)||Q.push(P);return null==U||W})}l.setSelectionCells(Q)}},null,null,"Alt+Shift+D");
+var x=l.removeCells;l.removeCells=function(I,M){M=null!=M?M:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));M&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var Q=[],P=0;P<I.length;P++){var U=I[P];q.isEdge(U)&&m(U)&&(Q.push(U),U=q.getTerminal(U,!1));if(c(U)){var W=[];l.traverse(U,!0,function(p,D){var L=null!=D&&l.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(p);return null==D||L});0<W.length&&(Q=Q.concat(W),U=l.getIncomingTreeEdges(I[P]),I=I.concat(U))}else null!=U&&Q.push(I[P])}I=
+Q;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(I,M,Q){return c(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,Q))};var E=l.duplicateCells;l.duplicateCells=function(I,M){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),P=0;P<Q.length;P++){var U=l.view.getState(Q[P]);if(null!=U&&c(U.cell)){var W=l.getIncomingTreeEdges(U.cell);for(U=0;U<W.length;U++)mxUtils.remove(W[U],I)}}this.model.beginUpdate();try{var p=E.call(this,I,M);if(p.length==I.length)for(P=0;P<I.length;P++)if(c(I[P])){var D=
+l.getIncomingTreeEdges(p[P]);W=l.getIncomingTreeEdges(I[P]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,l.getDefaultParent(),this.model.getTerminal(W[0],!0),p[P])}}}finally{this.model.endUpdate()}return p};var F=l.moveCells;l.moveCells=function(I,M,Q,P,U,W,p){var D=null;this.model.beginUpdate();try{var L=U,V=this.getCurrentCellStyle(U);if(null!=I&&c(U)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(var O=0;O<I.length;O++)if(c(I[O])||l.model.isEdge(I[O])&&null==l.model.getTerminal(I[O],
+!0)){U=l.model.getParent(I[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(I[0])){var R=l.getIncomingTreeEdges(I[0]);if(0<R.length){var S=l.view.getState(l.model.getTerminal(R[0],!0));if(null!=S){var X=l.view.getState(L);null!=X&&(M=(X.getCenterX()-S.getCenterX())/l.view.scale,Q=(X.getCenterY()-S.getCenterY())/l.view.scale)}}}}D=F.apply(this,arguments);if(null!=D&&null!=I&&D.length==I.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(L)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O],
+!0))&&this.model.setTerminal(D[O],L,!0);else if(c(I[O])&&(R=l.getIncomingTreeEdges(I[O]),0<R.length))if(!P)c(L)&&0>mxUtils.indexOf(I,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==l.getIncomingTreeEdges(D[O]).length){V=L;if(null==V||V==l.model.getParent(I[O]))V=l.model.getTerminal(R[0],!0);P=this.cloneCell(R[0]);this.addEdge(P,l.getDefaultParent(),V,D[O])}}finally{this.model.endUpdate()}return D};if(null!=g.sidebar){var G=g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=
+function(I,M,Q,P){var U=l.model,W=null;U.beginUpdate();try{if(W=G.apply(this,arguments),c(I))for(var p=0;p<W.length;p++)if(U.isEdge(W[p])&&null==U.getTerminal(W[p],!0)){U.setTerminal(W[p],I,!0);var D=l.getCellGeometry(W[p]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return W}}var y={88:g.actions.get("selectChildren"),84:g.actions.get("selectSubtree"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},T=g.onKeyDown;g.onKeyDown=function(I){try{if(l.isEnabled()&&
+!l.isEditing()&&c(l.getSelectionCell())&&1==l.getSelectionCount()){var M=null;0<l.getIncomingTreeEdges(l.getSelectionCell()).length&&(9==I.which?M=mxEvent.isShiftDown(I)?A(l.getSelectionCell()):B(l.getSelectionCell()):13==I.which&&(M=C(l.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=M&&0<M.length)1==M.length&&l.model.isEdge(M[0])?l.setSelectionCell(l.model.getTerminal(M[0],!1)):l.setSelectionCell(M[M.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(l.getSelectionCell())),
+l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=y[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(f(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(f(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(f(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(f(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(I))}}catch(P){g.handleError(P)}mxEvent.isConsumed(I)||T.apply(this,arguments)};var n=l.connectVertex;l.connectVertex=function(I,M,Q,P,U,W,p){var D=l.getIncomingTreeEdges(I);if(c(I)){var L=z(I),V=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return L==M||0==D.length?B(I,M):V==O?A(I):C(I,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return n.apply(this,arguments)};l.getSubtree=function(I){var M=
+[I];!k(I)&&!c(I)||u(I)||l.traverse(I,!0,function(Q,P){var U=null!=P&&l.isTreeEdge(P);U&&0>mxUtils.indexOf(M,P)&&M.push(P);(null==P||U)&&0>mxUtils.indexOf(M,Q)&&M.push(Q);return null==P||U});return M};var v=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){v.apply(this,arguments);(k(this.state.cell)||c(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);
+this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(I)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){K.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,M){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=e.apply(this,arguments),k=this.graph;return c.concat([this.addEntry("tree container",
+function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var u=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var z=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!0);z.insertEdge(C,!1);m.insert(C);m.insert(u);m.insert(z);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
+m.vertex=!0;var u=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');u.vertex=!0;var z=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!0);z.insertEdge(C,!1);var A=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+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.relative=!0;B.edge=!0;u.insertEdge(B,!0);A.insertEdge(B,!1);var J=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+J.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;u.insertEdge(f,!0);J.insertEdge(f,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");l.geometry.relative=!0;l.edge=!0;u.insertEdge(l,!0);g.insertEdge(l,!1);m.insert(C);m.insert(B);m.insert(f);m.insert(l);m.insert(u);m.insert(z);m.insert(A);m.insert(J);m.insert(g);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var m=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-m.vertex=!0;var v=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(v,"treeRoot","1");v.vertex=!0;var x=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");E.geometry.relative=!0;E.edge=!0;v.insertEdge(E,!0);x.insertEdge(E,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);m.insert(E);m.insert(g);m.insert(v);m.insert(x);m.insert(d);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(m,"treeRoot",
-"1");m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree division",function(){var m=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);var x=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=
-!0;E.edge=!0;x.insertEdge(E,!1);return sb.createVertexTemplateFromCells([v,E,m,x],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(A,C){if(EditorUi.windowed){var B=A.editor.graph;B.popupMenuHandler.hideMenu();if(null==A.formatWindow){C="1"==urlParams.sketch?Math.max(10,A.diagramContainer.clientWidth-241):Math.max(10,A.diagramContainer.clientWidth-248);var I="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;B="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,B.container.clientHeight-10);A.formatWindow=new WrapperWindow(A,mxResources.get("format"),C,I,240,B,
-function(M){A.createFormat(M).init()});A.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.formatWindow.window.fit()}));A.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else A.formatWindow.window.setVisible(null!=C?C:!A.formatWindow.window.isVisible())}else null==A.formatElt&&(A.formatElt=A.createSidebarContainer(),A.createFormat(A.formatElt).init(),A.formatElt.style.border="none",A.formatElt.style.width="240px",A.formatElt.style.borderLeft="1px solid gray",
-A.formatElt.style.right="0px"),B=A.diagramContainer.parentNode,null!=A.formatElt.parentNode?(A.formatElt.parentNode.removeChild(A.formatElt),B.style.right="0px"):(B.parentNode.appendChild(A.formatElt),B.style.right=A.formatElt.style.width)}function e(A,C){function B(S,u){var z=A.menus.get(S);S=G.addMenu(u,mxUtils.bind(this,function(){z.funct.apply(this,arguments)}));S.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-S.className="geTitle";C.appendChild(S);return S}var I=document.createElement("div");I.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";I.className="geTitle";var M=document.createElement("span");M.style.fontSize="18px";M.style.marginRight="5px";M.innerHTML="+";I.appendChild(M);mxUtils.write(I,mxResources.get("moreShapes"));C.appendChild(I);mxEvent.addListener(I,"click",function(){A.actions.get("shapes").funct()});
-var G=new Menubar(A,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?I.style.bottom="0":null!=A.actions.get("newLibrary")?(I=document.createElement("div"),I.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("newLibrary")),I.appendChild(M),
-C.appendChild(I),mxEvent.addListener(I,"click",A.actions.get("newLibrary").funct),I=document.createElement("div"),I.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("openLibrary")),I.appendChild(M),C.appendChild(I),mxEvent.addListener(I,
-"click",A.actions.get("openLibrary").funct)):(I=B("newLibrary",mxResources.get("newLibrary")),I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="0",I=B("openLibraryFrom",mxResources.get("openLibraryFrom")),I.style.borderLeft="1px solid lightgray",I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="50%");C.appendChild(A.sidebar.container);C.style.overflow="hidden"}
-function f(A,C){if(EditorUi.windowed){var B=A.editor.graph;B.popupMenuHandler.hideMenu();if(null==A.sidebarWindow){C=Math.min(B.container.clientWidth-10,218);var I="1"==urlParams.embedInline?650:Math.min(B.container.clientHeight-40,650);A.sidebarWindow=new WrapperWindow(A,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(B.container.clientHeight-I)/2):56,C-6,I-6,function(M){e(A,M)});A.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){A.sidebarWindow.window.fit()}));A.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);A.sidebarWindow.window.setVisible(!0);isLocalStorage&&A.getLocalData("sidebar",function(M){A.sidebar.showEntries(M,null,!0)});A.restoreLibraries()}else A.sidebarWindow.window.setVisible(null!=C?C:!A.sidebarWindow.window.isVisible())}else null==A.sidebarElt&&(A.sidebarElt=A.createSidebarContainer(),e(A,A.sidebarElt),A.sidebarElt.style.border="none",A.sidebarElt.style.width="210px",
-A.sidebarElt.style.borderRight="1px solid gray"),B=A.diagramContainer.parentNode,null!=A.sidebarElt.parentNode?(A.sidebarElt.parentNode.removeChild(A.sidebarElt),B.style.left="0px"):(B.parentNode.appendChild(A.sidebarElt),B.style.left=A.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(A){}Editor.checkmarkImage=
+m.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;m.insertEdge(u,!1);return sb.createVertexTemplateFromCells([m,u],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+m.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;m.insertEdge(u,!1);return sb.createVertexTemplateFromCells([m,u],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+m.vertex=!0;var u=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var z=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!0);z.insertEdge(C,!1);var A=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+B.geometry.relative=!0;B.edge=!0;u.insertEdge(B,!0);A.insertEdge(B,!1);m.insert(C);m.insert(B);m.insert(u);m.insert(z);m.insert(A);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.setAttributeForCell(m,"treeRoot",
+"1");m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree division",function(){var m=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+u.geometry.setTerminalPoint(new mxPoint(0,0),!0);u.geometry.relative=!0;u.edge=!0;m.insertEdge(u,!1);return sb.createVertexTemplateFromCells([m,u],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;m.insertEdge(u,!1);var z=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");z.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=
+!0;C.edge=!0;z.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C,m,z],220,60,"Sub Sections")})])}}})();"1"==urlParams["live-ui"]&&"min"==uiTheme&&"1"==urlParams.sketch&&(Editor.currentTheme="sketch",uiTheme="kennedy");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(t,x){if(EditorUi.windowed){var E=t.editor.graph;E.popupMenuHandler.hideMenu();if(null==t.formatWindow){x="1"==urlParams.sketch?Math.max(10,t.diagramContainer.clientWidth-244):Math.max(10,t.diagramContainer.clientWidth-248);var F="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;E="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,E.container.clientHeight-10);t.formatWindow=new WrapperWindow(t,mxResources.get("format"),x,F,240,E,
+function(G){t.createFormat(G).init()});t.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){t.formatWindow.window.fit()}));t.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else t.formatWindow.window.setVisible(null!=x?x:!t.formatWindow.window.isVisible())}else null==t.formatElt&&(t.formatElt=t.createSidebarContainer(),t.createFormat(t.formatElt).init(),t.formatElt.style.border="none",t.formatElt.style.width="240px",t.formatElt.style.borderLeft="1px solid gray",
+t.formatElt.style.right="0px"),E=t.diagramContainer.parentNode,null!=t.formatElt.parentNode?(t.formatElt.parentNode.removeChild(t.formatElt),E.style.right="0px"):(E.parentNode.appendChild(t.formatElt),E.style.right=t.formatElt.style.width)}function d(t,x){function E(T,n){var v=t.menus.get(T);T=y.addMenu(n,mxUtils.bind(this,function(){v.funct.apply(this,arguments)}));T.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+T.className="geTitle";x.appendChild(T);return T}var F=document.createElement("div");F.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";F.className="geTitle";var G=document.createElement("span");G.style.fontSize="18px";G.style.marginRight="5px";G.innerHTML="+";F.appendChild(G);mxUtils.write(F,mxResources.get("moreShapes"));x.appendChild(F);mxEvent.addListener(F,"click",function(){t.actions.get("shapes").funct()});
+var y=new Menubar(t,x);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?F.style.bottom="0":null!=t.actions.get("newLibrary")?(F=document.createElement("div"),F.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",F.className="geTitle",G=document.createElement("span"),G.style.cssText="position:relative;top:6px;",mxUtils.write(G,mxResources.get("newLibrary")),F.appendChild(G),
+x.appendChild(F),mxEvent.addListener(F,"click",t.actions.get("newLibrary").funct),F=document.createElement("div"),F.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",F.className="geTitle",G=document.createElement("span"),G.style.cssText="position:relative;top:6px;",mxUtils.write(G,mxResources.get("openLibrary")),F.appendChild(G),x.appendChild(F),mxEvent.addListener(F,
+"click",t.actions.get("openLibrary").funct)):(F=E("newLibrary",mxResources.get("newLibrary")),F.style.boxSizing="border-box",F.style.paddingRight="6px",F.style.paddingLeft="6px",F.style.height="32px",F.style.left="0",F=E("openLibraryFrom",mxResources.get("openLibraryFrom")),F.style.borderLeft="1px solid lightgray",F.style.boxSizing="border-box",F.style.paddingRight="6px",F.style.paddingLeft="6px",F.style.height="32px",F.style.left="50%");x.appendChild(t.sidebar.container);x.style.overflow="hidden"}
+function e(t,x){if(EditorUi.windowed){var E=t.editor.graph;E.popupMenuHandler.hideMenu();if(null==t.sidebarWindow){x=Math.min(E.container.clientWidth-10,218);var F="1"==urlParams.embedInline?650:Math.min(E.container.clientHeight-40,650);t.sidebarWindow=new WrapperWindow(t,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(E.container.clientHeight-F)/2):56,x-6,F-6,function(G){d(t,G)});t.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){t.sidebarWindow.window.fit()}));t.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);t.sidebarWindow.window.setVisible(!0);isLocalStorage&&t.getLocalData("sidebar",function(G){t.sidebar.showEntries(G,null,!0)});t.restoreLibraries()}else t.sidebarWindow.window.setVisible(null!=x?x:!t.sidebarWindow.window.isVisible())}else null==t.sidebarElt&&(t.sidebarElt=t.createSidebarContainer(),d(t,t.sidebarElt),t.sidebarElt.style.border="none",t.sidebarElt.style.width="210px",
+t.sidebarElt.style.borderRight="1px solid gray"),E=t.diagramContainer.parentNode,null!=t.sidebarElt.parentNode?(t.sidebarElt.parentNode.removeChild(t.sidebarElt),E.style.left="0px"):(E.parentNode.appendChild(t.sidebarElt),E.style.left=t.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(t){}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="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");l.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,C){null!=C.shortcut&&900>c&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",C.shortcut):v.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;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";
-A.innerText="";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";var C=mxResources.get("changeUser");if("none"!=A.style.display){A.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var I=document.createElement("img");I.setAttribute("border","0");I.style.position="absolute";
-I.style.left="18px";I.style.top="2px";I.style.width="12px";I.style.height="12px";var M=B.getRealtimeError();B=B.getRealtimeState();C+=" ("+mxResources.get("realtimeCollaboration")+": ";1==B?(I.src=Editor.syncImage,C+=mxResources.get("online")):(I.src=Editor.syncProblemImage,C=null!=M&&null!=M.message?C+M.message:C+mxResources.get("disconnected"));A.style.marginRight="6px";A.appendChild(I);C+=")"}}A.setAttribute("title",C)}};var E=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){E.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var C=document.createElement("a");C.className="geMenuItem gePrimaryBtn";C.style.marginLeft="8px";C.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var B="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(C,B);C.setAttribute("title",B);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));A.appendChild(C)}}else mxUtils.write(C,mxResources.get("save")),C.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),A.appendChild(C),
-"1"==urlParams.saveAndExit&&(C=document.createElement("a"),mxUtils.write(C,mxResources.get("saveAndExit")),C.setAttribute("title",mxResources.get("saveAndExit")),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),A.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),B="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,
-B),C.setAttribute("title",B),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),A.appendChild(C));this.buttonContainer.appendChild(A);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(A,C,B){var I=this.editorUi.editor.graph;A.smartSeparators=!0;d.apply(this,arguments);
-"1"==urlParams.sketch?I.isEnabled()&&(A.addSeparator(),1==I.getSelectionCount()&&this.addMenuItems(A,["-","lockUnlock"],null,B)):1==I.getSelectionCount()?(I.isCellFoldable(I.getSelectionCell())&&this.addMenuItems(A,I.isCellCollapsed(C)?["expand"]:["collapse"],null,B),this.addMenuItems(A,["collapsible","-","lockUnlock","enterGroup"],null,B),A.addSeparator(),this.addSubmenu("layout",A)):I.isSelectionEmpty()&&I.isEnabled()?(A.addSeparator(),this.addMenuItems(A,["editData"],null,B),A.addSeparator(),this.addSubmenu("layout",
-A),this.addSubmenu("insert",A),this.addMenuItems(A,["-","exitGroup"],null,B)):I.isEnabled()&&this.addMenuItems(A,["-","lockUnlock"],null,B)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(A,C,B){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(A,["copyAsImage"],null,B)};EditorUi.prototype.toggleFormatPanel=function(A){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=A?A:!this.formatWindow.window.isVisible()):
-b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var k=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();k.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(A){n.apply(this,arguments);if(A){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var A=this.editorUi,C=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(u){A.setPagesVisible(!Editor.pagesVisible)}));
-C.setToggleAction(!0);C.setSelectedCallback(function(){return Editor.pagesVisible});A.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){f(A)},null,null,Editor.ctrlKey+"+Shift+K"));C=A.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(A)}));C.shortcut=A.actions.get("formatPanel").shortcut;C.setToggleAction(!0);C.setSelectedCallback(mxUtils.bind(this,function(){return null!=A.formatWindow&&A.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
-!A.isOffline()&&A.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var u=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(u.container,620,420,!0,!1);u.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var u=new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(u.container,620,420,!0,!1);u.init()}));var B=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(u,z){var F=this.editorUi.editor.graph,J=F.getSelectionCell();B.call(this,u,J,null,z);this.addMenuItems(u,["editTooltip"],z);F.model.isVertex(J)&&this.addMenuItems(u,["editGeometry"],z);this.addMenuItems(u,["-","edit"],z)})));this.addPopupMenuCellEditItems=function(u,z,F,J){u.addSeparator();this.addSubmenu("editCell",u,J,mxResources.get("edit"))};var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(u,z){I.funct(u,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-A.menus.addMenuItems(u,["publishLink"],z);A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(u.addSeparator(z),A.menus.addSubmenu("embed",u,z))})));var M=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(u,z){M.funct(u,z);this.addMenuItems(u,["-","ruler","-","pageScale"],z)})));var G="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),S=function(u,z,F,J){u.addItem(F,null,mxUtils.bind(this,function(){var K=new CreateGraphDialog(A,F,
-J);A.showDialog(K.container,620,420,!0,!1);K.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,z){for(var F=0;F<G.length;F++)"-"==G[F]?u.addSeparator(z):S(u,z,mxResources.get(G[F])+"...",G[F])})))};EditorUi.prototype.installFormatToolbar=function(A){var C=this.editor.graph,B=document.createElement("div");B.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-C.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,M){0<C.getSelectionCount()?(A.appendChild(B),B.innerHTML="Selected: "+C.getSelectionCount()):null!=B.parentNode&&B.parentNode.removeChild(B)}))};var p=!1;EditorUi.prototype.initFormatWindow=function(){if(!p&&null!=this.formatWindow){p=!0;var A=this.formatWindow.window.toggleMinimized,C=240;this.formatWindow.window.toggleMinimized=function(){A.apply(this,arguments);this.minimized?(C=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+C-140+"px"):(this.div.style.width=C+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-C+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var y=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function A(da,ca,na){var la=G.menus.get(da),qa=F.addMenu(mxResources.get(da),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),z);qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(da));G.menus.menuCreated(la,
-qa,"geMenuItem");null!=na?(qa.style.backgroundImage="url("+na+")",qa.style.backgroundPosition="center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize="24px 24px",qa.style.width="34px",qa.innerText=""):ca||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function C(da,ca,na,la,qa,ha){var ia=document.createElement("a");ia.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position="relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=G.statusContainer?u.insertBefore(ia,G.statusContainer):u.appendChild(ia);null!=ha?(ia.style.backgroundImage="url("+ha+")",ia.style.backgroundPosition=
-"center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,da);mxEvent.addListener(ia,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(pa){pa.preventDefault()}));mxEvent.addListener(ia,"click",function(pa){"disabled"!=ia.getAttribute("disabled")&&ca(pa);mxEvent.consume(pa)});null==na&&(ia.style.marginRight="4px");null!=la&&ia.setAttribute("title",la);null!=qa&&(da=function(){qa.isEnabled()?(ia.removeAttribute("disabled"),
-ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},qa.addListener("stateChanged",da),S.addListener("enabledChanged",da),da());return ia}function B(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");
-for(var la=0;la<da.length;la++)null!=da[la]&&("1"==urlParams.sketch&&(da[la].style.padding="10px 8px",da[la].style.width="30px"),da[la].style.margin="0px",da[la].style.boxShadow="none",na.appendChild(da[la]));null!=ca&&mxUtils.setOpacity(na,ca);null!=G.statusContainer&&"1"!=urlParams.sketch?u.insertBefore(na,G.statusContainer):u.appendChild(na);return na}function I(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>V.offsetTop-V.offsetHeight/2?"70px":"10px");else{for(var da=u.firstChild;null!=
-da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}z=u.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var na=null;da||(na=A("diagram"));ca=da?A("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);B([na,C(mxResources.get("shapes"),G.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),G.actions.get("image"),da?Editor.shapesImage:null),C(mxResources.get("format"),
-G.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+G.actions.get("formatPanel").shortcut+")",G.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=A("insert",!0,da?U:null);B([ca,C(mxResources.get("delete"),G.actions.get("delete").funct,null,mxResources.get("delete"),G.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(B([ma,Ga],60),520<=c&&B([Aa,640<=c?C("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ba,Editor.zoomInImage):
-null,640<=c?C("",ea.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ea,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&G.appIconClicked(la)}),null,null));ca=G.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&
-"1"!=urlParams.sketch?(null==ta&&(ca=F.addMenu("",ca.funct),ca.setAttribute("title","language"),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="22px 22px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="12px",u.appendChild(ca),ta=ca),G.buttonContainer.style.paddingRight=
-"34px"):(G.buttonContainer.style.paddingRight="4px",null!=ta&&(ta.parentNode.removeChild(ta),ta=null))}y.apply(this,arguments);var M=document.createElement("div");M.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";M.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(M);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||
-8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var G=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
-null==G.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=G.embedViewport.x+G.embedViewport.width,la=parseInt(this.div.offsetTop),qa=parseInt(this.div.offsetHeight),ha=G.embedViewport.y+G.embedViewport.height;this.div.style.left=Math.max(G.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(G.embedViewport.y,Math.min(la,ha-qa))+"px";this.div.style.height=Math.min(G.embedViewport.height,parseInt(this.div.style.height))+
-"px";this.div.style.width=Math.min(G.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),M=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>M)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));
-G=this;var S=G.editor.graph;G.toolbar=this.createToolbar(G.createDiv("geToolbar"));G.defaultLibraryName=mxResources.get("untitledLibrary");var u=document.createElement("div");u.className="geMenubarContainer";var z=null,F=new Menubar(G,u);G.statusContainer=G.createStatusContainer();G.statusContainer.style.position="relative";G.statusContainer.style.maxWidth="";G.statusContainer.style.marginTop="7px";G.statusContainer.style.marginLeft="6px";G.statusContainer.style.color="gray";G.statusContainer.style.cursor=
-"default";var J=G.hideCurrentMenu;G.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var K=G.descriptorChanged;G.descriptorChanged=function(){K.apply(this,arguments);var da=G.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);u.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else u.removeAttribute("title")};
-G.setStatusText(G.editor.getStatus());u.appendChild(G.statusContainer);G.buttonContainer=document.createElement("div");G.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";u.appendChild(G.buttonContainer);G.menubarContainer=G.buttonContainer;G.tabContainer=document.createElement("div");G.tabContainer.className="geTabContainer";G.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-M=G.diagramContainer.parentNode;var H=document.createElement("div");H.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";G.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){H.style.top="20px";G.titlebar=document.createElement("div");G.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var N=document.createElement("div");
-N.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";G.titlebar.appendChild(N);M.appendChild(G.titlebar)}var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Q="1"==urlParams.sketch?document.createElement("div"):null,V="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,t=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left=
-"10px",W.style.top="10px",V.style.left="10px",V.style.top="60px",Q.style.top="10px",Q.style.right="12px",Q.style.left="",G.diagramContainer.setAttribute("data-bounds",G.diagramContainer.style.top+" "+G.diagramContainer.style.left+" "+G.diagramContainer.style.width+" "+G.diagramContainer.style.height),G.diagramContainer.style.top="0px",G.diagramContainer.style.left="0px",G.diagramContainer.style.bottom="0px",G.diagramContainer.style.right="0px",G.diagramContainer.style.width="",G.diagramContainer.style.height=
-"";else{var da=G.diagramContainer.getAttribute("data-bounds");if(null!=da){G.diagramContainer.style.background="transparent";G.diagramContainer.removeAttribute("data-bounds");var ca=S.getGraphBounds();da=da.split(" ");G.diagramContainer.style.top=da[0];G.diagramContainer.style.left=da[1];G.diagramContainer.style.width=ca.width+50+"px";G.diagramContainer.style.height=ca.height+46+"px";G.diagramContainer.style.bottom="";G.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:G.diagramContainer.getBoundingClientRect()}),"*");G.refresh()}W.style.left=G.diagramContainer.offsetLeft+"px";W.style.top=G.diagramContainer.offsetTop-W.offsetHeight-4+"px";V.style.display="";V.style.left=G.diagramContainer.offsetLeft-V.offsetWidth-4+"px";V.style.top=G.diagramContainer.offsetTop+"px";Q.style.left=G.diagramContainer.offsetLeft+G.diagramContainer.offsetWidth-Q.offsetWidth+"px";Q.style.top=W.style.top;Q.style.right="";G.bottomResizer.style.left=G.diagramContainer.offsetLeft+(G.diagramContainer.offsetWidth-
-G.bottomResizer.offsetWidth)/2+"px";G.bottomResizer.style.top=G.diagramContainer.offsetTop+G.diagramContainer.offsetHeight-G.bottomResizer.offsetHeight/2-1+"px";G.rightResizer.style.left=G.diagramContainer.offsetLeft+G.diagramContainer.offsetWidth-G.rightResizer.offsetWidth/2-1+"px";G.rightResizer.style.top=G.diagramContainer.offsetTop+(G.diagramContainer.offsetHeight-G.bottomResizer.offsetHeight)/2+"px"}G.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";G.rightResizer.style.visibility=
-G.bottomResizer.style.visibility;u.style.display="none";W.style.visibility="";Q.style.visibility=""});N=G.actions.get("fullscreen");var D=C("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),L=mxUtils.bind(this,function(){D.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";t()});N=mxUtils.bind(this,function(){b(G,
-!0);G.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);L()});G.addListener("inlineFullscreenChanged",L);G.addListener("editInlineStart",N);"1"==urlParams.embedInline&&G.addListener("darkModeChanged",N);G.addListener("editInlineStop",mxUtils.bind(this,function(da){G.diagramContainer.style.width="10px";G.diagramContainer.style.height="10px";G.diagramContainer.style.border="";G.bottomResizer.style.visibility="hidden";G.rightResizer.style.visibility=
-"hidden";W.style.visibility="hidden";Q.style.visibility="hidden";V.style.display="none"}));if(null!=G.hoverIcons){var T=G.hoverIcons.update;G.hoverIcons.update=function(){S.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=S.freehand){var O=S.freehand.createStyle;S.freehand.createStyle=function(da){return O.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){V.className="geToolbarContainer";Q.className="geToolbarContainer";W.className="geToolbarContainer";u.className="geToolbarContainer";
-G.picker=V;G.sketchPickerMenuElt=V;var P=!1;"1"!=urlParams.embed&&"atlassian"!=G.getServiceName()&&(mxEvent.addListener(u,"mouseenter",function(){G.statusContainer.style.display="inline-block"}),mxEvent.addListener(u,"mouseleave",function(){P||(G.statusContainer.style.display="none")}));var R=mxUtils.bind(this,function(da){null!=G.notificationBtn&&(null!=da?G.notificationBtn.setAttribute("title",da):G.notificationBtn.removeAttribute("title"))});u.style.visibility=20>u.clientWidth?"hidden":"";G.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){G.setStatusText(G.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=G.getServiceName())if(G.statusContainer.style.display="inline-block",P=!0,1==G.statusContainer.children.length&&""==G.editor.getStatus())u.style.visibility="hidden";else{if(0==G.statusContainer.children.length||1==G.statusContainer.children.length&&"function"===typeof G.statusContainer.firstChild.getAttribute&&null==G.statusContainer.firstChild.getAttribute("class")){var da=null!=G.statusContainer.firstChild&&
-"function"===typeof G.statusContainer.firstChild.getAttribute?G.statusContainer.firstChild.getAttribute("title"):G.editor.getStatus();R(da);var ca=G.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(G.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',G.statusContainer.style.display="inline-block",P=!0):6<G.buttonContainer.clientWidth&&(G.statusContainer.style.display=
-"none",P=!1)}else G.statusContainer.style.display="inline-block",R(null),P=!0;u.style.visibility=20>u.clientWidth&&!P?"hidden":""}}));oa=A("diagram",null,Editor.menuImage);oa.style.boxShadow="none";oa.style.padding="6px";oa.style.margin="0px";W.appendChild(oa);mxEvent.disableContextMenu(oa);mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),
-null,null);G.statusContainer.style.position="";G.statusContainer.style.display="none";G.statusContainer.style.margin="0px";G.statusContainer.style.padding="6px 0px";G.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";G.statusContainer.style.display="inline-block";G.statusContainer.style.textOverflow="ellipsis";G.buttonContainer.style.display="inline-block";G.buttonContainer.style.position="relative";G.buttonContainer.style.paddingRight="0px";G.buttonContainer.style.top="0px";var X=document.createElement("a");
-X.style.padding="0px";X.style.boxShadow="none";X.className="geMenuItem";X.style.display="inline-block";X.style.width="40px";X.style.height="12px";X.style.marginBottom="-2px";X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";X.style.backgroundPosition="top center";X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var Z=!1,Y=mxUtils.bind(this,function(){V.innerText="";if(!Z){var da=function(ca,na,la,qa){null!=na&&ca.setAttribute("title",na);ca.style.cursor=null!=
-la?la:"default";ca.style.margin="2px 0px";V.appendChild(ca);mxUtils.br(V);null!=qa&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,qa),ca.appendChild(na));return ca};da(G.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",
-!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(G.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(G.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,
-80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(G.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,S.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
-0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;da(G.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ca.geometry.width=S.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
-20),!1);da(G.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,la,qa){ca=C("",ca.funct,null,na,ca,la);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",qa)})(G.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");oa=A("insert",null,Editor.plusImage);oa.style.boxShadow="none";oa.style.opacity="0.7";oa.style.padding="6px";
-oa.style.margin="0px";oa.style.height="34px";oa.style.width="37px";da(oa,null,"pointer")}"1"!=urlParams.embedInline&&V.appendChild(X)});mxEvent.addListener(X,"click",mxUtils.bind(this,function(){Z?(mxUtils.setPrefixedStyle(V.style,"transform","translate(0, -50%)"),V.style.padding="8px 6px 4px",V.style.top="50%",V.style.bottom="",V.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),Z=!1,
-Y()):(V.innerText="",V.appendChild(X),mxUtils.setPrefixedStyle(V.style,"transform","translate(0, 0)"),V.style.top="",V.style.bottom="12px",V.style.padding="0px",V.style.height="24px",X.style.height="24px",X.style.backgroundImage="url("+Editor.plusImage+")",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",Z=!0)}));Y();G.addListener("darkModeChanged",Y);G.addListener("sketchModeChanged",Y)}else G.editor.addListener("statusChanged",mxUtils.bind(this,function(){G.setStatusText(G.editor.getStatus())}));
-N=G.menus.get("viewZoom");if(null!=N){var aa=function(da){if(mxEvent.isAltDown(da))G.hideCurrentMenu(),G.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))G.hideCurrentMenu(),G.actions.get("smartFit").funct(),mxEvent.consume(da)},ba=G.actions.get("zoomIn"),ea=G.actions.get("zoomOut"),ja=G.actions.get("resetView"),fa=G.actions.get("undo"),ra=G.actions.get("redo"),ma=C("",fa.funct,null,mxResources.get("undo")+" ("+fa.shortcut+
-")",fa,Editor.undoImage),Ga=C("",ra.funct,null,mxResources.get("redo")+" ("+ra.shortcut+")",ra,Editor.redoImage);if(null!=Q){ja=function(){Ca.style.display=null!=G.pages&&("0"!=urlParams.pages||1<G.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Fa=function(){Ca.innerText="";if(null!=G.currentPage){mxUtils.write(Ca,G.currentPage.getName());var da=null!=G.pages?G.pages.length:1,ca=G.getPageIndex(G.currentPage);ca=null!=ca?ca+1:1;var na=G.currentPage.getId();Ca.setAttribute("title",G.currentPage.getName()+
-" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},ya=G.actions.get("delete"),Ma=C("",ya.funct,null,mxResources.get("delete"),ya,Editor.trashImage);Ma.style.opacity="0.3";W.appendChild(Ma);ya.addListener("stateChanged",function(){Ma.style.opacity=ya.enabled?"":"0.3"});var xa=function(){ma.style.display=0<G.editor.undoManager.history.length||S.isEditing()?"inline-block":"none";Ga.style.display=ma.style.display;ma.style.opacity=fa.enabled?"":"0.3";Ga.style.opacity=ra.enabled?"":"0.3"};W.appendChild(ma);
-W.appendChild(Ga);fa.addListener("stateChanged",xa);ra.addListener("stateChanged",xa);xa();var Ca=this.createPageMenuTab(!1,!0);Ca.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";Q.appendChild(Ca);G.editor.addListener("pagesPatched",Fa);G.editor.addListener("pageSelected",Fa);G.editor.addListener("pageRenamed",Fa);G.editor.addListener("fileLoaded",Fa);Fa();G.addListener("fileDescriptorChanged",ja);G.addListener("pagesVisibleChanged",
-ja);G.editor.addListener("pagesPatched",ja);ja();ja=C("",ea.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ea,Editor.zoomOutImage);Q.appendChild(ja);var oa=F.addMenu("100%",N.funct);oa.setAttribute("title",mxResources.get("zoom"));oa.innerHTML="100%";oa.style.display="inline-block";oa.style.color="inherit";oa.style.cursor="pointer";oa.style.textAlign="center";oa.style.whiteSpace="nowrap";oa.style.paddingRight="10px";oa.style.textDecoration="none";oa.style.verticalAlign=
-"top";oa.style.padding="6px 0";oa.style.fontSize="14px";oa.style.width="40px";Q.appendChild(oa);N=C("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ba,Editor.zoomInImage);Q.appendChild(N);"1"==urlParams.embedInline?(Q.appendChild(D),N=G.actions.get("exit"),Q.appendChild(C("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):D.parentNode.removeChild(D);G.tabContainer.style.visibility="hidden";u.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-W.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Q.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";H.appendChild(W);H.appendChild(Q);V.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(V.style.touchAction="none");H.appendChild(V);window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(H)}else{var Aa=C("",aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ja,Editor.zoomFitImage);u.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";oa=F.addMenu("100%",
-N.funct);oa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");oa.style.whiteSpace="nowrap";oa.style.paddingRight="10px";oa.style.textDecoration="none";oa.style.textDecoration="none";oa.style.overflow="hidden";oa.style.visibility="hidden";oa.style.textAlign="center";oa.style.cursor="pointer";oa.style.height=parseInt(G.tabContainerHeight)-1+"px";oa.style.lineHeight=parseInt(G.tabContainerHeight)+1+"px";oa.style.position="absolute";oa.style.display="block";oa.style.fontSize="12px";oa.style.width=
-"59px";oa.style.right="0px";oa.style.bottom="0px";oa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";oa.style.backgroundPosition="right 6px center";oa.style.backgroundRepeat="no-repeat";H.appendChild(oa)}(function(da){mxEvent.addListener(da,"click",aa);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*G.editor.graph.view.scale)+"%")});G.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);G.editor.addListener("resetGraphView",ca);G.editor.addListener("pageSelected",
-ca)})(oa);var La=G.setGraphEnabled;G.setGraphEnabled=function(){La.apply(this,arguments);null!=this.tabContainer&&(oa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Q?this.tabContainerHeight+"px":"0px")}}H.appendChild(u);H.appendChild(G.diagramContainer);M.appendChild(H);G.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==Q&&H.appendChild(G.tabContainer);
-var ta=null;I();mxEvent.addListener(window,"resize",function(){I();null!=G.sidebarWindow&&G.sidebarWindow.window.fit();null!=G.formatWindow&&G.formatWindow.window.fit();null!=G.actions.outlineWindow&&G.actions.outlineWindow.window.fit();null!=G.actions.layersWindow&&G.actions.layersWindow.window.fit();null!=G.menus.tagsWindow&&G.menus.tagsWindow.window.fit();null!=G.menus.findWindow&&G.menus.findWindow.window.fit();null!=G.menus.findReplaceWindow&&G.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";V.style.transform="";mxEvent.addGestureListeners(G.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==G.diagramContainer.parentNode&&(G.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),G.sendEmbeddedSvgExport())});M=document.createElement("div");M.style.position="absolute";M.style.width="10px";M.style.height="10px";M.style.borderRadius="5px";M.style.border="1px solid gray";M.style.background="#ffffff";M.style.cursor=
-"row-resize";G.diagramContainer.parentNode.appendChild(M);G.bottomResizer=M;var Da=null,wa=null,Ja=null,ka=null;mxEvent.addGestureListeners(M,function(da){ka=parseInt(G.diagramContainer.style.height);wa=mxEvent.getClientY(da);S.popupMenuHandler.hideMenu();mxEvent.consume(da)});M=M.cloneNode(!1);M.style.cursor="col-resize";G.diagramContainer.parentNode.appendChild(M);G.rightResizer=M;mxEvent.addGestureListeners(M,function(da){Ja=parseInt(G.diagramContainer.style.width);Da=mxEvent.getClientX(da);S.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Da&&(G.diagramContainer.style.width=Math.max(20,Ja+mxEvent.getClientX(da)-Da)+"px",ca=!0);null!=wa&&(G.diagramContainer.style.height=Math.max(20,ka+mxEvent.getClientY(da)-wa)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:G.diagramContainer.getBoundingClientRect()}),"*"),t(),G.refresh())},function(da){null==Da&&null==
-wa||mxEvent.consume(da);wa=Da=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";G.bottomResizer.style.visibility="hidden";G.rightResizer.style.visibility="hidden";W.style.visibility="hidden";Q.style.visibility="hidden";V.style.display="none"}"1"==urlParams.prefetchFonts&&G.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,v){var x=l.y,E=l.x,d=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,q=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+E;n.y=c.y+x;n.width=c.width;n.height=c.height;for(var y=[],A=[],C=0;C<this.states.length;C++){var B=this.states[C];B instanceof mxCellState&&(v||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y>
-B.y+B.height+4||n.y+n.height+4<B.y)?y.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&A.push(B))}var I=0,M=0,G=B=0,S=0,u=0,z=0,F=0,J=5*q;if(1<y.length){y.push(n);y.sort(function(U,Q){return U.y-Q.y});var K=!1;C=n==y[0];q=n==y[y.length-1];if(!C&&!q)for(C=1;C<y.length-1;C++)if(n==y[C]){q=y[C-1];C=y[C+1];B=M=G=(C.y-q.y-q.height-n.height)/2;break}for(C=0;C<y.length-1;C++){q=y[C];var H=y[C+1],N=n==q||n==H;H=H.y-q.y-q.height;K|=n==q;if(0==M&&0==
-I)M=H,I=1;else if(Math.abs(M-H)<=(N||1==C&&K?p:0))I+=1;else if(1<I&&K){y=y.slice(0,C+1);break}else if(3<=y.length-C&&!K)I=0,B=M=0!=G?G:0,y.splice(0,0==C?1:C),C=-1;else break;0!=B||N||(M=B=H)}3==y.length&&y[1]==n&&(B=0)}if(1<A.length){A.push(n);A.sort(function(U,Q){return U.x-Q.x});K=!1;C=n==A[0];q=n==A[A.length-1];if(!C&&!q)for(C=1;C<A.length-1;C++)if(n==A[C]){q=A[C-1];C=A[C+1];z=u=F=(C.x-q.x-q.width-n.width)/2;break}for(C=0;C<A.length-1;C++){q=A[C];H=A[C+1];N=n==q||n==H;H=H.x-q.x-q.width;K|=n==q;
-if(0==u&&0==S)u=H,S=1;else if(Math.abs(u-H)<=(N||1==C&&K?p:0))S+=1;else if(1<S&&K){A=A.slice(0,C+1);break}else if(3<=A.length-C&&!K)S=0,z=u=0!=F?F:0,A.splice(0,0==C?1:C),C=-1;else break;0!=z||N||(u=z=H)}3==A.length&&A[1]==n&&(z=0)}p=function(U,Q,V,W){var t=[];if(W){W=J;var D=0}else W=0,D=J;t.push(new mxPoint(U.x-W,U.y-D));t.push(new mxPoint(U.x+W,U.y+D));t.push(U);t.push(Q);t.push(new mxPoint(Q.x-W,Q.y-D));t.push(new mxPoint(Q.x+W,Q.y+D));if(null!=V)return V.points=t,V;U=new mxPolyline(t,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};u=function(U,Q){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(Q&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<S&&S==A.length-1){S=[];F=k.guidesArrHor;d=[];E=0;C=A[0]==n?1:0;K=A[C].y+A[C].height;if(0<z)for(C=0;C<A.length-1;C++)q=
-A[C],H=A[C+1],n==q?(E=H.x-q.width-z,d.push(new mxPoint(E+q.width+J,K)),d.push(new mxPoint(H.x-J,K))):n==H?(d.push(new mxPoint(q.x+q.width+J,K)),E=q.x+q.width+z,d.push(new mxPoint(E-J,K))):(d.push(new mxPoint(q.x+q.width+J,K)),d.push(new mxPoint(H.x-J,K)));else q=A[0],C=A[2],E=q.x+q.width+(C.x-q.x-q.width-n.width)/2,d.push(new mxPoint(q.x+q.width+J,K)),d.push(new mxPoint(E-J,K)),d.push(new mxPoint(E+n.width+J,K)),d.push(new mxPoint(C.x-J,K));for(C=0;C<d.length;C+=2)A=d[C],z=d[C+1],A=p(A,z,null!=F?
-F[C/2]:null),A.node.style.visibility="visible",A.redraw(),S.push(A);for(C=d.length/2;null!=F&&C<F.length;C++)F[C].destroy();k.guidesArrHor=S;E-=c.x;d=!0}else u(!0);if(1<I&&I==y.length-1){S=[];F=k.guidesArrVer;g=[];x=0;C=y[0]==n?1:0;I=y[C].x+y[C].width;if(0<B)for(C=0;C<y.length-1;C++)q=y[C],H=y[C+1],n==q?(x=H.y-q.height-B,g.push(new mxPoint(I,x+q.height+J)),g.push(new mxPoint(I,H.y-J))):n==H?(g.push(new mxPoint(I,q.y+q.height+J)),x=q.y+q.height+B,g.push(new mxPoint(I,x-J))):(g.push(new mxPoint(I,q.y+
-q.height+J)),g.push(new mxPoint(I,H.y-J)));else q=y[0],C=y[2],x=q.y+q.height+(C.y-q.y-q.height-n.height)/2,g.push(new mxPoint(I,q.y+q.height+J)),g.push(new mxPoint(I,x-J)),g.push(new mxPoint(I,x+n.height+J)),g.push(new mxPoint(I,C.y-J));for(C=0;C<g.length;C+=2)A=g[C],z=g[C+1],A=p(A,z,null!=F?F[C/2]:null,!0),A.node.style.visibility="visible",A.redraw(),S.push(A);for(C=g.length/2;null!=F&&C<F.length;C++)F[C].destroy();k.guidesArrVer=S;x-=c.y;g=!0}else u(!1,!0)}if(d||g)return n=new mxPoint(E,x),y=b.call(this,
-c,n,m,v),d&&!g?n.y=y.y:g&&!d&&(n.x=y.x),y.y!=n.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),y.x!=n.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),n;u(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var v=0;v<l.length;v++)l[v].node.style.visibility=c?"visible":"hidden";if(null!=
-m)for(v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var I=b.diagramContainer;k.style.top=I.offsetTop-E+"px";k.style.left=I.offsetLeft-E+"px";k.style.width=(f?0:I.offsetWidth)+E+"px";k.style.height=(f?I.offsetHeight:0)+E+"px"}function m(I,M,G){if(null!=v)return I;var S;return function(){var u=this,z=arguments,F=G&&!S;clearTimeout(S);S=setTimeout(function(){S=null;G||I.apply(u,z)},M);F&&I.apply(u,z)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-x=window.cancelAnimationFrame||window.mozCancelAnimationFrame,E=this.RULER_THICKNESS,d=this;this.unit=e;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()?
-{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};k.style.background=g.bkgClr;k.style[f?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;k.style.borderLeft="0.5px solid "+g.strokeClr});this.updateStyle();document.body.appendChild(k);mxEvent.disableContextMenu(k);this.editorUiRefresh=b.refresh;b.refresh=
-function(I){d.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var q=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var y=function(I,M,G,S,u){I=Math.round(I);M=Math.round(M);G=Math.round(G);S=Math.round(S);q.beginPath();q.moveTo(I+.5,M+.5);q.lineTo(G+.5,S+.5);q.stroke();u&&(f?(q.save(),q.translate(I,M),
-q.rotate(-Math.PI/2),q.fillText(u,0,0),q.restore()):q.fillText(u,I,M))},A=function(){q.clearRect(0,0,n.width,n.height);q.beginPath();q.lineWidth=.7;q.strokeStyle=g.strokeClr;q.setLineDash([]);q.font="9px Arial";q.textAlign="center";var I=p.view.scale,M=p.view.getBackgroundPageBounds(),G=p.view.translate,S=p.pageVisible;G=S?E+(f?M.y-p.container.scrollTop:M.x-p.container.scrollLeft):E+(f?G.y*I-p.container.scrollTop:G.x*I-p.container.scrollLeft);var u=0;S&&(u=p.getPageLayout(),u=f?u.y*p.pageFormat.height:
-u.x*p.pageFormat.width);var z;switch(d.unit){case mxConstants.POINTS:var F=z=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:z=10;F=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:z=20;F=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:z=.5>=I||4<=I?8:16,F=mxConstants.PIXELS_PER_INCH/z,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=F;2<=I?K=F/(2*Math.floor(I/2)):.5>=I&&(K=F*Math.floor(1/I/2)*(d.unit==
-mxConstants.MILLIMETERS?2:1));F=null;M=S?Math.min(G+(f?M.height:M.width),f?n.height:n.width):f?n.height:n.width;if(S)if(q.fillStyle=g.outBkgClr,f){var H=G-E;0<H&&q.fillRect(0,E,E,H);M<n.height&&q.fillRect(0,M,E,n.height)}else H=G-E,0<H&&q.fillRect(E,0,H,E),M<n.width&&q.fillRect(M,0,n.width,E);q.fillStyle=g.fontClr;for(S=S?G:G%(K*I);S<=M;S+=K*I)if(H=Math.round((S-G)/I/K),!(S<E||H==F)){F=H;var N=null;0==H%z&&(N=d.formatText(u+H*K)+"");f?y(E-J[Math.abs(H)%z],S,E,S,N):y(S,E-J[Math.abs(H)%z],S,E,N)}q.lineWidth=
-1;y(f?0:E,f?E:0,E,E);q.fillStyle=g.cornerClr;q.fillRect(0,0,E,E)},C=-1,B=function(){null!=v?(null!=x&&x(C),C=v(A)):A()};this.drawRuler=B;this.sizeListener=e=m(function(){var I=p.container;f?(I=I.offsetHeight+E,n.height!=I&&(n.height=I,k.style.height=I+"px",B())):(I=I.offsetWidth+E,n.width!=I&&(n.width=I,k.style.width=I+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var I=f?p.container.scrollTop:p.container.scrollLeft;d.lastScroll!=I&&(d.lastScroll=I,B())},10);
-this.unitListener=function(I,M){d.setUnit(M.getProperty("unit"))};p.addListener(mxEvent.SIZE,e);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){g=I;k.style.background=g.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,M,G,S){if(f&&4<I.height||
-!f&&4<I.width){if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3)}catch(W){}var u=d.origGuideMove.apply(this,arguments);try{q.lineWidth=.5;q.strokeStyle=g.guideClr;q.setLineDash([2]);if(f){var z=I.y+u.y+E-this.graph.container.scrollTop;var F=0;var J=z+I.height/2;var K=E/2;var H=z+I.height;var N=0;var U=q.getImageData(F,z-1,E,
-3);y(F,z,E,z);z--;var Q=q.getImageData(K,J-1,E,3);y(K,J,E,J);J--;var V=q.getImageData(N,H-1,E,3);y(N,H,E,H);H--}else z=0,F=I.x+u.x+E-this.graph.container.scrollLeft,J=E/2,K=F+I.width/2,H=0,N=F+I.width,U=q.getImageData(F-1,z,3,E),y(F,z,F,E),F--,Q=q.getImageData(K-1,J,3,E),y(K,J,K,E),K--,V=q.getImageData(N-1,H,3,E),y(N,H,N,E),N--;if(null==d.guidePart||d.guidePart.x1!=F||d.guidePart.y1!=z)d.guidePart={imgData1:U,x1:F,y1:z,imgData2:Q,x2:K,y2:J,imgData3:V,x3:N,y3:H}}catch(W){}}else u=d.origGuideMove.apply(this,
-arguments);return u};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(M){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");k.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(t,x){null!=x.shortcut&&900>c&&!mxClient.IS_IOS?t.firstChild.nextSibling.setAttribute("title",x.shortcut):u.apply(this,arguments)};var z=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){z.apply(this,arguments);if(null!=this.userElement){var t=this.userElement;t.style.cssText="position:relative;cursor:pointer;display:"+t.style.display;t.className="geToolbarButton";
+t.innerText="";t.style.backgroundImage="url("+Editor.userImage+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="24px 24px";t.style.height="24px";t.style.width="24px";var x=mxResources.get("changeUser");if("none"!=t.style.display){t.style.display="inline-block";var E=this.getCurrentFile();if(null!=E&&E.isRealtimeEnabled()&&E.isRealtimeSupported()){var F=document.createElement("img");F.setAttribute("border","0");F.style.position="absolute";
+F.style.left="18px";F.style.top="2px";F.style.width="12px";F.style.height="12px";var G=E.getRealtimeError();E=E.getRealtimeState();x+=" ("+mxResources.get("realtimeCollaboration")+": ";1==E?(F.src=Editor.syncImage,x+=mxResources.get("online")):(F.src=Editor.syncProblemImage,x=null!=G&&null!=G.message?x+G.message:x+mxResources.get("disconnected"));t.style.marginRight="6px";t.appendChild(F);x+=")"}}t.setAttribute("title",x)}};var C=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){C.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var t=document.createElement("div");t.style.display="inline-block";t.style.position="relative";t.style.marginTop="6px";t.style.marginRight="4px";var x=document.createElement("a");x.className="geMenuItem gePrimaryBtn";x.style.marginLeft="8px";x.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var E="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(x,E);x.setAttribute("title",E);mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));t.appendChild(x)}}else mxUtils.write(x,mxResources.get("save")),x.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),t.appendChild(x),
+"1"==urlParams.saveAndExit&&(x=document.createElement("a"),mxUtils.write(x,mxResources.get("saveAndExit")),x.setAttribute("title",mxResources.get("saveAndExit")),x.className="geMenuItem",x.style.marginLeft="6px",x.style.padding="6px",mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),t.appendChild(x));"1"!=urlParams.noExitBtn&&(x=document.createElement("a"),E="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(x,
+E),x.setAttribute("title",E),x.className="geMenuItem",x.style.marginLeft="6px",x.style.padding="6px",mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),t.appendChild(x));this.buttonContainer.appendChild(t);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var A=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(t,x,E){var F=this.editorUi.editor.graph;t.smartSeparators=!0;A.apply(this,arguments);
+"1"==urlParams.sketch?F.isEnabled()&&(t.addSeparator(),1==F.getSelectionCount()&&this.addMenuItems(t,["-","lockUnlock"],null,E)):1==F.getSelectionCount()?(F.isCellFoldable(F.getSelectionCell())&&this.addMenuItems(t,F.isCellCollapsed(x)?["expand"]:["collapse"],null,E),this.addMenuItems(t,["collapsible","-","lockUnlock","enterGroup"],null,E),t.addSeparator(),this.addSubmenu("layout",t)):F.isSelectionEmpty()&&F.isEnabled()?(t.addSeparator(),this.addMenuItems(t,["editData"],null,E),t.addSeparator(),this.addSubmenu("layout",
+t),this.addSubmenu("insert",t),this.addMenuItems(t,["-","exitGroup"],null,E)):F.isEnabled()&&this.addMenuItems(t,["-","lockUnlock"],null,E)};var B=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(t,x,E){B.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(t,["copyAsImage"],null,E)};EditorUi.prototype.toggleFormatPanel=function(t){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=t?t:!this.formatWindow.window.isVisible()):
+b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();J.apply(this,arguments)};var f=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(t){f.apply(this,arguments);if(t){var x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+1E3<=x&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=x||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var g=Menus.prototype.init;Menus.prototype.init=function(){g.apply(this,arguments);var t=this.editorUi,x=t.actions.put("togglePagesVisible",
+new Action(mxResources.get("pages"),function(n){t.setPagesVisible(!Editor.pagesVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.pagesVisible});t.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){e(t)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!t.isOffline()&&t.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var n=new ParseDialog(t,mxResources.get("plantUml")+"...","plantUml");t.showDialog(n.container,
+620,420,!0,!1);n.init()}));t.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var n=new ParseDialog(t,mxResources.get("mermaid")+"...","mermaid");t.showDialog(n.container,620,420,!0,!1);n.init()}));var E=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(n,v){var H=this.editorUi.editor.graph,K=H.getSelectionCell();E.call(this,n,K,null,v);this.addMenuItems(n,["editTooltip"],v);H.model.isVertex(K)&&this.addMenuItems(n,["editGeometry"],
+v);this.addMenuItems(n,["-","edit"],v)})));this.addPopupMenuCellEditItems=function(n,v,H,K){n.addSeparator();this.addSubmenu("editCell",n,K,mxResources.get("edit"))};var F=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){F.funct(n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.menus.addMenuItems(n,["publishLink"],v);t.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(n.addSeparator(v),t.menus.addSubmenu("embed",n,v))})));var G=this.get("units");this.put("units",
+new Menu(mxUtils.bind(this,function(n,v){G.funct(n,v);this.addMenuItems(n,["-","ruler","-","pageScale"],v)})));var y="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),T=function(n,v,H,K){n.addItem(H,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(t,H,K);t.showDialog(N.container,620,420,!0,!1);N.init()}),v)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){for(var H=0;H<y.length;H++)"-"==y[H]?n.addSeparator(v):T(n,v,mxResources.get(y[H])+
+"...",y[H])})))};EditorUi.prototype.installFormatToolbar=function(t){var x=this.editor.graph,E=document.createElement("div");E.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";x.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,G){0<x.getSelectionCount()?(t.appendChild(E),E.innerHTML="Selected: "+x.getSelectionCount()):null!=
+E.parentNode&&E.parentNode.removeChild(E)}))};var l=!1;EditorUi.prototype.initFormatWindow=function(){if(!l&&null!=this.formatWindow){l=!0;var t=this.formatWindow.window.toggleMinimized,x=240;this.formatWindow.window.toggleMinimized=function(){t.apply(this,arguments);this.minimized?(x=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+x-140+"px"):(this.div.style.width=x+"px",this.table.style.width=this.div.style.width,
+this.div.style.left=Math.max(0,parseInt(this.div.style.left)-x+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function t(fa,ca,na){var la=y.menus.get(fa),sa=H.addMenu(mxResources.get(fa),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),v);sa.className="1"==
+urlParams.sketch?"geToolbarButton":"geMenuItem";sa.style.display="inline-block";sa.style.boxSizing="border-box";sa.style.top="6px";sa.style.marginRight="6px";sa.style.height="30px";sa.style.paddingTop="6px";sa.style.paddingBottom="6px";sa.style.cursor="pointer";sa.setAttribute("title",mxResources.get(fa));y.menus.menuCreated(la,sa,"geMenuItem");null!=na?(sa.style.backgroundImage="url("+na+")",sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize=
+"24px 24px",sa.style.width="34px",sa.innerText=""):ca||(sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",sa.style.backgroundPosition="right 6px center",sa.style.backgroundRepeat="no-repeat",sa.style.paddingRight="22px");return sa}function x(fa,ca,na,la,sa,ia){var ja=document.createElement("a");ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing="border-box";ja.style.height="30px";ja.style.padding="6px";ja.style.position=
+"relative";ja.style.verticalAlign="top";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.borderStyle="none",ja.style.boxShadow="none",ja.style.padding="6px",ja.style.margin="0px");null!=y.statusContainer?n.insertBefore(ja,y.statusContainer):n.appendChild(ja);null!=ia?(ja.style.backgroundImage="url("+ia+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px"):mxUtils.write(ja,fa);mxEvent.addListener(ja,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(pa){pa.preventDefault()}));mxEvent.addListener(ja,"click",function(pa){"disabled"!=ja.getAttribute("disabled")&&ca(pa);mxEvent.consume(pa)});null==na&&(ja.style.marginRight="4px");null!=la&&ja.setAttribute("title",la);null!=sa&&(fa=function(){sa.isEnabled()?(ja.removeAttribute("disabled"),ja.style.cursor="pointer"):(ja.setAttribute("disabled","disabled"),ja.style.cursor="default")},sa.addListener("stateChanged",fa),T.addListener("enabledChanged",
+fa),fa());return ja}function E(fa,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<fa.length;la++)null!=fa[la]&&("1"==urlParams.sketch&&(fa[la].style.padding="10px 8px",fa[la].style.width="30px"),fa[la].style.margin="0px",fa[la].style.boxShadow=
+"none",na.appendChild(fa[la]));null!=ca&&mxUtils.setOpacity(na,ca);null!=y.statusContainer&&"1"!=urlParams.sketch?n.insertBefore(na,y.statusContainer):n.appendChild(na);return na}function F(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>U.offsetTop-U.offsetHeight/2?"70px":"10px");else{for(var fa=n.firstChild;null!=fa;){var ca=fa.nextSibling;"geMenuItem"!=fa.className&&"geItem"!=fa.className||fa.parentNode.removeChild(fa);fa=ca}v=n.firstChild;c=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;fa=1E3>c||"1"==urlParams.sketch;var na=null;fa||(na=t("diagram"));ca=fa?t("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);E([na,x(mxResources.get("shapes"),y.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),y.actions.get("image"),fa?Editor.shapesImage:null),x(mxResources.get("format"),y.actions.get("format").funct,null,mxResources.get("format")+" ("+y.actions.get("format").shortcut+")",y.actions.get("image"),fa?Editor.formatImage:null)],fa?60:null);
+ca=t("insert",!0,fa?Q:null);E([ca,x(mxResources.get("delete"),y.actions.get("delete").funct,null,mxResources.get("delete"),y.actions.get("delete"),fa?Editor.trashImage:null)],fa?60:null);411<=c&&(E([ya,xa],60),520<=c&&E([qa,640<=c?x("",da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",da,Editor.zoomInImage):null,640<=c?x("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
+mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&y.appIconClicked(la)}),null,null));ca=y.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==ra&&(ca=H.addMenu("",ca.funct),ca.setAttribute("title","language"),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition=
+"center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="22px 22px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="12px",n.appendChild(ca),ra=ca),y.buttonContainer.style.paddingRight="34px"):(y.buttonContainer.style.paddingRight="4px",null!=ra&&(ra.parentNode.removeChild(ra),ra=null))}q.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);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var y=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==y.embedViewport)mxUtils.fit(this.div);else{var fa=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=y.embedViewport.x+y.embedViewport.width,la=parseInt(this.div.offsetTop),sa=parseInt(this.div.offsetHeight),ia=y.embedViewport.y+
+y.embedViewport.height;this.div.style.left=Math.max(y.embedViewport.x,Math.min(fa,na-ca))+"px";this.div.style.top=Math.max(y.embedViewport.y,Math.min(la,ia-sa))+"px";this.div.style.height=Math.min(y.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(y.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),G=window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>G)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));y=this;var T=y.editor.graph;y.toolbar=this.createToolbar(y.createDiv("geToolbar"));y.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.className="geMenubarContainer";var v=null,H=new Menubar(y,n);y.statusContainer=y.createStatusContainer();
+y.statusContainer.style.position="relative";y.statusContainer.style.maxWidth="";y.statusContainer.style.marginTop="7px";y.statusContainer.style.marginLeft="6px";y.statusContainer.style.color="gray";y.statusContainer.style.cursor="default";var K=y.hideCurrentMenu;y.hideCurrentMenu=function(){K.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var N=y.descriptorChanged;y.descriptorChanged=function(){N.apply(this,arguments);var fa=y.getCurrentFile();if(null!=fa&&null!=fa.getTitle()){var ca=
+fa.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);n.setAttribute("title",fa.getTitle()+(null!=ca?" ("+ca+")":""))}else n.removeAttribute("title")};y.setStatusText(y.editor.getStatus());n.appendChild(y.statusContainer);y.buttonContainer=document.createElement("div");y.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+n.appendChild(y.buttonContainer);y.menubarContainer=y.buttonContainer;y.tabContainer=document.createElement("div");y.tabContainer.className="geTabContainer";y.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";G=y.diagramContainer.parentNode;var I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";y.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){I.style.top="20px";y.titlebar=document.createElement("div");y.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var M=document.createElement("div");M.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";y.titlebar.appendChild(M);G.appendChild(y.titlebar)}var Q=
+"1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,P="1"==urlParams.sketch?document.createElement("div"):null,U="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,p=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left="10px",W.style.top="10px",U.style.left="10px",U.style.top="60px",P.style.top="10px",P.style.right="12px",P.style.left="",y.diagramContainer.setAttribute("data-bounds",y.diagramContainer.style.top+
+" "+y.diagramContainer.style.left+" "+y.diagramContainer.style.width+" "+y.diagramContainer.style.height),y.diagramContainer.style.top="0px",y.diagramContainer.style.left="0px",y.diagramContainer.style.bottom="0px",y.diagramContainer.style.right="0px",y.diagramContainer.style.width="",y.diagramContainer.style.height="";else{var fa=y.diagramContainer.getAttribute("data-bounds");if(null!=fa){y.diagramContainer.style.background="transparent";y.diagramContainer.removeAttribute("data-bounds");var ca=T.getGraphBounds();
+fa=fa.split(" ");y.diagramContainer.style.top=fa[0];y.diagramContainer.style.left=fa[1];y.diagramContainer.style.width=ca.width+50+"px";y.diagramContainer.style.height=ca.height+46+"px";y.diagramContainer.style.bottom="";y.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:y.diagramContainer.getBoundingClientRect()}),"*");y.refresh()}W.style.left=y.diagramContainer.offsetLeft+"px";W.style.top=y.diagramContainer.offsetTop-W.offsetHeight-4+
+"px";U.style.display="";U.style.left=y.diagramContainer.offsetLeft-U.offsetWidth-4+"px";U.style.top=y.diagramContainer.offsetTop+"px";P.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-P.offsetWidth+"px";P.style.top=W.style.top;P.style.right="";y.bottomResizer.style.left=y.diagramContainer.offsetLeft+(y.diagramContainer.offsetWidth-y.bottomResizer.offsetWidth)/2+"px";y.bottomResizer.style.top=y.diagramContainer.offsetTop+y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight/
+2-1+"px";y.rightResizer.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-y.rightResizer.offsetWidth/2-1+"px";y.rightResizer.style.top=y.diagramContainer.offsetTop+(y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight)/2+"px"}y.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";y.rightResizer.style.visibility=y.bottomResizer.style.visibility;n.style.display="none";W.style.visibility="";P.style.visibility=""});M=y.actions.get("fullscreen");var D=x("",M.funct,
+null,mxResources.get(""),M,Editor.fullscreenImage),L=mxUtils.bind(this,function(){D.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";p()});M=mxUtils.bind(this,function(){b(y,!0);y.initFormatWindow();var fa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(fa.x+fa.width+4,fa.y);L()});
+y.addListener("inlineFullscreenChanged",L);y.addListener("editInlineStart",M);"1"==urlParams.embedInline&&y.addListener("darkModeChanged",M);y.addListener("editInlineStop",mxUtils.bind(this,function(fa){y.diagramContainer.style.width="10px";y.diagramContainer.style.height="10px";y.diagramContainer.style.border="";y.bottomResizer.style.visibility="hidden";y.rightResizer.style.visibility="hidden";W.style.visibility="hidden";P.style.visibility="hidden";U.style.display="none"}));if(null!=y.hoverIcons){var V=
+y.hoverIcons.update;y.hoverIcons.update=function(){T.freehand.isDrawing()||V.apply(this,arguments)}}if(null!=T.freehand){var O=T.freehand.createStyle;T.freehand.createStyle=function(fa){return O.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){U.className="geToolbarContainer";P.className="geToolbarContainer";W.className="geToolbarContainer";n.className="geToolbarContainer";y.picker=U;y.sketchPickerMenuElt=U;var R=!1;"1"!=urlParams.embed&&"atlassian"!=y.getServiceName()&&(mxEvent.addListener(n,
+"mouseenter",function(){y.statusContainer.style.display="inline-block"}),mxEvent.addListener(n,"mouseleave",function(){R||(y.statusContainer.style.display="none")}));var S=mxUtils.bind(this,function(fa){null!=y.notificationBtn&&(null!=fa?y.notificationBtn.setAttribute("title",fa):y.notificationBtn.removeAttribute("title"))});n.style.visibility=20>n.clientWidth?"hidden":"";y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus());if("1"!=urlParams.embed&&
+"atlassian"!=y.getServiceName())if(y.statusContainer.style.display="inline-block",R=!0,1==y.statusContainer.children.length&&""==y.editor.getStatus())n.style.visibility="hidden";else{if(0==y.statusContainer.children.length||1==y.statusContainer.children.length&&"function"===typeof y.statusContainer.firstChild.getAttribute&&null==y.statusContainer.firstChild.getAttribute("class")){var fa=null!=y.statusContainer.firstChild&&"function"===typeof y.statusContainer.firstChild.getAttribute?y.statusContainer.firstChild.getAttribute("title"):
+y.editor.getStatus();S(fa);var ca=y.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;fa==mxResources.get(ca)+"..."?(y.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',y.statusContainer.style.display="inline-block",R=!0):6<y.buttonContainer.clientWidth&&(y.statusContainer.style.display="none",R=!1)}else y.statusContainer.style.display="inline-block",S(null),R=!0;n.style.visibility=20>n.clientWidth&&
+!R?"hidden":""}}));oa=t("diagram",null,Editor.menuImage);oa.style.boxShadow="none";oa.style.padding="6px";oa.style.margin="0px";W.appendChild(oa);mxEvent.disableContextMenu(oa);mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(fa){(mxEvent.isShiftDown(fa)||mxEvent.isAltDown(fa)||mxEvent.isMetaDown(fa)||mxEvent.isControlDown(fa)||mxEvent.isPopupTrigger(fa))&&this.appIconClicked(fa)}),null,null);y.statusContainer.style.position="";y.statusContainer.style.display="none";y.statusContainer.style.margin=
+"0px";y.statusContainer.style.padding="6px 0px";y.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";y.statusContainer.style.display="inline-block";y.statusContainer.style.textOverflow="ellipsis";y.buttonContainer.style.display="inline-block";y.buttonContainer.style.position="relative";y.buttonContainer.style.paddingRight="0px";y.buttonContainer.style.top="0px";var X=document.createElement("a");X.style.padding="0px";X.style.boxShadow="none";X.className="geMenuItem";X.style.display="inline-block";
+X.style.width="40px";X.style.height="12px";X.style.marginBottom="-2px";X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";X.style.backgroundPosition="top center";X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var Y=!1,aa=mxUtils.bind(this,function(){U.innerText="";if(!Y){var fa=function(ca,na,la,sa){null!=na&&ca.setAttribute("title",na);ca.style.cursor=null!=la?la:"default";ca.style.margin="2px 0px";U.appendChild(ca);mxUtils.br(U);null!=sa&&(ca.style.position=
+"relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,sa),ca.appendChild(na));return ca};fa(y.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");fa(y.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");fa(y.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");fa(y.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,T.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;fa(y.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ca.geometry.width=T.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,20),!1);fa(y.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,la,sa){ca=x("",ca.funct,null,na,ca,la);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return fa(ca,null,"pointer",sa)})(y.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");oa=t("insert",null,Editor.plusImage);oa.style.boxShadow="none";oa.style.opacity="0.7";oa.style.padding="6px";oa.style.margin="0px";oa.style.height="34px";oa.style.width="37px";fa(oa,null,"pointer")}"1"!=urlParams.embedInline&&U.appendChild(X)});mxEvent.addListener(X,"click",mxUtils.bind(this,function(){Y?(mxUtils.setPrefixedStyle(U.style,"transform","translate(0, -50%)"),U.style.padding="8px 6px 4px",U.style.top="50%",U.style.bottom="",U.style.height="",X.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),Y=!1,aa()):(U.innerText="",U.appendChild(X),mxUtils.setPrefixedStyle(U.style,"transform","translate(0, 0)"),U.style.top="",U.style.bottom="12px",U.style.padding="0px",U.style.height="24px",X.style.height="24px",X.style.backgroundImage="url("+Editor.plusImage+")",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",Y=!0)}));aa();y.addListener("darkModeChanged",
+aa);y.addListener("sketchModeChanged",aa)}else y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus())}));M=y.menus.get("viewZoom");if(null!=M){var ba=function(fa){if(mxEvent.isAltDown(fa))y.hideCurrentMenu(),y.actions.get("customZoom").funct(),mxEvent.consume(fa);else if("geItem"!=mxEvent.getSource(fa).className||mxEvent.isShiftDown(fa))y.hideCurrentMenu(),y.actions.get("smartFit").funct(),mxEvent.consume(fa)},da=y.actions.get("zoomIn"),Z=y.actions.get("zoomOut"),
+ha=y.actions.get("resetView"),ea=y.actions.get("undo"),ua=y.actions.get("redo"),ya=x("",ea.funct,null,mxResources.get("undo")+" ("+ea.shortcut+")",ea,Editor.undoImage),xa=x("",ua.funct,null,mxResources.get("redo")+" ("+ua.shortcut+")",ua,Editor.redoImage);if(null!=P){ha=function(){Ca.style.display=null!=y.pages&&("0"!=urlParams.pages||1<y.pages.length||Editor.pagesVisible)?"inline-block":"none"};var va=function(){Ca.innerText="";if(null!=y.currentPage){mxUtils.write(Ca,y.currentPage.getName());var fa=
+null!=y.pages?y.pages.length:1,ca=y.getPageIndex(y.currentPage);ca=null!=ca?ca+1:1;var na=y.currentPage.getId();Ca.setAttribute("title",y.currentPage.getName()+" ("+ca+"/"+fa+")"+(null!=na?" ["+na+"]":""))}},ka=y.actions.get("delete"),Na=x("",ka.funct,null,mxResources.get("delete"),ka,Editor.trashImage);Na.style.opacity="0.3";W.appendChild(Na);ka.addListener("stateChanged",function(){Na.style.opacity=ka.enabled?"":"0.3"});var Ia=function(){ya.style.display=0<y.editor.undoManager.history.length||T.isEditing()?
+"inline-block":"none";xa.style.display=ya.style.display;ya.style.opacity=ea.enabled?"":"0.3";xa.style.opacity=ua.enabled?"":"0.3"};W.appendChild(ya);W.appendChild(xa);ea.addListener("stateChanged",Ia);ua.addListener("stateChanged",Ia);Ia();var Ca=this.createPageMenuTab(!1,!0);Ca.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";P.appendChild(Ca);y.editor.addListener("pagesPatched",va);y.editor.addListener("pageSelected",
+va);y.editor.addListener("pageRenamed",va);y.editor.addListener("fileLoaded",va);va();y.addListener("fileDescriptorChanged",ha);y.addListener("pagesVisibleChanged",ha);y.editor.addListener("pagesPatched",ha);ha();ha=x("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Z,Editor.zoomOutImage);P.appendChild(ha);var oa=H.addMenu("100%",M.funct);oa.setAttribute("title",mxResources.get("zoom"));oa.innerHTML="100%";oa.style.display="inline-block";oa.style.color="inherit";oa.style.cursor=
+"pointer";oa.style.textAlign="center";oa.style.whiteSpace="nowrap";oa.style.paddingRight="10px";oa.style.textDecoration="none";oa.style.verticalAlign="top";oa.style.padding="6px 0";oa.style.fontSize="14px";oa.style.width="40px";P.appendChild(oa);M=x("",da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",da,Editor.zoomInImage);P.appendChild(M);"1"==urlParams.embedInline?(P.appendChild(D),M=y.actions.get("exit"),P.appendChild(x("",M.funct,null,mxResources.get("exit"),M,Editor.closeImage))):
+D.parentNode.removeChild(D);y.tabContainer.style.visibility="hidden";n.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+P.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";I.appendChild(W);I.appendChild(P);U.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(U.style.touchAction="none");I.appendChild(U);window.setTimeout(function(){mxUtils.setPrefixedStyle(U.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(I)}else{var qa=x("",ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ha,Editor.zoomFitImage);n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";oa=H.addMenu("100%",M.funct);oa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");oa.style.whiteSpace="nowrap";oa.style.paddingRight=
+"10px";oa.style.textDecoration="none";oa.style.textDecoration="none";oa.style.overflow="hidden";oa.style.visibility="hidden";oa.style.textAlign="center";oa.style.cursor="pointer";oa.style.height=parseInt(y.tabContainerHeight)-1+"px";oa.style.lineHeight=parseInt(y.tabContainerHeight)+1+"px";oa.style.position="absolute";oa.style.display="block";oa.style.fontSize="12px";oa.style.width="59px";oa.style.right="0px";oa.style.bottom="0px";oa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+oa.style.backgroundPosition="right 6px center";oa.style.backgroundRepeat="no-repeat";I.appendChild(oa)}(function(fa){mxEvent.addListener(fa,"click",ba);var ca=mxUtils.bind(this,function(){fa.innerText="";mxUtils.write(fa,Math.round(100*y.editor.graph.view.scale)+"%")});y.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);y.editor.addListener("resetGraphView",ca);y.editor.addListener("pageSelected",ca)})(oa);var Ja=y.setGraphEnabled;y.setGraphEnabled=function(){Ja.apply(this,arguments);null!=this.tabContainer&&
+(oa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==P?this.tabContainerHeight+"px":"0px")}}I.appendChild(n);I.appendChild(y.diagramContainer);G.appendChild(I);y.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==P&&I.appendChild(y.tabContainer);var ra=null;F();mxEvent.addListener(window,"resize",function(){F();null!=y.sidebarWindow&&y.sidebarWindow.window.fit();
+null!=y.formatWindow&&y.formatWindow.window.fit();null!=y.actions.outlineWindow&&y.actions.outlineWindow.window.fit();null!=y.actions.layersWindow&&y.actions.layersWindow.window.fit();null!=y.menus.tagsWindow&&y.menus.tagsWindow.window.fit();null!=y.menus.findWindow&&y.menus.findWindow.window.fit();null!=y.menus.findReplaceWindow&&y.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";U.style.transform="";mxEvent.addGestureListeners(y.diagramContainer.parentNode,
+function(fa){mxEvent.getSource(fa)==y.diagramContainer.parentNode&&(y.embedExitPoint=new mxPoint(mxEvent.getClientX(fa),mxEvent.getClientY(fa)),y.sendEmbeddedSvgExport())});G=document.createElement("div");G.style.position="absolute";G.style.width="10px";G.style.height="10px";G.style.borderRadius="5px";G.style.border="1px solid gray";G.style.background="#ffffff";G.style.cursor="row-resize";y.diagramContainer.parentNode.appendChild(G);y.bottomResizer=G;var Ba=null,Aa=null,Ka=null,ma=null;mxEvent.addGestureListeners(G,
+function(fa){ma=parseInt(y.diagramContainer.style.height);Aa=mxEvent.getClientY(fa);T.popupMenuHandler.hideMenu();mxEvent.consume(fa)});G=G.cloneNode(!1);G.style.cursor="col-resize";y.diagramContainer.parentNode.appendChild(G);y.rightResizer=G;mxEvent.addGestureListeners(G,function(fa){Ka=parseInt(y.diagramContainer.style.width);Ba=mxEvent.getClientX(fa);T.popupMenuHandler.hideMenu();mxEvent.consume(fa)});mxEvent.addGestureListeners(document.body,null,function(fa){var ca=!1;null!=Ba&&(y.diagramContainer.style.width=
+Math.max(20,Ka+mxEvent.getClientX(fa)-Ba)+"px",ca=!0);null!=Aa&&(y.diagramContainer.style.height=Math.max(20,ma+mxEvent.getClientY(fa)-Aa)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:y.diagramContainer.getBoundingClientRect()}),"*"),p(),y.refresh())},function(fa){null==Ba&&null==Aa||mxEvent.consume(fa);Aa=Ba=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
+y.bottomResizer.style.visibility="hidden";y.rightResizer.style.visibility="hidden";W.style.visibility="hidden";P.style.visibility="hidden";U.style.display="none"}"1"==urlParams.prefetchFonts&&y.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,k,m,u){var z=k.y,C=k.x,A=!1,B=!1;if(null!=this.states&&null!=c&&null!=k){var J=this,f=new mxCellState,g=this.graph.getView().scale,l=Math.max(2,this.getGuideTolerance()/2);f.x=c.x+C;f.y=c.y+z;f.width=c.width;f.height=c.height;for(var q=[],t=[],x=0;x<this.states.length;x++){var E=this.states[x];E instanceof mxCellState&&(u||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>
+E.y+E.height+4||f.y+f.height+4<E.y)?q.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&t.push(E))}var F=0,G=0,y=E=0,T=0,n=0,v=0,H=0,K=5*g;if(1<q.length){q.push(f);q.sort(function(Q,P){return Q.y-P.y});var N=!1;x=f==q[0];g=f==q[q.length-1];if(!x&&!g)for(x=1;x<q.length-1;x++)if(f==q[x]){g=q[x-1];x=q[x+1];E=G=y=(x.y-g.y-g.height-f.height)/2;break}for(x=0;x<q.length-1;x++){g=q[x];var I=q[x+1],M=f==g||f==I;I=I.y-g.y-g.height;N|=f==g;if(0==G&&0==
+F)G=I,F=1;else if(Math.abs(G-I)<=(M||1==x&&N?l:0))F+=1;else if(1<F&&N){q=q.slice(0,x+1);break}else if(3<=q.length-x&&!N)F=0,E=G=0!=y?y:0,q.splice(0,0==x?1:x),x=-1;else break;0!=E||M||(G=E=I)}3==q.length&&q[1]==f&&(E=0)}if(1<t.length){t.push(f);t.sort(function(Q,P){return Q.x-P.x});N=!1;x=f==t[0];g=f==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(f==t[x]){g=t[x-1];x=t[x+1];v=n=H=(x.x-g.x-g.width-f.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];I=t[x+1];M=f==g||f==I;I=I.x-g.x-g.width;N|=f==g;
+if(0==n&&0==T)n=I,T=1;else if(Math.abs(n-I)<=(M||1==x&&N?l:0))T+=1;else if(1<T&&N){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!N)T=0,v=n=0!=H?H:0,t.splice(0,0==x?1:x),x=-1;else break;0!=v||M||(n=v=I)}3==t.length&&t[1]==f&&(v=0)}l=function(Q,P,U,W){var p=[];if(W){W=K;var D=0}else W=0,D=K;p.push(new mxPoint(Q.x-W,Q.y-D));p.push(new mxPoint(Q.x+W,Q.y+D));p.push(Q);p.push(P);p.push(new mxPoint(P.x-W,P.y-D));p.push(new mxPoint(P.x+W,P.y+D));if(null!=U)return U.points=p,U;Q=new mxPolyline(p,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);Q.dialect=mxConstants.DIALECT_SVG;Q.pointerEvents=!1;Q.init(J.graph.getView().getOverlayPane());return Q};n=function(Q,P){if(Q&&null!=J.guidesArrHor)for(Q=0;Q<J.guidesArrHor.length;Q++)J.guidesArrHor[Q].node.style.visibility="hidden";if(P&&null!=J.guidesArrVer)for(Q=0;Q<J.guidesArrVer.length;Q++)J.guidesArrVer[Q].node.style.visibility="hidden"};if(1<T&&T==t.length-1){T=[];H=J.guidesArrHor;A=[];C=0;x=t[0]==f?1:0;N=t[x].y+t[x].height;if(0<v)for(x=0;x<t.length-1;x++)g=
+t[x],I=t[x+1],f==g?(C=I.x-g.width-v,A.push(new mxPoint(C+g.width+K,N)),A.push(new mxPoint(I.x-K,N))):f==I?(A.push(new mxPoint(g.x+g.width+K,N)),C=g.x+g.width+v,A.push(new mxPoint(C-K,N))):(A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(I.x-K,N)));else g=t[0],x=t[2],C=g.x+g.width+(x.x-g.x-g.width-f.width)/2,A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(C-K,N)),A.push(new mxPoint(C+f.width+K,N)),A.push(new mxPoint(x.x-K,N));for(x=0;x<A.length;x+=2)t=A[x],v=A[x+1],t=l(t,v,null!=H?
+H[x/2]:null),t.node.style.visibility="visible",t.redraw(),T.push(t);for(x=A.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrHor=T;C-=c.x;A=!0}else n(!0);if(1<F&&F==q.length-1){T=[];H=J.guidesArrVer;B=[];z=0;x=q[0]==f?1:0;F=q[x].x+q[x].width;if(0<E)for(x=0;x<q.length-1;x++)g=q[x],I=q[x+1],f==g?(z=I.y-g.height-E,B.push(new mxPoint(F,z+g.height+K)),B.push(new mxPoint(F,I.y-K))):f==I?(B.push(new mxPoint(F,g.y+g.height+K)),z=g.y+g.height+E,B.push(new mxPoint(F,z-K))):(B.push(new mxPoint(F,g.y+
+g.height+K)),B.push(new mxPoint(F,I.y-K)));else g=q[0],x=q[2],z=g.y+g.height+(x.y-g.y-g.height-f.height)/2,B.push(new mxPoint(F,g.y+g.height+K)),B.push(new mxPoint(F,z-K)),B.push(new mxPoint(F,z+f.height+K)),B.push(new mxPoint(F,x.y-K));for(x=0;x<B.length;x+=2)t=B[x],v=B[x+1],t=l(t,v,null!=H?H[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),T.push(t);for(x=B.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrVer=T;z-=c.y;B=!0}else n(!1,!0)}if(A||B)return f=new mxPoint(C,z),q=b.call(this,
+c,f,m,u),A&&!B?f.y=q.y:B&&!A&&(f.x=q.x),q.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;n(!0,!0);return b.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){d.call(this,c);var k=this.guidesArrVer,m=this.guidesArrHor;if(null!=k)for(var u=0;u<k.length;u++)k[u].node.style.visibility=c?"visible":"hidden";if(null!=
+m)for(u=0;u<m.length;u++)m[u].node.style.visibility=c?"visible":"hidden"};var e=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){e.call(this);var c=this.guidesArrVer,k=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=k){for(m=0;m<k.length;m++)k[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,d,e,c){function k(){var F=b.diagramContainer;J.style.top=F.offsetTop-C+"px";J.style.left=F.offsetLeft-C+"px";J.style.width=(e?0:F.offsetWidth)+C+"px";J.style.height=(e?F.offsetHeight:0)+C+"px"}function m(F,G,y){if(null!=u)return F;var T;return function(){var n=this,v=arguments,H=y&&!T;clearTimeout(T);T=setTimeout(function(){T=null;y||F.apply(n,v)},G);H&&F.apply(n,v)}}var u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+z=window.cancelAnimationFrame||window.mozCancelAnimationFrame,C=this.RULER_THICKNESS,A=this;this.unit=d;var B=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},J=document.createElement("div");J.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){B=Editor.isDarkMode()?
+{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};J.style.background=B.bkgClr;J.style[e?"borderRight":"borderBottom"]="0.5px solid "+B.strokeClr;J.style.borderLeft="0.5px solid "+B.strokeClr});this.updateStyle();document.body.appendChild(J);mxEvent.disableContextMenu(J);this.editorUiRefresh=b.refresh;b.refresh=
+function(F){A.editorUiRefresh.apply(b,arguments);k()};k();var f=document.createElement("canvas");f.width=J.offsetWidth;f.height=J.offsetHeight;J.style.overflow="hidden";f.style.position="relative";J.appendChild(f);var g=f.getContext("2d");this.ui=b;var l=b.editor.graph;this.graph=l;this.container=J;this.canvas=f;var q=function(F,G,y,T,n){F=Math.round(F);G=Math.round(G);y=Math.round(y);T=Math.round(T);g.beginPath();g.moveTo(F+.5,G+.5);g.lineTo(y+.5,T+.5);g.stroke();n&&(e?(g.save(),g.translate(F,G),
+g.rotate(-Math.PI/2),g.fillText(n,0,0),g.restore()):g.fillText(n,F,G))},t=function(){g.clearRect(0,0,f.width,f.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=B.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var F=l.view.scale,G=l.view.getBackgroundPageBounds(),y=l.view.translate,T=l.pageVisible;y=T?C+(e?G.y-l.container.scrollTop:G.x-l.container.scrollLeft):C+(e?y.y*F-l.container.scrollTop:y.x*F-l.container.scrollLeft);var n=0;T&&(n=l.getPageLayout(),n=e?n.y*l.pageFormat.height:
+n.x*l.pageFormat.width);var v;switch(A.unit){case mxConstants.POINTS:var H=v=10;var K=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:v=10;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:v=20;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:v=.5>=F||4<=F?8:16,H=mxConstants.PIXELS_PER_INCH/v,K=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=H;2<=F?N=H/(2*Math.floor(F/2)):.5>=F&&(N=H*Math.floor(1/F/2)*(A.unit==
+mxConstants.MILLIMETERS?2:1));H=null;G=T?Math.min(y+(e?G.height:G.width),e?f.height:f.width):e?f.height:f.width;if(T)if(g.fillStyle=B.outBkgClr,e){var I=y-C;0<I&&g.fillRect(0,C,C,I);G<f.height&&g.fillRect(0,G,C,f.height)}else I=y-C,0<I&&g.fillRect(C,0,I,C),G<f.width&&g.fillRect(G,0,f.width,C);g.fillStyle=B.fontClr;for(T=T?y:y%(N*F);T<=G;T+=N*F)if(I=Math.round((T-y)/F/N),!(T<C||I==H)){H=I;var M=null;0==I%v&&(M=A.formatText(n+I*N)+"");e?q(C-K[Math.abs(I)%v],T,C,T,M):q(T,C-K[Math.abs(I)%v],T,C,M)}g.lineWidth=
+1;q(e?0:C,e?C:0,C,C);g.fillStyle=B.cornerClr;g.fillRect(0,0,C,C)},x=-1,E=function(){null!=u?(null!=z&&z(x),x=u(t)):t()};this.drawRuler=E;this.sizeListener=d=m(function(){var F=l.container;e?(F=F.offsetHeight+C,f.height!=F&&(f.height=F,J.style.height=F+"px",E())):(F=F.offsetWidth+C,f.width!=F&&(f.width=F,J.style.width=F+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=c=m(function(){var F=e?l.container.scrollTop:l.container.scrollLeft;A.lastScroll!=F&&(A.lastScroll=F,E())},10);
+this.unitListener=function(F,G){A.setUnit(G.getProperty("unit"))};l.addListener(mxEvent.SIZE,d);l.container.addEventListener("scroll",c);l.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(F){B=F;J.style.background=B.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(F,G,y,T){if(e&&4<F.height||
+!e&&4<F.width){if(null!=A.guidePart)try{g.putImageData(A.guidePart.imgData1,A.guidePart.x1,A.guidePart.y1),g.putImageData(A.guidePart.imgData2,A.guidePart.x2,A.guidePart.y2),g.putImageData(A.guidePart.imgData3,A.guidePart.x3,A.guidePart.y3)}catch(W){}var n=A.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=B.guideClr;g.setLineDash([2]);if(e){var v=F.y+n.y+C-this.graph.container.scrollTop;var H=0;var K=v+F.height/2;var N=C/2;var I=v+F.height;var M=0;var Q=g.getImageData(H,v-1,C,
+3);q(H,v,C,v);v--;var P=g.getImageData(N,K-1,C,3);q(N,K,C,K);K--;var U=g.getImageData(M,I-1,C,3);q(M,I,C,I);I--}else v=0,H=F.x+n.x+C-this.graph.container.scrollLeft,K=C/2,N=H+F.width/2,I=0,M=H+F.width,Q=g.getImageData(H-1,v,3,C),q(H,v,H,C),H--,P=g.getImageData(N-1,K,3,C),q(N,K,N,C),N--,U=g.getImageData(M-1,I,3,C),q(M,I,M,C),M--;if(null==A.guidePart||A.guidePart.x1!=H||A.guidePart.y1!=v)A.guidePart={imgData1:Q,x1:H,y1:v,imgData2:P,x2:N,y2:K,imgData3:U,x3:M,y3:I}}catch(W){}}else n=A.origGuideMove.apply(this,
+arguments);return n};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var F=A.origGuideDestroy.apply(this,arguments);if(null!=A.guidePart)try{g.putImageData(A.guidePart.imgData1,A.guidePart.x1,A.guidePart.y1),g.putImageData(A.guidePart.imgData2,A.guidePart.x2,A.guidePart.y2),g.putImageData(A.guidePart.imgData3,A.guidePart.x3,A.guidePart.y3),A.guidePart=null}catch(G){}return F}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
-function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var v=new mxPopupMenu(mxUtils.bind(this,function(d,g){b.menus.addMenuItems(d,["points","inches","millimeters","meters"],g)}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=
-!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var x=mxEvent.getClientX(m),E=mxEvent.getClientY(m);v.popup(x,E,null,m);b.setCurrentMenu(v,c)}mxEvent.consume(m)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,v=[],x,E=!1,d=!0,g=!0,k=!0,n=!0,q=[],p=!1,y=!1,A=!1,C={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(J){E=J};this.setAutoClose=function(J){d=J};this.setAutoInsert=
-function(J){g=J};this.setAutoScroll=function(J){k=J};this.setOpenFill=function(J){n=J};this.setStopClickEnabled=function(J){y=J};this.setSelectInserted=function(J){A=J};this.setSmoothing=function(J){f=J};this.setPerfectFreehandMode=function(J){B=J};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(J){C.size=J};this.getBrushSize=function(){return C.size};var I=function(J){p=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);
-b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return p};var M=mxUtils.bind(this,function(J){if(c){var K=x.length,H=y&&0<v.length&&null!=x&&2>x.length;H||v.push.apply(v,x);x=[];v.push(null);l.push(c);c=null;(H||g)&&this.stopDrawing();g&&(!H||2<=K)&&this.startDrawing();mxEvent.consume(J)}}),G=new mxCell;G.edge=!0;var S=function(){var J=b.getCurrentCellStyle(G);J=mxUtils.getValue(b.currentVertexStyle,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var K=";fillColor=none;";B&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+K};this.stopDrawing=function(){if(0<l.length){if(B){for(var J=[],K=0;K<v.length;K++)null!=v[K]&&J.push([v[K].x,v[K].y]);J=PerfectFreehand.getStroke(J,C);v=[];for(K=0;K<J.length;K++)v.push({x:J[K][0],y:J[K][1]});v.push(null)}J=v[0].x;var H=v[0].x,N=
-v[0].y,U=v[0].y;for(K=1;K<v.length;K++)null!=v[K]&&(J=Math.max(J,v[K].x),H=Math.min(H,v[K].x),N=Math.max(N,v[K].y),U=Math.min(U,v[K].y));J-=H;N-=U;if(0<J&&0<N){var Q=100/J,V=100/N;v.map(function(T){if(null==T)return T;T.x=(T.x-H)*Q;T.y=(T.y-U)*V;return T});var W='<shape strokewidth="inherit"><foreground>',t=0;for(K=0;K<v.length;K++){var D=v[K];if(null==D){D=!1;t=v[t];var L=v[K-1];!E&&d&&(D=t.x-L.x,L=t.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(E||D)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+
-'"/>';W+="</path>"+(n||E||D?"<fillstroke/>":"<stroke/>");t=K+1}else W=K==t?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;K=new mxCell("",new mxGeometry(H/W-t.x,U/W-t.y,J/W,N/W),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}A&&b.setSelectionCells([K])}}for(K=0;K<l.length;K++)l[K].parentNode.removeChild(l[K]);c=null;l=[];v=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,K){J=K.getProperty("eventName");K=K.getProperty("event");J==mxEvent.MOUSE_MOVE&&p&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,K){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(J=K.getEvent(),p&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var N=S();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?N:"none");c.setAttribute("stroke",N);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(N=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-N=N.split(" ").map(function(U){return parseFloat(U)*H}).join(" "),c.setAttribute("stroke-dasharray",N));q=[];J=u(J);z(J);m="M"+J.x+" "+J.y;v.push(J);x=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],C):m);e.appendChild(c);K.consume()}}),mouseMove:mxUtils.bind(this,function(J,K){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=K.getEvent();J=u(J);z(J);var H=F(0);if(H)if(v.push(H),B){var N=[];for(H=0;H<v.length;H++)N.push([v[H].x,v[H].y]);x=[];for(var U=2;U<q.length;U+=
-2)H=F(U),N.push([H.x,H.y]),x.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(N,C))}else{m+=" L"+H.x+" "+H.y;N="";x=[];for(U=2;U<q.length;U+=2)H=F(U),N+=" L"+H.x+" "+H.y,x.push(H);c.setAttribute("d",m+N)}k&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(J,K){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var u=function(J){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(J),mxEvent.getClientY(J))},z=function(J){for(q.push(J);q.length>f;)q.shift()},F=function(J){var K=q.length;if(1===K%2||K>=f){var H=0,N=0,U,Q=0;for(U=J;U<K;U++)Q++,J=q[U],H+=J.x,N+=J.y;return{x:H/Q,y:N/Q}}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;function P2PCollab(b,e,f){function c(Q,V){try{if(!F){var W=e.file.getCurrentUser();if(z&&null!=W&&null!=W.displayName){var t={from:M,id:y,type:Q,sessionId:e.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};t={bytes:e.objectToString(t),data:"aes"};t=JSON.stringify(t);J&&"cursor"!=Q&&EditorUi.debug("P2PCollab: sending to socket server",[t]);y++;Q=!J&&("cursor"==Q||"selectionChange"==Q);u&&!Q&&U("message",t);if(Q)for(p2pId in S)S[p2pId].send(t)}}}catch(D){null!=
-window.console&&console.log("Error:",D)}}function l(Q){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,t=g.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((Q.getX()-V.x+g.container.scrollLeft)/t-W.x),y:Math.round((Q.getY()-V.y+g.container.scrollTop)/t-W.y)})}}function m(Q,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=Q&&null!=Q.cursor&&null!=Q.lastCursor)if(null!=Q.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=Q.lastCursor.pageId&&Q.lastCursor.pageId!=W)Q.cursor.style.display="none";else{W=function(){var P=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-Q.cursor.clientWidth,L)),R=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-Q.cursor.clientHeight,T));O.style.opacity=P!=L||R!=T?0:1;Q.cursor.style.left=P+"px";Q.cursor.style.top=R+"px";Q.cursor.style.display=""};var t=g.view.translate,D=g.view.scale,L=(t.x+Q.lastCursor.x)*
-D+8,T=(t.y+Q.lastCursor.y)*D-12,O=Q.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(Q.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(Q.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function v(Q,V){try{var W=function(){if(null==p[D]){var Y=I[D];null==Y&&(Y=k%q.length,I[D]=Y,k++);var aa=q[Y];Y=11<Y?"black":"white";p[D]={cursor:document.createElement("div"),
-color:aa,selection:{}};C[V]=D;L=p[D].cursor;L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+aa+'" fill="'+aa+'"/>').src);ba.style.width="10px";L.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=aa;ba.style.color=
-Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,t);L.appendChild(ba);b.diagramContainer.appendChild(L)}else L=p[D].cursor;T=p[D].selection};if(!F){Q=JSON.parse(Q);null!=Q.bytes&&(Q=e.stringToObject(Q.bytes));J&&"cursor"!=Q.type&&EditorUi.debug("P2PCollab: msg received",[Q]);if(null!=V){if(Q.from==M||A[Q.from]>=
-Q.id){EditorUi.debug("P2PCollab: Dropped Message",Q,M,A[Q.from]);return}A[Q.from]=Q.id}var t=Q.username?Q.username:"Anonymous",D=Q.sessionId,L,T;null!=p[D]&&(clearTimeout(p[D].inactiveTO),p[D].inactiveTO=setTimeout(function(){E(null,D)},12E4));var O=Q.data;switch(Q.type){case "cursor":W();p[D].lastCursor=O;m(p[D],!0);break;case "diff":try{Q=null!=O.patch?e.stringToObject(decodeURIComponent(O.patch)):O.diff,e.receiveRemoteChanges(Q.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=
-urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==P||null!=O.pageId&&O.pageId==P){W();for(W=0;W<O.removed.length;W++){var R=O.removed[W];if(null!=R){var X=T[R];delete T[R];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(R=O.added[W],null!=R){var Z=g.model.getCell(R);null!=Z&&(T[R]=g.highlightCell(Z,p[D].color,6E4,70,3))}}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",Q))}}catch(Y){null!=window.console&&console.log("Error:",Y)}}function x(Q,
-V){if(!J&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){U("sendSignal",{to:Q,from:M,signal:t})});W.on("error",function(t){delete G[Q];EditorUi.debug("P2PCollab: p2p socket error",t);!F&&V&&W.destroyed&&B[Q]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",Q),x(Q,!0))});W.on("connect",function(){delete G[Q];null==S[Q]||S[Q].destroyed?(S[Q]=W,B[Q]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
-Q)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",Q))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",Q),d(C[Q]),delete S[Q])});W.on("data",v);return G[Q]=W}}function E(Q,V){d(V||C[Q]);null!=Q&&(delete C[Q],B[Q]=!1)}function d(Q){var V=p[Q];if(null!=V){var W=V.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[Q]}}
-var g=b.editor.graph,k=0,n=null,q="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},y=1,A={},C={},B={},I={},M,G={},S={},u=!0,z=!1,F=!1,J="0"!=urlParams["no-p2p"],K=!1,H=0,N=null,U=mxUtils.bind(this,function(Q,V){if(!F)try{null!=n?(n.send(JSON.stringify({action:Q,msg:V})),J||EditorUi.debug("P2PCollab: sending to socket server",[Q],[V])):this.joinFile(!0)}catch(W){N=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),
-EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(Q){this.sendMessage("diff",{diff:Q})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return N};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Q,V){},mouseMove:function(Q,V){var W,t=-1;return function(){clearTimeout(W);var D=this,L=arguments,T=function(){W=null;t=Date.now();Q.apply(D,L)};Date.now()-t>V?T():W=setTimeout(T,V)}}(function(Q,
-V){l(V)},300),mouseUp:function(Q,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(Q,V){Q=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(Q):[],added:V?
-V.map(Q):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var Q in p)m(p[Q])});mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
-this.cursorHandler);this.joinFile=function(Q){if(!F)try{K&&(EditorUi.debug("P2PCollab: joinInProgress on",K),N="busy");K=++H;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(t){n=V;n.joinId=K;K=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId);
-Q&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(t){J||EditorUi.debug("P2PCollab: msg received",[t]);var D=JSON.parse(t.data);J&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[t]);switch(D.action){case "message":v(D.msg,D.from);break;case "clientsList":t=D.msg;M=t.cId;z=!0;for(D=0;D<t.list.length;D++)x(t.list[D],!0);break;case "signal":t=D.msg;J||(G[t.from]?D=G[t.from]:(D=x(t.from,!1),u=!0),D.signal(t.signal));break;case "newClient":u=!0;break;case "clientLeft":E(D.msg);
-break;case "sendSignalFailed":t=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete G[t.to],B[t.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);F||1E3==t.code||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
-V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",V.joinId);F||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
-e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){N=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!F){EditorUi.debug("P2PCollab: destroyed");F=!0;for(sessionId in p)d(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
-null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var Q in S)null!=S[Q]&&S[Q].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+function mxDualRuler(b,d){var e=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return e};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,d,!0);this.hRuler=new mxRuler(b,d,!1,!0);d=mxUtils.bind(this,function(c){var k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
+function(m){k=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!k){var u=new mxPopupMenu(mxUtils.bind(this,function(A,B){b.menus.addMenuItems(A,["points","inches","millimeters","meters"],B)}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=
+!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);b.resetCurrentMenu();u.destroy()});var z=mxEvent.getClientX(m),C=mxEvent.getClientY(m);u.popup(z,C,null,m);b.setCurrentMenu(u,c)}mxEvent.consume(m)}}))});d(this.hRuler.container);d(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var d=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=d){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var e=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],m,u=[],z,C=!1,A=!0,B=!0,J=!0,f=!0,g=[],l=!1,q=!1,t=!1,x={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){A=K};this.setAutoInsert=
+function(K){B=K};this.setAutoScroll=function(K){J=K};this.setOpenFill=function(K){f=K};this.setStopClickEnabled=function(K){q=K};this.setSelectInserted=function(K){t=K};this.setSmoothing=function(K){e=K};this.setPerfectFreehandMode=function(K){E=K};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(K){x.size=K};this.getBrushSize=function(){return x.size};var F=function(K){l=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);
+b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){F(!0)};this.isDrawing=function(){return l};var G=mxUtils.bind(this,function(K){if(c){var N=z.length,I=q&&0<u.length&&null!=z&&2>z.length;I||u.push.apply(u,z);z=[];u.push(null);k.push(c);c=null;(I||B)&&this.stopDrawing();B&&(!I||2<=N)&&this.startDrawing();mxEvent.consume(K)}}),y=new mxCell;y.edge=!0;var T=function(){var K=b.getCurrentCellStyle(y);K=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var N=";fillColor=none;";E&&(N=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+N};this.stopDrawing=function(){if(0<k.length){if(E){for(var K=[],N=0;N<u.length;N++)null!=u[N]&&K.push([u[N].x,u[N].y]);K=PerfectFreehand.getStroke(K,x);u=[];for(N=0;N<K.length;N++)u.push({x:K[N][0],y:K[N][1]});u.push(null)}K=u[0].x;var I=u[0].x,M=
+u[0].y,Q=u[0].y;for(N=1;N<u.length;N++)null!=u[N]&&(K=Math.max(K,u[N].x),I=Math.min(I,u[N].x),M=Math.max(M,u[N].y),Q=Math.min(Q,u[N].y));K-=I;M-=Q;if(0<K&&0<M){var P=100/K,U=100/M;u.map(function(V){if(null==V)return V;V.x=(V.x-I)*P;V.y=(V.y-Q)*U;return V});var W='<shape strokewidth="inherit"><foreground>',p=0;for(N=0;N<u.length;N++){var D=u[N];if(null==D){D=!1;p=u[p];var L=u[N-1];!C&&A&&(D=p.x-L.x,L=p.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(C||D)W+='<line x="'+p.x.toFixed(2)+'" y="'+p.y.toFixed(2)+
+'"/>';W+="</path>"+(f||C||D?"<fillstroke/>":"<stroke/>");p=N+1}else W=N==p?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;p=b.view.translate;N=new mxCell("",new mxGeometry(I/W-p.x,Q/W-p.y,K/W,M/W),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}t&&b.setSelectionCells([N])}}for(N=0;N<k.length;N++)k[N].parentNode.removeChild(k[N]);c=null;k=[];u=[]}F(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,N){K=N.getProperty("eventName");N=N.getProperty("event");K==mxEvent.MOUSE_MOVE&&l&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,N){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(K=N.getEvent(),l&&!mxEvent.isPopupTrigger(K)&&!mxEvent.isMultiTouchEvent(K))){var I=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);I=Math.max(1,I*b.view.scale);var M=T();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",E?M:"none");c.setAttribute("stroke",M);c.setAttribute("stroke-width",I);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(M=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+M=M.split(" ").map(function(Q){return parseFloat(Q)*I}).join(" "),c.setAttribute("stroke-dasharray",M));g=[];K=n(K);v(K);m="M"+K.x+" "+K.y;u.push(K);z=[];c.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],x):m);d.appendChild(c);N.consume()}}),mouseMove:mxUtils.bind(this,function(K,N){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=N.getEvent();K=n(K);v(K);var I=H(0);if(I)if(u.push(I),E){var M=[];for(I=0;I<u.length;I++)M.push([u[I].x,u[I].y]);z=[];for(var Q=2;Q<g.length;Q+=
+2)I=H(Q),M.push([I.x,I.y]),z.push(I);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(M,x))}else{m+=" L"+I.x+" "+I.y;M="";z=[];for(Q=2;Q<g.length;Q+=2)I=H(Q),M+=" L"+I.x+" "+I.y,z.push(I);c.setAttribute("d",m+M)}J&&(I=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-I.x,K.y-I.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(K,N){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(N.getEvent()),N.consume())})});var n=function(K){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(K),mxEvent.getClientY(K))},v=function(K){for(g.push(K);g.length>e;)g.shift()},H=function(K){var N=g.length;if(1===N%2||N>=e){var I=0,M=0,Q,P=0;for(Q=K;Q<N;Q++)P++,K=g[Q],I+=K.x,M+=K.y;return{x:I/P,y:M/P}}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;function P2PCollab(b,d,e){function c(P,U){try{if(!H){var W=d.file.getCurrentUser();if(v&&null!=W&&null!=W.displayName){var p={from:G,id:q,type:P,sessionId:d.clientId,userId:W.id,username:W.displayName,data:U,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};p={bytes:d.objectToString(p),data:"aes"};p=JSON.stringify(p);K&&"cursor"!=P&&EditorUi.debug("P2PCollab: sending to socket server",[p]);q++;P=!K&&("cursor"==P||"selectionChange"==P);n&&!P&&Q("message",p);if(P)for(p2pId in T)T[p2pId].send(p)}}}catch(D){null!=
+window.console&&console.log("Error:",D)}}function k(P){if(b.shareCursorPosition&&!B.isMouseDown){var U=mxUtils.getOffset(B.container),W=B.view.translate,p=B.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((P.getX()-U.x+B.container.scrollLeft)/p-W.x),y:Math.round((P.getY()-U.y+B.container.scrollTop)/p-W.y)})}}function m(P,U){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=P&&null!=P.cursor&&null!=P.lastCursor)if(null!=P.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=P.lastCursor.pageId&&P.lastCursor.pageId!=W)P.cursor.style.display="none";else{W=function(){var R=Math.max(B.container.scrollLeft,Math.min(B.container.scrollLeft+B.container.clientWidth-P.cursor.clientWidth,L)),S=Math.max(B.container.scrollTop-22,Math.min(B.container.scrollTop+B.container.clientHeight-P.cursor.clientHeight,V));O.style.opacity=R!=L||S!=V?0:1;P.cursor.style.left=R+"px";P.cursor.style.top=S+"px";P.cursor.style.display=""};var p=B.view.translate,D=B.view.scale,L=(p.x+P.lastCursor.x)*
+D+8,V=(p.y+P.lastCursor.y)*D-12,O=P.cursor.getElementsByTagName("img")[0];U?(mxUtils.setPrefixedStyle(P.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(P.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function u(P,U){try{var W=function(){if(null==l[D]){var aa=F[D];null==aa&&(aa=J%g.length,F[D]=aa,J++);var ba=g[aa];aa=11<aa?"black":"white";
+l[D]={cursor:document.createElement("div"),color:ba,selection:{}};x[U]=D;L=l[D].cursor;L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);da.style.width="10px";L.appendChild(da);da=document.createElement("div");
+da.style.backgroundColor=ba;da.style.color=aa;da.style.fontSize="9pt";da.style.padding="3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,p);L.appendChild(da);b.diagramContainer.appendChild(L)}else L=l[D].cursor;V=l[D].selection};if(!H){P=JSON.parse(P);null!=P.bytes&&(P=d.stringToObject(P.bytes));K&&"cursor"!=P.type&&EditorUi.debug("P2PCollab: msg received",
+[P]);if(null!=U){if(P.from==G||t[P.from]>=P.id){EditorUi.debug("P2PCollab: Dropped Message",P,G,t[P.from]);return}t[P.from]=P.id}var p=P.username?P.username:"Anonymous",D=P.sessionId,L,V;null!=l[D]&&(clearTimeout(l[D].inactiveTO),l[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=P.data;switch(P.type){case "cursor":W();l[D].lastCursor=O;m(l[D],!0);break;case "diff":try{P=null!=O.patch?d.stringToObject(decodeURIComponent(O.patch)):O.diff,d.receiveRemoteChanges(P.d)}catch(aa){EditorUi.debug("P2PCollab: Diff msg error",
+aa)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var R=null!=b.currentPage?b.currentPage.getId():null;if(null==R||null!=O.pageId&&O.pageId==R){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=V[S];delete V[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var Y=B.model.getCell(S);null!=Y&&(V[S]=B.highlightCell(Y,l[D].color,6E4,70,3))}}}}d.file.fireEvent(new mxEventObject("realtimeMessage","message",P))}}catch(aa){null!=window.console&&
+console.log("Error:",aa)}}function z(P,U){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:U,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(p){Q("sendSignal",{to:P,from:G,signal:p})});W.on("error",function(p){delete y[P];EditorUi.debug("P2PCollab: p2p socket error",p);!H&&U&&W.destroyed&&E[P]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",P),z(P,!0))});W.on("connect",function(){delete y[P];null==T[P]||T[P].destroyed?(T[P]=W,E[P]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
+P)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",P))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",P),A(x[P]),delete T[P])});W.on("data",u);return y[P]=W}}function C(P,U){A(U||x[P]);null!=P&&(delete x[P],E[P]=!1)}function A(P){var U=l[P];if(null!=U){var W=U.selection,p;for(p in W)null!=W[p]&&W[p].destroy();null!=U.cursor&&null!=U.cursor.parentNode&&U.cursor.parentNode.removeChild(U.cursor);clearTimeout(U.inactiveTO);delete l[P]}}
+var B=b.editor.graph,J=0,f=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),l={},q=1,t={},x={},E={},F={},G,y={},T={},n=!0,v=!1,H=!1,K="0"!=urlParams["no-p2p"],N=!1,I=0,M=null,Q=mxUtils.bind(this,function(P,U){if(!H)try{null!=f?(f.send(JSON.stringify({action:P,msg:U})),K||EditorUi.debug("P2PCollab: sending to socket server",[P],[U])):this.joinFile(!0)}catch(W){M=W,d.file.fireEvent(new mxEventObject("realtimeStateChanged")),
+EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(P){this.sendMessage("diff",{diff:P})};this.getState=function(){return null!=f?f.readyState:3};this.getLastError=function(){return M};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){},mouseMove:function(P,U){var W,p=-1;return function(){clearTimeout(W);var D=this,L=arguments,V=function(){W=null;p=Date.now();P.apply(D,L)};Date.now()-p>U?V():W=setTimeout(V,U)}}(function(P,
+U){k(U)},300),mouseUp:function(P,U){k(U)}};B.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(P,U){P=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,p=U.getProperty("added");U=U.getProperty("removed");c("selectionChange",{pageId:W,removed:p?p.map(P):[],added:U?
+U.map(P):[]})};B.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var P in l)m(l[P])});mxEvent.addListener(B.container,"scroll",this.cursorHandler);B.getView().addListener(mxEvent.SCALE,this.cursorHandler);B.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);B.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
+this.cursorHandler);this.joinFile=function(P){if(!H)try{N&&(EditorUi.debug("P2PCollab: joinInProgress on",N),M="busy");N=++I;try{null!=f&&(EditorUi.debug("P2PCollab: force closing socket on",f.joinId),f.close(1E3),f=null)}catch(p){EditorUi.debug("P2PCollab: closing socket error",p)}var U=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+e);U.addEventListener("open",function(p){f=U;f.joinId=N;N=!1;d.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",f.joinId);
+P&&d.scheduleCleanup()});U.addEventListener("message",mxUtils.bind(this,function(p){K||EditorUi.debug("P2PCollab: msg received",[p]);var D=JSON.parse(p.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[p]);switch(D.action){case "message":u(D.msg,D.from);break;case "clientsList":p=D.msg;G=p.cId;v=!0;for(D=0;D<p.list.length;D++)z(p.list[D],!0);break;case "signal":p=D.msg;K||(y[p.from]?D=y[p.from]:(D=z(p.from,!1),n=!0),D.signal(p.signal));break;case "newClient":n=!0;break;case "clientLeft":C(D.msg);
+break;case "sendSignalFailed":p=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",p),delete y[p.to],E[p.to]=!1}}));var W=!1;U.addEventListener("close",mxUtils.bind(this,function(p){EditorUi.debug("P2PCollab: WebSocket closed",U.joinId,"reconnecting",p.code,p.reason);EditorUi.debug("P2PCollab: closing socket on",U.joinId);H||1E3==p.code||I!=U.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in close on",U.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
+U.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));U.addEventListener("error",mxUtils.bind(this,function(p){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",p);EditorUi.debug("P2PCollab: error socket on",U.joinId);H||I!=U.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in error on",U.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",U.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
+d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(p){M=p,d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!H){EditorUi.debug("P2PCollab: destroyed");H=!0;for(sessionId in l)A(sessionId);null!=this.mouseListeners&&B.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&B.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
+null!=this.cursorHandler&&(mxEvent.removeListener(B.container,"scroll",this.cursorHandler),B.getView().removeListener(mxEvent.SCALE,this.cursorHandler),B.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),B.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=f&&(f.close(1E3),f=null);for(var P in T)null!=T[P]&&T[P].destroy();d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 13436ac4..69fc7eb8 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3098,6 +3098,12 @@ App.prototype.start = function()
}));
}
+ if (urlParams['live-ui'] == '1' && Editor.currentTheme == 'sketch')
+ {
+ Editor.currentTheme = '';
+ this.doSetCurrentTheme('sketch', 0);
+ }
+
// Descriptor for CSV import
if ((window.location.hash == null || window.location.hash.length <= 1) && urlParams['desc'] != null)
{
@@ -6713,13 +6719,13 @@ App.prototype.updateHeader = function()
this.appIconClicked(evt);
}));
- var updateBackgorund = mxUtils.bind(this, function()
+ var updateBackground = mxUtils.bind(this, function()
{
this.appIcon.style.backgroundColor = (!Editor.isDarkMode()) ? '#f08705' : '';
});
- this.addListener('darkModeChanged', updateBackgorund);
- updateBackgorund();
+ this.addListener('darkModeChanged', updateBackground);
+ updateBackground();
mxUtils.setPrefixedStyle(this.appIcon.style, 'transition', 'all 125ms linear');
@@ -6835,7 +6841,7 @@ App.prototype.updateHeader = function()
*/
var right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? 30 : 10;
this.toggleFormatElement = document.createElement('a');
- this.toggleFormatElement.setAttribute('title', mxResources.get('formatPanel') + ' (' + Editor.ctrlKey + '+Shift+P)');
+ this.toggleFormatElement.setAttribute('title', mxResources.get('format') + ' (' + Editor.ctrlKey + '+Shift+P)');
this.toggleFormatElement.style.position = 'absolute';
this.toggleFormatElement.style.display = 'inline-block';
this.toggleFormatElement.style.top = (uiTheme == 'atlas') ? '8px' : '6px';
@@ -6861,9 +6867,9 @@ App.prototype.updateHeader = function()
mxEvent.addListener(this.toggleFormatElement, 'click', mxUtils.bind(this, function(evt)
{
EditorUi.logEvent({category: 'TOOLBAR-ACTION-',
- action: 'formatPanel'});
+ action: 'format'});
- this.actions.get('formatPanel').funct();
+ this.actions.get('format').funct();
mxEvent.consume(evt);
}));
@@ -7063,6 +7069,12 @@ App.prototype.toggleCompactMode = function(visible)
*/
App.prototype.updateUserElement = function()
{
+ if (this.userElement == null)
+ {
+ this.userElement = this.createUserElement();
+ this.menubarContainer.appendChild(this.userElement);
+ }
+
if ((this.drive == null || this.drive.getUser() == null) &&
(this.oneDrive == null || this.oneDrive.getUser() == null) &&
(this.dropbox == null || this.dropbox.getUser() == null) &&
@@ -7070,536 +7082,11 @@ App.prototype.updateUserElement = function()
(this.gitLab == null || this.gitLab.getUser() == null) &&
(this.trello == null || !this.trello.isAuthorized())) //TODO Trello no user issue
{
- if (this.userElement != null)
- {
- this.userElement.parentNode.removeChild(this.userElement);
- this.userElement = null;
- }
+ this.userElement.style.display = 'none';
}
else
{
- if (this.userElement == null)
- {
- this.userElement = this.createUserElement();
- this.menubarContainer.appendChild(this.userElement);
-
- // Prevents focus
- mxEvent.addListener(this.userElement, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
- mxUtils.bind(this, function(evt)
- {
- evt.preventDefault();
- }));
-
- mxEvent.addListener(this.userElement, 'click', mxUtils.bind(this, function(evt)
- {
- if (this.userPanel == null)
- {
- var div = document.createElement('div');
- div.className = 'geDialog';
- div.style.position = 'absolute';
- div.style.top = (this.userElement.clientTop +
- this.userElement.clientHeight + 6) + 'px';
- div.style.zIndex = 5;
- div.style.right = '36px';
- div.style.padding = '0px';
- div.style.cursor = 'default';
- div.style.minWidth = '300px';
-
- this.userPanel = div;
- }
-
- if (this.userPanel.parentNode != null)
- {
- this.userPanel.parentNode.removeChild(this.userPanel);
- }
- else
- {
- var connected = false;
- this.userPanel.innerText = '';
-
- var img = document.createElement('img');
-
- img.setAttribute('src', Dialog.prototype.closeImage);
- img.setAttribute('title', mxResources.get('close'));
- img.className = 'geDialogClose';
- img.style.top = '8px';
- img.style.right = '8px';
-
- mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
- {
- if (this.userPanel.parentNode != null)
- {
- this.userPanel.parentNode.removeChild(this.userPanel);
- }
- }));
-
- this.userPanel.appendChild(img);
-
- if (this.drive != null)
- {
- var driveUsers = this.drive.getUsersList();
-
- if (driveUsers.length > 0)
- {
- // LATER: Cannot change user while file is open since close will not work with new
- // credentials and closing the file using fileLoaded(null) will show splash dialog.
- var closeFile = mxUtils.bind(this, function(callback, spinnerMsg)
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == DriveFile)
- {
- this.spinner.spin(document.body, spinnerMsg);
-
-// file.close();
- this.fileLoaded(null);
-
- // LATER: Use callback to wait for thumbnail update
- window.setTimeout(mxUtils.bind(this, function()
- {
- this.spinner.stop();
- callback();
- }), 2000);
- }
- else
- {
- callback();
- }
- });
-
- var createUserRow = mxUtils.bind(this, function (user)
- {
- var tr = document.createElement('tr');
- tr.setAttribute('title', 'User ID: ' + user.id);
-
- var td = document.createElement('td');
- td.setAttribute('valig', 'middle');
- td.style.height = '59px';
- td.style.width = '66px';
-
- var img = document.createElement('img');
- img.setAttribute('width', '50');
- img.setAttribute('height', '50');
- img.setAttribute('border', '0');
- img.setAttribute('src', (user.pictureUrl != null) ? user.pictureUrl : this.defaultUserPicture);
- img.style.borderRadius = '50%';
- img.style.margin = '4px 8px 0 8px';
- td.appendChild(img);
- tr.appendChild(td);
-
- var td = document.createElement('td');
- td.setAttribute('valign', 'middle');
- td.style.whiteSpace = 'nowrap';
- td.style.paddingTop = '4px';
- td.style.maxWidth = '0';
- td.style.overflow = 'hidden';
- td.style.textOverflow = 'ellipsis';
- mxUtils.write(td, user.displayName +
- ((user.isCurrent && driveUsers.length > 1) ?
- ' (' + mxResources.get('default') + ')' : ''));
-
- if (user.email != null)
- {
- mxUtils.br(td);
-
- var small = document.createElement('small');
- small.style.color = 'gray';
- mxUtils.write(small, user.email);
- td.appendChild(small);
- }
-
- var div = document.createElement('div');
- div.style.marginTop = '4px';
-
- var i = document.createElement('i');
- mxUtils.write(i, mxResources.get('googleDrive'));
- div.appendChild(i);
- td.appendChild(div);
- tr.appendChild(td);
-
- if (!user.isCurrent)
- {
- tr.style.cursor = 'pointer';
- tr.style.opacity = '0.3';
-
- mxEvent.addListener(tr, 'click', mxUtils.bind(this, function(evt)
- {
- closeFile(mxUtils.bind(this, function()
- {
- this.stateArg = null;
- this.drive.setUser(user);
-
- this.drive.authorize(true, mxUtils.bind(this, function()
- {
- this.setMode(App.MODE_GOOGLE);
- this.hideDialog();
- this.showSplash();
- }), mxUtils.bind(this, function(resp)
- {
- this.handleError(resp);
- }), true); //Remember is true since add account imply keeping that account
- }), mxResources.get('closingFile') + '...');
-
- mxEvent.consume(evt);
- }));
- }
-
- return tr;
- });
-
- connected = true;
-
- var driveUserTable = document.createElement('table');
- driveUserTable.style.borderSpacing = '0';
- driveUserTable.style.fontSize = '10pt';
- driveUserTable.style.width = '100%';
- driveUserTable.style.padding = '10px';
-
- for (var i = 0; i < driveUsers.length; i++)
- {
- driveUserTable.appendChild(createUserRow(driveUsers[i]));
- }
-
- this.userPanel.appendChild(driveUserTable);
-
- var div = document.createElement('div');
- div.style.textAlign = 'left';
- div.style.padding = '10px';
- div.style.whiteSpace = 'nowrap';
- div.style.borderTop = '1px solid rgb(224, 224, 224)';
-
- var btn = mxUtils.button(mxResources.get('signOut'), mxUtils.bind(this, function()
- {
- this.confirm(mxResources.get('areYouSure'), mxUtils.bind(this, function()
- {
- closeFile(mxUtils.bind(this, function()
- {
- this.stateArg = null;
- this.drive.logout();
- this.setMode(App.MODE_GOOGLE);
- this.hideDialog();
- this.showSplash();
- }), mxResources.get('signOut'));
- }));
- }));
- btn.className = 'geBtn';
- btn.style.float = 'right';
- div.appendChild(btn);
-
- var btn = mxUtils.button(mxResources.get('addAccount'), mxUtils.bind(this, function()
- {
- var authWin = this.drive.createAuthWin();
- //FIXME This doean't work to set focus back to main window until closing the file is done
- authWin.blur();
- window.focus();
-
- closeFile(mxUtils.bind(this, function()
- {
- this.stateArg = null;
-
- this.drive.authorize(false, mxUtils.bind(this, function()
- {
- this.setMode(App.MODE_GOOGLE);
- this.hideDialog();
- this.showSplash();
- }), mxUtils.bind(this, function(resp)
- {
- this.handleError(resp);
- }), true, authWin); //Remember is true since add account imply keeping that account
- }), mxResources.get('closingFile') + '...');
- }));
- btn.className = 'geBtn';
- btn.style.margin = '0px';
- div.appendChild(btn);
- this.userPanel.appendChild(div);
- }
- }
-
- var addUser = mxUtils.bind(this, function(user, logo, logout, label)
- {
- if (user != null)
- {
- if (connected)
- {
- this.userPanel.appendChild(document.createElement('hr'));
- }
-
- connected = true;
- var userTable = document.createElement('table');
- userTable.style.borderSpacing = '0';
- userTable.style.fontSize = '10pt';
- userTable.style.width = '100%';
- userTable.style.padding = '10px';
-
- var tbody = document.createElement('tbody');
- var row = document.createElement('tr');
- var td = document.createElement('td');
- td.setAttribute('valig', 'top');
- td.style.width = '40px';
-
- if (logo != null)
- {
- var img = document.createElement('img');
- img.setAttribute('width', '40');
- img.setAttribute('height', '40');
- img.setAttribute('border', '0');
- img.setAttribute('src', logo);
- img.style.marginRight = '6px';
-
- td.appendChild(img);
- }
-
- row.appendChild(td);
-
- var td = document.createElement('td');
- td.setAttribute('valign', 'middle');
- td.style.whiteSpace = 'nowrap';
- td.style.maxWidth = '0';
- td.style.overflow = 'hidden';
- td.style.textOverflow = 'ellipsis';
-
- mxUtils.write(td, user.displayName);
-
- if (user.email != null)
- {
- mxUtils.br(td);
-
- var small = document.createElement('small');
- small.style.color = 'gray';
- mxUtils.write(small, user.email);
- td.appendChild(small);
- }
-
- if (label != null)
- {
- var div = document.createElement('div');
- div.style.marginTop = '4px';
-
- var i = document.createElement('i');
- mxUtils.write(i, label);
- div.appendChild(i);
- td.appendChild(div);
- }
-
- row.appendChild(td);
- tbody.appendChild(row);
- userTable.appendChild(tbody);
-
- this.userPanel.appendChild(userTable);
- var div = document.createElement('div');
- div.style.textAlign = 'center';
- div.style.padding = '10px';
- div.style.whiteSpace = 'nowrap';
-
- if (logout != null)
- {
- var btn = mxUtils.button(mxResources.get('signOut'), logout);
- btn.className = 'geBtn';
- div.appendChild(btn);
- }
-
- this.userPanel.appendChild(div);
- }
- });
-
- if (this.dropbox != null)
- {
- addUser(this.dropbox.getUser(), IMAGE_PATH + '/dropbox-logo.svg', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == DropboxFile)
- {
- var doLogout = mxUtils.bind(this, function()
- {
- this.dropbox.logout();
- window.location.hash = '';
- });
-
- if (!file.isModified())
- {
- doLogout();
- }
- else
- {
- this.confirm(mxResources.get('allChangesLost'), null, doLogout,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- }
- else
- {
- this.dropbox.logout();
- }
- }), mxResources.get('dropbox'));
- }
-
- if (this.oneDrive != null)
- {
- addUser(this.oneDrive.getUser(), IMAGE_PATH + '/onedrive-logo.svg', this.oneDrive.noLogout? null : mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == OneDriveFile)
- {
- var doLogout = mxUtils.bind(this, function()
- {
- this.oneDrive.logout();
- window.location.hash = '';
- });
-
- if (!file.isModified())
- {
- doLogout();
- }
- else
- {
- this.confirm(mxResources.get('allChangesLost'), null, doLogout,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- }
- else
- {
- this.oneDrive.logout();
- }
- }), mxResources.get('oneDrive'));
- }
-
- if (this.gitHub != null)
- {
- addUser(this.gitHub.getUser(), IMAGE_PATH + '/github-logo.svg', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == GitHubFile)
- {
- var doLogout = mxUtils.bind(this, function()
- {
- this.gitHub.logout();
- window.location.hash = '';
- });
-
- if (!file.isModified())
- {
- doLogout();
- }
- else
- {
- this.confirm(mxResources.get('allChangesLost'), null, doLogout,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- }
- else
- {
- this.gitHub.logout();
- }
- }), mxResources.get('github'));
- }
-
- if (this.gitLab != null)
- {
- addUser(this.gitLab.getUser(), IMAGE_PATH + '/gitlab-logo.svg', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == GitLabFile)
- {
- var doLogout = mxUtils.bind(this, function()
- {
- this.gitLab.logout();
- window.location.hash = '';
- });
-
- if (!file.isModified())
- {
- doLogout();
- }
- else
- {
- this.confirm(mxResources.get('allChangesLost'), null, doLogout,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- }
- else
- {
- this.gitLab.logout();
- }
- }), mxResources.get('gitlab'));
- }
-
- //TODO We have no user info from Trello, how we can create a user?
- if (this.trello != null)
- {
- addUser(this.trello.getUser(), IMAGE_PATH + '/trello-logo.svg', mxUtils.bind(this, function()
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == TrelloFile)
- {
- var doLogout = mxUtils.bind(this, function()
- {
- this.trello.logout();
- window.location.hash = '';
- });
-
- if (!file.isModified())
- {
- doLogout();
- }
- else
- {
- this.confirm(mxResources.get('allChangesLost'), null, doLogout,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
- }
- }
- else
- {
- this.trello.logout();
- }
- }), mxResources.get('trello'));
- }
-
- if (uiTheme == 'min')
- {
- var file = this.getCurrentFile();
-
- if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
- {
- var div = document.createElement('div');
- div.style.padding = '10px';
- div.style.whiteSpace = 'nowrap';
- div.style.borderTop = '1px solid rgb(224, 224, 224)';
- div.style.marginTop = '4px';
- div.style.textAlign = 'center';
- div.style.padding = '10px';
- div.style.fontSize = '9pt';
- var err = file.getRealtimeError();
- var state = file.getRealtimeState();
-
- if (state != 1)
- {
- mxUtils.write(div, mxResources.get('realtimeCollaboration') + ': ' +
- ((err != null && err.message != null) ?
- err.message : mxResources.get('disconnected')));
- this.userPanel.appendChild(div);
- }
- }
- }
-
- document.body.appendChild(this.userPanel);
- }
-
- mxEvent.consume(evt);
- }));
-
- mxEvent.addListener(document.body, 'click', mxUtils.bind(this, function(evt)
- {
- if (!mxEvent.isConsumed(evt) && this.userPanel != null && this.userPanel.parentNode != null)
- {
- this.userPanel.parentNode.removeChild(this.userPanel);
- }
- }));
- }
-
+ this.userElement.style.display = 'inline-block';
var user = null;
if (this.drive != null && this.drive.getUser() != null)
@@ -7645,7 +7132,53 @@ App.prototype.updateUserElement = function()
this.updateUserElementIcon();
};
-//TODO Use this function to get the currently logged in user
+/**
+ *
+ */
+App.prototype.updateUserElementStyle = function()
+{
+ var elt = this.userElement;
+
+ if (elt != null)
+ {
+ if (Editor.currentTheme == 'sketch')
+ {
+ elt.className = 'geToolbarButton';
+ elt.style.backgroundImage = 'url(' + Editor.userImage + ')';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '100% 100%';
+ elt.style.position = 'relative';
+ elt.style.margin = '0px';
+ elt.style.padding = '0px';
+ elt.style.height = '24px';
+ elt.style.width = '24px';
+ elt.style.top = '3px';
+ elt.style.right = '';
+ }
+ else
+ {
+ elt.className = 'geItem';
+ elt.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+ elt.style.backgroundPosition = '100% 60%';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '';
+ elt.style.position = 'absolute';
+ elt.style.margin = '4px';
+ elt.style.padding = '2px';
+ elt.style.paddingRight = '16px';
+ elt.style.width = '';
+ elt.style.height = '';
+ elt.style.right = (Editor.currentTheme == 'atlas' ||
+ urlParams['live-ui'] != '1') ? '8px' : '30px';
+ elt.style.top = (Editor.currentTheme == 'atlas') ? '8px' : '2px';
+ }
+ }
+};
+
+/**
+ *
+ */
App.prototype.updateUserElementIcon = function()
{
var elt = this.userElement;
@@ -7670,7 +7203,7 @@ App.prototype.updateUserElementIcon = function()
var err = file.getRealtimeError();
var state = file.getRealtimeState();
- title += ' (' + mxResources.get('realtimeCollaboration') + ': ';
+ title += ' (';
if (state == 1)
{
@@ -7705,48 +7238,6 @@ App.prototype.updateUserElementIcon = function()
}
};
-//TODO Use this function to get the currently logged in user
-App.prototype.updateUserElementStyle = function()
-{
- var elt = this.userElement;
-
- if (elt != null)
- {
- if (Editor.currentTheme == 'sketch')
- {
- elt.className = 'geToolbarButton';
- elt.style.backgroundImage = 'url(' + Editor.userImage + ')';
- elt.style.backgroundPosition = 'center center';
- elt.style.backgroundRepeat = 'no-repeat';
- elt.style.backgroundSize = '100% 100%';
- elt.style.position = 'relative';
- elt.style.margin = '0px';
- elt.style.padding = '0px';
- elt.style.height = '24px';
- elt.style.width = '24px';
- elt.style.top = '3px';
- elt.style.right = '';
- }
- else
- {
- elt.className = 'geItem';
- elt.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
- elt.style.backgroundPosition = '100% 60%';
- elt.style.backgroundRepeat = 'no-repeat';
- elt.style.backgroundSize = '';
- elt.style.position = 'absolute';
- elt.style.margin = '4px';
- elt.style.padding = '2px';
- elt.style.paddingRight = '16px';
- elt.style.width = '';
- elt.style.height = '';
- elt.style.right = (Editor.currentTheme == 'atlas' ||
- urlParams['live-ui'] != '1') ? '8px' : '30px';
- elt.style.top = (Editor.currentTheme == 'atlas') ? '8px' : '2px';
- }
- }
-};
-
/**
* Adds the listener for automatically saving the diagram for local changes.
*/
@@ -7757,10 +7248,526 @@ App.prototype.createUserElement = function()
elt.style.display = 'inline-block';
elt.style.cursor = 'pointer';
elt.style.fontSize = '8pt';
+
+ // Prevents focus
+ mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
+ mxUtils.bind(this, function(evt)
+ {
+ evt.preventDefault();
+ }));
+
+ mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+ {
+ if (this.userPanel == null)
+ {
+ var div = document.createElement('div');
+ div.className = 'geDialog';
+ div.style.position = 'absolute';
+ div.style.top = (elt.clientTop + elt.clientHeight + 6) + 'px';
+ div.style.zIndex = 5;
+ div.style.right = '36px';
+ div.style.padding = '0px';
+ div.style.cursor = 'default';
+ div.style.minWidth = '300px';
+
+ this.userPanel = div;
+ }
+
+ if (this.userPanel.parentNode != null)
+ {
+ this.userPanel.parentNode.removeChild(this.userPanel);
+ }
+ else
+ {
+ var connected = false;
+ this.userPanel.innerText = '';
+
+ var img = document.createElement('img');
+
+ img.setAttribute('src', Dialog.prototype.closeImage);
+ img.setAttribute('title', mxResources.get('close'));
+ img.className = 'geDialogClose';
+ img.style.top = '8px';
+ img.style.right = '8px';
+
+ mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+ {
+ if (this.userPanel.parentNode != null)
+ {
+ this.userPanel.parentNode.removeChild(this.userPanel);
+ }
+ }));
+
+ this.userPanel.appendChild(img);
+
+ if (this.drive != null)
+ {
+ var driveUsers = this.drive.getUsersList();
+
+ if (driveUsers.length > 0)
+ {
+ // LATER: Cannot change user while file is open since close will not work with new
+ // credentials and closing the file using fileLoaded(null) will show splash dialog.
+ var closeFile = mxUtils.bind(this, function(callback, spinnerMsg)
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == DriveFile)
+ {
+ this.spinner.spin(document.body, spinnerMsg);
+
+// file.close();
+ this.fileLoaded(null);
+
+ // LATER: Use callback to wait for thumbnail update
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.spinner.stop();
+ callback();
+ }), 2000);
+ }
+ else
+ {
+ callback();
+ }
+ });
+
+ var createUserRow = mxUtils.bind(this, function (user)
+ {
+ var tr = document.createElement('tr');
+ tr.setAttribute('title', 'User ID: ' + user.id);
+
+ var td = document.createElement('td');
+ td.setAttribute('valig', 'middle');
+ td.style.height = '59px';
+ td.style.width = '66px';
+
+ var img = document.createElement('img');
+ img.setAttribute('width', '50');
+ img.setAttribute('height', '50');
+ img.setAttribute('border', '0');
+ img.setAttribute('src', (user.pictureUrl != null) ? user.pictureUrl : this.defaultUserPicture);
+ img.style.borderRadius = '50%';
+ img.style.margin = '4px 8px 0 8px';
+ td.appendChild(img);
+ tr.appendChild(td);
+
+ var td = document.createElement('td');
+ td.setAttribute('valign', 'middle');
+ td.style.whiteSpace = 'nowrap';
+ td.style.paddingTop = '4px';
+ td.style.maxWidth = '0';
+ td.style.overflow = 'hidden';
+ td.style.textOverflow = 'ellipsis';
+ mxUtils.write(td, user.displayName +
+ ((user.isCurrent && driveUsers.length > 1) ?
+ ' (' + mxResources.get('default') + ')' : ''));
+
+ if (user.email != null)
+ {
+ mxUtils.br(td);
+
+ var small = document.createElement('small');
+ small.style.color = 'gray';
+ mxUtils.write(small, user.email);
+ td.appendChild(small);
+ }
+
+ var div = document.createElement('div');
+ div.style.marginTop = '4px';
+
+ var i = document.createElement('i');
+ mxUtils.write(i, mxResources.get('googleDrive'));
+ div.appendChild(i);
+ td.appendChild(div);
+ tr.appendChild(td);
+
+ if (!user.isCurrent)
+ {
+ tr.style.cursor = 'pointer';
+ tr.style.opacity = '0.3';
+
+ mxEvent.addListener(tr, 'click', mxUtils.bind(this, function(evt)
+ {
+ closeFile(mxUtils.bind(this, function()
+ {
+ this.stateArg = null;
+ this.drive.setUser(user);
+
+ this.drive.authorize(true, mxUtils.bind(this, function()
+ {
+ this.setMode(App.MODE_GOOGLE);
+ this.hideDialog();
+ this.showSplash();
+ }), mxUtils.bind(this, function(resp)
+ {
+ this.handleError(resp);
+ }), true); //Remember is true since add account imply keeping that account
+ }), mxResources.get('closingFile') + '...');
+
+ mxEvent.consume(evt);
+ }));
+ }
+
+ return tr;
+ });
+
+ connected = true;
+
+ var driveUserTable = document.createElement('table');
+ driveUserTable.style.borderSpacing = '0';
+ driveUserTable.style.fontSize = '10pt';
+ driveUserTable.style.width = '100%';
+ driveUserTable.style.padding = '10px';
+
+ for (var i = 0; i < driveUsers.length; i++)
+ {
+ driveUserTable.appendChild(createUserRow(driveUsers[i]));
+ }
+
+ this.userPanel.appendChild(driveUserTable);
+
+ var div = document.createElement('div');
+ div.style.textAlign = 'left';
+ div.style.padding = '10px';
+ div.style.whiteSpace = 'nowrap';
+ div.style.borderTop = '1px solid rgb(224, 224, 224)';
+
+ var btn = mxUtils.button(mxResources.get('signOut'), mxUtils.bind(this, function()
+ {
+ this.confirm(mxResources.get('areYouSure'), mxUtils.bind(this, function()
+ {
+ closeFile(mxUtils.bind(this, function()
+ {
+ this.stateArg = null;
+ this.drive.logout();
+ this.setMode(App.MODE_GOOGLE);
+ this.hideDialog();
+ this.showSplash();
+ }), mxResources.get('signOut'));
+ }));
+ }));
+ btn.className = 'geBtn';
+ btn.style.float = 'right';
+ div.appendChild(btn);
+
+ var btn = mxUtils.button(mxResources.get('addAccount'), mxUtils.bind(this, function()
+ {
+ var authWin = this.drive.createAuthWin();
+ //FIXME This doean't work to set focus back to main window until closing the file is done
+ authWin.blur();
+ window.focus();
+
+ closeFile(mxUtils.bind(this, function()
+ {
+ this.stateArg = null;
+
+ this.drive.authorize(false, mxUtils.bind(this, function()
+ {
+ this.setMode(App.MODE_GOOGLE);
+ this.hideDialog();
+ this.showSplash();
+ }), mxUtils.bind(this, function(resp)
+ {
+ this.handleError(resp);
+ }), true, authWin); //Remember is true since add account imply keeping that account
+ }), mxResources.get('closingFile') + '...');
+ }));
+ btn.className = 'geBtn';
+ btn.style.margin = '0px';
+ div.appendChild(btn);
+ this.userPanel.appendChild(div);
+ }
+ }
+
+ var addUser = mxUtils.bind(this, function(user, logo, logout, label)
+ {
+ if (user != null)
+ {
+ if (connected)
+ {
+ this.userPanel.appendChild(document.createElement('hr'));
+ }
+
+ connected = true;
+ var userTable = document.createElement('table');
+ userTable.style.borderSpacing = '0';
+ userTable.style.fontSize = '10pt';
+ userTable.style.width = '100%';
+ userTable.style.padding = '10px';
+
+ var tbody = document.createElement('tbody');
+ var row = document.createElement('tr');
+ var td = document.createElement('td');
+ td.setAttribute('valig', 'top');
+ td.style.width = '40px';
+
+ if (logo != null)
+ {
+ var img = document.createElement('img');
+ img.setAttribute('width', '40');
+ img.setAttribute('height', '40');
+ img.setAttribute('border', '0');
+ img.setAttribute('src', logo);
+ img.style.marginRight = '6px';
+
+ td.appendChild(img);
+ }
+
+ row.appendChild(td);
+
+ var td = document.createElement('td');
+ td.setAttribute('valign', 'middle');
+ td.style.whiteSpace = 'nowrap';
+ td.style.maxWidth = '0';
+ td.style.overflow = 'hidden';
+ td.style.textOverflow = 'ellipsis';
+
+ mxUtils.write(td, user.displayName);
+
+ if (user.email != null)
+ {
+ mxUtils.br(td);
+
+ var small = document.createElement('small');
+ small.style.color = 'gray';
+ mxUtils.write(small, user.email);
+ td.appendChild(small);
+ }
+
+ if (label != null)
+ {
+ var div = document.createElement('div');
+ div.style.marginTop = '4px';
+
+ var i = document.createElement('i');
+ mxUtils.write(i, label);
+ div.appendChild(i);
+ td.appendChild(div);
+ }
+
+ row.appendChild(td);
+ tbody.appendChild(row);
+ userTable.appendChild(tbody);
+
+ this.userPanel.appendChild(userTable);
+ var div = document.createElement('div');
+ div.style.textAlign = 'center';
+ div.style.padding = '10px';
+ div.style.whiteSpace = 'nowrap';
+
+ if (logout != null)
+ {
+ var btn = mxUtils.button(mxResources.get('signOut'), logout);
+ btn.className = 'geBtn';
+ div.appendChild(btn);
+ }
+
+ this.userPanel.appendChild(div);
+ }
+ });
+
+ if (this.dropbox != null)
+ {
+ addUser(this.dropbox.getUser(), IMAGE_PATH + '/dropbox-logo.svg', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == DropboxFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.dropbox.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.dropbox.logout();
+ }
+ }), mxResources.get('dropbox'));
+ }
+
+ if (this.oneDrive != null)
+ {
+ addUser(this.oneDrive.getUser(), IMAGE_PATH + '/onedrive-logo.svg', this.oneDrive.noLogout? null : mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == OneDriveFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.oneDrive.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.oneDrive.logout();
+ }
+ }), mxResources.get('oneDrive'));
+ }
+
+ if (this.gitHub != null)
+ {
+ addUser(this.gitHub.getUser(), IMAGE_PATH + '/github-logo.svg', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == GitHubFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.gitHub.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.gitHub.logout();
+ }
+ }), mxResources.get('github'));
+ }
+
+ if (this.gitLab != null)
+ {
+ addUser(this.gitLab.getUser(), IMAGE_PATH + '/gitlab-logo.svg', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == GitLabFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.gitLab.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.gitLab.logout();
+ }
+ }), mxResources.get('gitlab'));
+ }
+
+ //TODO We have no user info from Trello, how we can create a user?
+ if (this.trello != null)
+ {
+ addUser(this.trello.getUser(), IMAGE_PATH + '/trello-logo.svg', mxUtils.bind(this, function()
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.constructor == TrelloFile)
+ {
+ var doLogout = mxUtils.bind(this, function()
+ {
+ this.trello.logout();
+ window.location.hash = '';
+ });
+
+ if (!file.isModified())
+ {
+ doLogout();
+ }
+ else
+ {
+ this.confirm(mxResources.get('allChangesLost'), null, doLogout,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
+ }
+ else
+ {
+ this.trello.logout();
+ }
+ }), mxResources.get('trello'));
+ }
+
+ if (uiTheme == 'min')
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ {
+ var div = document.createElement('div');
+ div.style.padding = '10px';
+ div.style.whiteSpace = 'nowrap';
+ div.style.borderTop = '1px solid rgb(224, 224, 224)';
+ div.style.marginTop = '4px';
+ div.style.textAlign = 'center';
+ div.style.padding = '10px';
+ div.style.fontSize = '9pt';
+ var err = file.getRealtimeError();
+ var state = file.getRealtimeState();
+
+ if (state != 1)
+ {
+ mxUtils.write(div, mxResources.get('realtimeCollaboration') + ': ' +
+ ((err != null && err.message != null) ?
+ err.message : mxResources.get('disconnected')));
+ this.userPanel.appendChild(div);
+ }
+ }
+ }
+
+ document.body.appendChild(this.userPanel);
+ }
+
+ mxEvent.consume(evt);
+ }));
+
+ mxEvent.addListener(document.body, 'click', mxUtils.bind(this, function(evt)
+ {
+ if (!mxEvent.isConsumed(evt) && this.userPanel != null && this.userPanel.parentNode != null)
+ {
+ this.userPanel.parentNode.removeChild(this.userPanel);
+ }
+ }));
+
return elt;
};
-
+
//TODO Use this function to get the currently logged in user
App.prototype.getCurrentUser = function()
{
@@ -7785,7 +7792,8 @@ App.prototype.getCurrentUser = function()
//TODO Trello no user issue
return user;
-}
+};
+
/**
* Override depends on mxSettings which is not defined in the minified viewer.
*/
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index 6a895b9d..637383b4 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -31,9 +31,9 @@ if (!mxIsElectron && location.protocol !== 'http:')
//---------------------------------------------------------//
'; ';
- var styleHashes = '\'sha256-JjkxVHHCCVO0nllPD6hU8bBYSlsikA8TM/o3fhr0bas=\' ' + // index.html
- '\'sha256-8bAFhdIVH8/EjuHhNVZCG8isp9LZEPSQ23SJ7e54VWI=\' ' + // Minimal.js/Light
- '\'sha256-fSmyKEwMytIGzQ+V1A8gi8iNvdN+rLOrqJvCL179k8Q=\' ' + // Minimal.js/Dark
+ var styleHashes = '\'sha256-pVoUz0B9cDvBP/6KP+5uOMqPh1c14hF0KFqSELqeyNQ=\' ' + // index.html
+ '\'sha256-BQGhEU60vmf18K8QE+zptQ8TcrOlYdgSrnP4l6mBG7o=\' ' + // Minimal.js/Light
+ '\'sha256-lWJz8BSQdD8MyBxQ2ENWc5uVhHlYKn+e9VsLpWu1tbg=\' ' + // Minimal.js/Dark
'\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
'\'sha256-kuk5TvxZ/Kwuobo4g6uasb1xRQwr1+nfa1A3YGePO7U=\' ' + // MathJax
'\'sha256-ByOXYIXIkfNC3flUR/HoxR4Ak0pjOEF1q8XmtuIa6po=\' ' + // purify.min.js
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 9b318d5b..0deb37ba 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -47,6 +47,13 @@
{ext: 'svg', title: 'filetypeSvg'}];
/**
+ * Definitions for sketch font styles.
+ */
+ Editor.sketchFontFamily = 'Architects Daughter';
+ Editor.sketchFontSource = 'https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter';
+ Editor.sketchFonts = [{'fontFamily': Editor.sketchFontFamily, 'fontUrl': decodeURIComponent(Editor.sketchFontSource)}];
+
+ /**
*
*/
Editor.styles = [{},
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index dd14279c..4ecc9f88 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -3804,10 +3804,6 @@
mxConstants.DROP_TARGET_COLOR = '#00ff00';
}
- Editor.sketchFontFamily = 'Architects Daughter';
- Editor.sketchFontSource = 'https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter';
- Editor.sketchFonts = [{'fontFamily': Editor.sketchFontFamily, 'fontUrl': decodeURIComponent(Editor.sketchFontSource)}];
-
// Implements the sketch-min UI
if (urlParams['sketch'] == '1')
{
@@ -3830,7 +3826,10 @@
}
};
- EditorUi.initTheme();
+ if (urlParams['live-ui'] != '1')
+ {
+ EditorUi.initTheme();
+ }
/**
* Overrides image dialog to add image search and Google+.
@@ -9689,7 +9688,7 @@
href = source.getAttribute('href');
}
}
-
+
if (href != null && graph.isCustomLink(href) &&
(mxEvent.isTouchEvent(evt) ||
!mxEvent.isPopupTrigger(evt)) &&
@@ -9865,6 +9864,7 @@
this.keyHandler.bindAction(70, false, 'insertEllipse'); // F
this.keyHandler.bindAction(67, false, 'insertEdge'); // C
this.keyHandler.bindAction(88, false, 'insertFreehand'); // X
+ this.keyHandler.bindAction(75, true, 'toggleShapes', true); // Ctrl+Shift+K
this.altShiftActions[83] = 'synchronize'; // Alt+Shift+S
this.installImagePasteHandler();
@@ -10278,14 +10278,13 @@
graph.refresh();
graph.view.validateBackground();
this.updateTabContainer();
+ this.hideShapePicker();
});
this.addListener('darkModeChanged', themeChangeListener);
this.addListener('sketchModeChanged', themeChangeListener);
-
this.addListener('currentThemeChanged', mxUtils.bind(this, function()
{
- this.updateUserElement();
this.refresh();
}));
@@ -10294,7 +10293,8 @@
this.doSetDarkMode(true);
this.fireEvent(new mxEventObject('darkModeChanged'));
}
- else if (uiTheme == 'min' && urlParams['embedInline'] != '1')
+ else if (urlParams['live-ui'] == '1' || (uiTheme == 'min' &&
+ urlParams['embedInline'] != '1'))
{
this.doSetDarkMode((urlParams['dark'] != null) ?
urlParams['dark'] == 1 && !mxClient.IS_IE &&
@@ -10598,7 +10598,7 @@
/**
* Changes the current UI theme.
*/
- EditorUi.prototype.doSetCurrentTheme = function(value)
+ EditorUi.prototype.doSetCurrentTheme = function(value, delay)
{
function isDefault(theme)
{
@@ -10627,9 +10627,14 @@
var x = this.editor.graph.container.scrollLeft - off.x;
var y = this.editor.graph.container.scrollTop - off.y;
- var delay = 100;
+ delay = (delay != null) ? delay : 100;
mxUtils.setPrefixedStyle(this.container.style, 'transition', 'all ' + delay + 'ms');
+ if (delay == 0)
+ {
+ this.container.style.opacity = '0';
+ }
+
window.setTimeout(mxUtils.bind(this, function()
{
this.container.style.opacity = '0';
@@ -10686,12 +10691,15 @@
return transition;
};
-
+
/**
* Overrides image dialog to add image search and Google+.
*/
EditorUi.prototype.switchTheme = function(value)
{
+ this.destroyWindows();
+ this.updateUserElement();
+ this.updateDefaultStyles();
this.switchThemeConstants(value);
this.switchCssForTheme(value);
this.createWrapperForTheme(value);
@@ -10824,7 +10832,10 @@
*/
EditorUi.prototype.switchThemeConstants = function(value)
{
- this.destroyWindows();
+ var graph = this.editor.graph;
+ graph.defaultEdgeLength = Graph.prototype.defaultEdgeLength;
+ graph.defaultGridEnabled = Graph.prototype.defaultGridEnabled;
+ graph.defaultPageVisible = Graph.prototype.defaultPageVisible;
if (value == 'sketch')
{
@@ -10834,12 +10845,26 @@
'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage = Graph.createSvgImage(14, 10,
'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
+ Editor.fitWindowBorders = new mxRectangle(60, 30, 30, 30);
+
+ graph.defaultEdgeLength = 120;
+
+ if (urlParams['grid'] == null)
+ {
+ graph.defaultGridEnabled = false;
+ }
+
+ if (urlParams['pv'] == null)
+ {
+ graph.defaultPageVisible = false;
+ }
}
else
{
mxWindow.prototype.closeImage = mxClient.imageBasePath + '/close.gif';
mxWindow.prototype.minimizeImage = mxClient.imageBasePath + '/minimize.gif';
mxWindow.prototype.normalizeImage = mxClient.imageBasePath + '/normalize.gif';
+ Editor.fitWindowBorders = null;
}
};
@@ -10939,7 +10964,7 @@
{
this.sketchFooterMenuElt = document.createElement('div');
this.sketchFooterMenuElt.className = 'geToolbarContainer';
- this.sketchFooterMenuElt.style.cssText = 'position:absolute;right:14px;bottom:14px;height:44px;' +
+ this.sketchFooterMenuElt.style.cssText = 'position:absolute;right:12px;bottom:12px;height:44px;' +
'border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;' +
'text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;';
@@ -11227,12 +11252,18 @@
{
this.sketchMenubarElt = document.createElement('div');
this.sketchMenubarElt.className = 'geToolbarContainer';
- this.sketchMenubarElt.style.cssText = 'position:absolute;right:14px;top:10px;height:44px;' +
+ this.sketchMenubarElt.style.cssText = 'position:absolute;right:12px;top:10px;height:44px;' +
'border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;' +
'text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;';
this.sketchWrapperElt.appendChild(this.sketchMenubarElt);
}
+ if (this.statusContainer != null)
+ {
+ this.sketchMenubarElt.appendChild(this.statusContainer);
+ this.statusContainer.style.marginTop = '4px';
+ }
+
if (this.userElement != null)
{
this.sketchMenubarElt.appendChild(this.userElement);
@@ -11253,6 +11284,12 @@
}
else
{
+ if (this.statusContainer != null)
+ {
+ this.menubar.container.appendChild(this.statusContainer);
+ this.statusContainer.style.marginTop = '';
+ }
+
if (this.userElement != null)
{
this.menubarContainer.appendChild(this.userElement);
@@ -11397,6 +11434,72 @@
};
/**
+ *
+ */
+ var editorUiToggleFormatPanel = EditorUi.prototype.toggleFormatPanel;
+
+ EditorUi.prototype.toggleFormatPanel = function(visible)
+ {
+ var wnd = this.formatWindow;
+
+ if (wnd != null)
+ {
+ wnd.window.setVisible((visible != null) ? visible :
+ !this.isFormatPanelVisible());
+ }
+ else
+ {
+ editorUiToggleFormatPanel.apply(this, arguments);
+ }
+ };
+
+ /**
+ *
+ */
+ var editorUiIsFormatPanelVisible = EditorUi.prototype.isFormatPanelVisible;
+
+ EditorUi.prototype.isFormatPanelVisible = function()
+ {
+ var wnd = this.formatWindow;
+
+ if (wnd != null)
+ {
+ return wnd.window.isVisible();
+ }
+ else
+ {
+ return editorUiIsFormatPanelVisible.apply(this, arguments);
+ }
+ };
+
+ var editorUiRefresh = EditorUi.prototype.refresh;
+
+ /**
+ * Changes refresh to only update the diagram container in sketch mode.
+ */
+ EditorUi.prototype.refresh = function(sizeDidChange)
+ {
+ if (this.sketchWrapperElt != null && this.sketchWrapperElt.parentNode != null)
+ {
+ sizeDidChange = (sizeDidChange != null) ? sizeDidChange : true;
+
+ this.diagramContainer.style.left = '0';
+ this.diagramContainer.style.top = '0';
+ this.diagramContainer.style.right = '0';
+ this.diagramContainer.style.bottom = '0';
+
+ if (sizeDidChange)
+ {
+ this.editor.graph.sizeDidChange();
+ }
+ }
+ else
+ {
+ editorUiRefresh.apply(this, arguments);
+ }
+ };
+
+ /**
* Overrides image dialog to add image search and Google+.
*/
EditorUi.prototype.createShapesWindow = function()
@@ -11739,51 +11842,87 @@
{
if (Editor.sketchMode != value)
{
- var graph = this.editor.graph;
Editor.sketchMode = value;
+ this.updateDefaultStyles();
+ }
+ };
- function setStyle(style, key, value)
- {
- if (style[key] == null)
- {
- style[key] = value;
- }
- };
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.updateDefaultStyles = function()
+ {
+ function setStyle(style, key, value)
+ {
+ style[key] = value;
+ };
+
+ var graph = this.editor.graph;
+ graph.defaultVertexStyle = mxUtils.clone(Graph.prototype.defaultVertexStyle);
+ graph.defaultEdgeStyle = mxUtils.clone(Graph.prototype.defaultEdgeStyle);
+
+ if (Editor.sketchMode)
+ {
+ this.menus.defaultFontSize = 20;
+ }
+ else if (Editor.currentTheme == 'sketch')
+ {
+ this.menus.defaultFontSize = 16;
+ }
+ else
+ {
+ this.menus.defaultFontSize = Menus.prototype.defaultFontSize;
+ }
- this.menus.defaultFontSize = (value) ? 20 : 16;
- graph.defaultVertexStyle = mxUtils.clone(Graph.prototype.defaultVertexStyle);
- setStyle(graph.defaultVertexStyle, 'fontSize', this.menus.defaultFontSize);
+ if (this.menus.defaultFontSize == Menus.prototype.defaultFontSize)
+ {
+ setStyle(graph.defaultEdgeStyle, 'fontSize', null);
+ setStyle(graph.defaultVertexStyle, 'fontSize', null);
+ }
+ else
+ {
+ setStyle(graph.defaultVertexStyle, 'fontSize', this.menus.defaultFontSize);
+ setStyle(graph.defaultEdgeStyle, 'fontSize', parseInt(this.menus.defaultFontSize) - 4);
+ }
- graph.defaultEdgeStyle = mxUtils.clone(Graph.prototype.defaultEdgeStyle);
- setStyle(graph.defaultEdgeStyle, 'fontSize', this.menus.defaultFontSize - 4);
+ if (Editor.currentTheme == 'sketch')
+ {
setStyle(graph.defaultEdgeStyle, 'edgeStyle', 'none');
- setStyle(graph.defaultEdgeStyle, 'rounded', '0');
setStyle(graph.defaultEdgeStyle, 'curved', '1');
+ setStyle(graph.defaultEdgeStyle, 'rounded', '0');
setStyle(graph.defaultEdgeStyle, 'jettySize', 'auto');
setStyle(graph.defaultEdgeStyle, 'orthogonalLoop', '1');
setStyle(graph.defaultEdgeStyle, 'endArrow', 'open');
setStyle(graph.defaultEdgeStyle, 'endSize', '14');
setStyle(graph.defaultEdgeStyle, 'startSize', '14');
-
- if (value)
- {
- setStyle(graph.defaultVertexStyle, 'fontFamily', Editor.sketchFontFamily);
- setStyle(graph.defaultVertexStyle, 'fontSource', Editor.sketchFontSource);
- setStyle(graph.defaultVertexStyle, 'hachureGap', '4');
- setStyle(graph.defaultVertexStyle, 'sketch', '1');
+ setStyle(graph.defaultEdgeStyle, 'sourcePerimeterSpacing', '8');
+ setStyle(graph.defaultEdgeStyle, 'targetPerimeterSpacing', '8');
+ }
- setStyle(graph.defaultEdgeStyle, 'fontFamily', Editor.sketchFontFamily);
- setStyle(graph.defaultEdgeStyle, 'fontSource', Editor.sketchFontSource);
- setStyle(graph.defaultEdgeStyle, 'sketch', '1');
- setStyle(graph.defaultEdgeStyle, 'hachureGap', '4');
- setStyle(graph.defaultEdgeStyle, 'sourcePerimeterSpacing', '8');
- setStyle(graph.defaultEdgeStyle, 'targetPerimeterSpacing', '8');
- }
+ if (Editor.sketchMode)
+ {
+ this.menus.defaultFonts = Menus.prototype.defaultFonts.concat(Editor.sketchFonts);
+
+ setStyle(graph.defaultVertexStyle, 'fontFamily', Editor.sketchFontFamily);
+ setStyle(graph.defaultVertexStyle, 'fontSource', Editor.sketchFontSource);
+ setStyle(graph.defaultVertexStyle, 'hachureGap', '4');
+ setStyle(graph.defaultVertexStyle, 'sketch', '1');
+ setStyle(graph.defaultVertexStyle, 'jiggle', '2');
- graph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
- graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
- this.clearDefaultStyle();
+ setStyle(graph.defaultEdgeStyle, 'fontFamily', Editor.sketchFontFamily);
+ setStyle(graph.defaultEdgeStyle, 'fontSource', Editor.sketchFontSource);
+ setStyle(graph.defaultEdgeStyle, 'sketch', '1');
+ setStyle(graph.defaultEdgeStyle, 'jiggle', '2');
+ setStyle(graph.defaultEdgeStyle, 'hachureGap', '4');
}
+ else
+ {
+ this.menus.defaultFonts = Menus.prototype.defaultFonts;
+ }
+
+ graph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
+ graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
+ this.clearDefaultStyle();
};
/**
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index f7cc7908..51d74599 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -314,6 +314,22 @@
toggleDarkModeAction.setToggleAction(true);
toggleDarkModeAction.setSelectedCallback(function() { return Editor.isDarkMode(); });
+ var toggleSimpleModeAction = editorUi.actions.put('toggleSimpleMode', new Action(mxResources.get('simple'), function(e)
+ {
+ editorUi.setCurrentTheme((Editor.currentTheme == 'sketch') ? '' : 'sketch');
+ }));
+
+ toggleSimpleModeAction.setToggleAction(true);
+ toggleSimpleModeAction.setSelectedCallback(function() { return Editor.currentTheme == 'sketch'; });
+
+ var toggleSketchModeAction = editorUi.actions.put('toggleSketchMode', new Action(mxResources.get('sketch'), function(e)
+ {
+ editorUi.setSketchMode(!Editor.sketchMode);
+ }));
+
+ toggleSketchModeAction.setToggleAction(true);
+ toggleSketchModeAction.setSelectedCallback(function() { return Editor.sketchMode; });
+
editorUi.actions.addAction('properties...', function()
{
var dlg = new FilePropertiesDialog(editorUi);
@@ -2892,16 +2908,8 @@
{
this.addMenuItems(menu, ['toggleDarkMode'], parent);
}
-
- var item = menu.addItem(mxResources.get('simple'), null, function()
- {
- editorUi.setCurrentTheme((Editor.currentTheme == 'sketch') ? '' : 'sketch');
- }, parent);
- if (Editor.currentTheme == 'sketch')
- {
- menu.addCheckmark(item, Editor.checkmarkImage);
- }
+ this.addMenuItems(menu, ['toggleSimpleMode', 'toggleSketchMode', 'fullscreen'], parent);
})));
this.put('theme', new Menu(mxUtils.bind(this, function(menu, parent)
@@ -3351,22 +3359,6 @@
}
}, null, null, 'C')).isEnabled = isGraphEnabled;
- var toggleFormat = editorUi.actions.put('toggleFormat', new Action(mxResources.get('format'), function()
- {
- if (editorUi.formatWindow != null)
- {
- editorUi.formatWindow.window.setVisible(
- !editorUi.formatWindow.window.isVisible());
- }
- }));
-
- toggleFormat.shortcut = editorUi.actions.get('formatPanel').shortcut;
- toggleFormat.setToggleAction(true);
- toggleFormat.setSelectedCallback(mxUtils.bind(this, function()
- {
- return editorUi.formatWindow != null && editorUi.formatWindow.window.isVisible();
- }));
-
var toggleShapes = editorUi.actions.put('toggleShapes', new Action(mxResources.get('shapes'), function()
{
if (editorUi.sidebarWindow != null)
@@ -3374,9 +3366,14 @@
editorUi.sidebarWindow.window.setVisible(
!editorUi.sidebarWindow.window.isVisible());
}
- }));
+ else
+ {
+ editorUi.hsplitPosition = (editorUi.hsplitPosition == 0) ?
+ EditorUi.prototype.hsplitPosition : 0;
+ editorUi.refresh();
+ }
+ }, null, null, Editor.ctrlKey + '+Shift+K'));
- toggleShapes.shortcut = editorUi.actions.get('formatPanel').shortcut;
toggleShapes.setToggleAction(true);
toggleShapes.setSelectedCallback(mxUtils.bind(this, function()
{
@@ -3976,7 +3973,7 @@
// Overrides view menu to add search and scratchpad
this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ((this.editorUi.format != null) ? ['formatPanel'] : []).
+ this.addMenuItems(menu, ((this.editorUi.format != null) ? ['format'] : []).
concat(['outline', 'layers', 'tags']).concat((editorUi.commentsSupported()) ?
['comments', '-'] : ['-']));
@@ -4007,7 +4004,7 @@
if (urlParams['sketch'] != '1')
{
- this.addMenuItems(menu, ['-', 'fullscreen'], parent);
+ this.addMenuItems(menu, ['-', 'fullscreen'], parent);
}
})));
@@ -4361,7 +4358,7 @@
editorUi.menus.addMenuItems(menu, ['comments', '-'], parent);
}
- editorUi.menus.addMenuItems(menu, ['toggleFormat', 'layers', 'tags', '-', 'pageSetup'], parent);
+ editorUi.menus.addMenuItems(menu, ['format', 'layers', 'tags', '-', 'pageSetup'], parent);
// Cannot use print in standalone mode on iOS as we cannot open new windows
if (urlParams['noFileMenu'] != '1' && (!mxClient.IS_IOS || !navigator.standalone))
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 7817a090..115a83b5 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1,4 +1,14 @@
/**
+ * Uses live UI theme switching for sketch mode.
+ */
+if (urlParams['live-ui'] == '1' && uiTheme == 'min' &&
+ urlParams['sketch'] == '1')
+{
+ Editor.currentTheme = 'sketch';
+ uiTheme = 'kennedy';
+}
+
+/**
* Testing dockable windows.
*/
EditorUi.windowed = urlParams['windows'] != '0';
@@ -37,7 +47,7 @@ EditorUi.initMinimalTheme = function()
if (ui.formatWindow == null)
{
var x = (urlParams['sketch'] == '1') ?
- Math.max(10, ui.diagramContainer.clientWidth - 241) :
+ Math.max(10, ui.diagramContainer.clientWidth - 244) :
Math.max(10, ui.diagramContainer.clientWidth - 248);
var y = urlParams['winCtrls'] == '1' && urlParams['sketch'] == '1'? 80 : 60;
var h = (urlParams['embedInline'] == '1') ? 580 :
@@ -612,6 +622,12 @@ EditorUi.initMinimalTheme = function()
toggleFormat(this);
}
};
+
+ EditorUi.prototype.isFormatPanelVisible = function()
+ {
+ return this.formatWindow != null &&
+ this.formatWindow.window.isVisible();
+ };
DiagramFormatPanel.prototype.isMathOptionVisible = function()
{
@@ -685,18 +701,6 @@ EditorUi.initMinimalTheme = function()
toggleShapes(ui);
}, null, null, Editor.ctrlKey + '+Shift+K'));
- var action = ui.actions.put('toggleFormat', new Action(mxResources.get('format'), function()
- {
- toggleFormat(ui);
- }));
-
- action.shortcut = ui.actions.get('formatPanel').shortcut;
- action.setToggleAction(true);
- action.setSelectedCallback(mxUtils.bind(this, function()
- {
- return ui.formatWindow != null && ui.formatWindow.window.isVisible();
- }));
-
if (EditorUi.enablePlantUml && !ui.isOffline())
{
ui.actions.put('plantUml', new Action(mxResources.get('plantUml') + '...', function()
@@ -928,10 +932,7 @@ EditorUi.initMinimalTheme = function()
mxUtils.fit(this.div);
}
};
-
- // Overrides insert ellipse shortcut
- this.keyHandler.bindAction(75, true, 'toggleShapes', true); // Ctrl+Shift+K
-
+
if (EditorUi.windowed && (urlParams['sketch'] == '1' || iw >= 1000))
{
if (urlParams['embedInline'] != '1')
@@ -1855,13 +1856,13 @@ EditorUi.initMinimalTheme = function()
}
ui.tabContainer.style.visibility = 'hidden';
- menubar.style.cssText = 'position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;' +
+ menubar.style.cssText = 'position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;' +
'box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;' +
'text-align:right;white-space:nowrap;overflow:hidden;user-select:none;';
toolbar.style.cssText = 'position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;' +
'box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;' +
'text-align:right;white-space:nowrap;overflow:hidden;user-select:none;';
- footer.style.cssText = 'position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;' +
+ footer.style.cssText = 'position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;' +
'box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;';
wrapper.appendChild(toolbar);
wrapper.appendChild(footer);
@@ -2014,8 +2015,8 @@ EditorUi.initMinimalTheme = function()
createGroup([appElt, addMenuItem(mxResources.get('shapes'), ui.actions.get('toggleShapes').funct, null,
mxResources.get('shapes'), ui.actions.get('image'), (small) ? Editor.shapesImage : null),
- addMenuItem(mxResources.get('format'), ui.actions.get('toggleFormat').funct, null,
- mxResources.get('format') + ' (' + ui.actions.get('formatPanel').shortcut + ')', ui.actions.get('image'),
+ addMenuItem(mxResources.get('format'), ui.actions.get('format').funct, null,
+ mxResources.get('format') + ' (' + ui.actions.get('format').shortcut + ')', ui.actions.get('image'),
(small) ? Editor.formatImage : null)],
(small) ? 60 : null);
diff --git a/src/main/webapp/js/grapheditor/Actions.js b/src/main/webapp/js/grapheditor/Actions.js
index 2a65da28..c6c2a986 100644
--- a/src/main/webapp/js/grapheditor/Actions.js
+++ b/src/main/webapp/js/grapheditor/Actions.js
@@ -1826,12 +1826,12 @@ Actions.prototype.init = function()
}), null, null, Editor.ctrlKey + '+Shift+L');
action.setToggleAction(true);
action.setSelectedCallback(mxUtils.bind(this, function() { return this.layersWindow != null && this.layersWindow.window.isVisible(); }));
- action = this.addAction('formatPanel', mxUtils.bind(this, function()
+ action = this.addAction('format', mxUtils.bind(this, function()
{
ui.toggleFormatPanel();
}), null, null, Editor.ctrlKey + '+Shift+P');
action.setToggleAction(true);
- action.setSelectedCallback(mxUtils.bind(this, function() { return ui.formatWidth > 0; }));
+ action.setSelectedCallback(mxUtils.bind(this, function() { return ui.isFormatPanelVisible(); }));
action = this.addAction('outline', mxUtils.bind(this, function()
{
if (this.outlineWindow == null)
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 2da5f561..42d6977e 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -2577,7 +2577,8 @@ var WrapperWindow = function(editorUi, title, x, y, w, h, fn)
mxGraphView.prototype.validateBackgroundStyles = function()
{
var graph = this.graph;
- var color = (graph.background == null || graph.background == mxConstants.NONE) ? graph.defaultPageBackgroundColor : graph.background;
+ var color = (graph.background == null || graph.background == mxConstants.NONE) ?
+ graph.defaultPageBackgroundColor : graph.background;
var gridColor = (color != null && this.gridColor != color.toLowerCase()) ? this.gridColor : '#ffffff';
var image = 'none';
var position = '';
@@ -2632,13 +2633,31 @@ var WrapperWindow = function(editorUi, title, x, y, w, h, fn)
graph.container.className = 'geDiagramContainer geDiagramBackdrop';
canvas.style.backgroundImage = 'none';
canvas.style.backgroundColor = '';
+
+ if (!Editor.isDarkMode() && Editor.currentTheme == 'sketch')
+ {
+ graph.container.style.backgroundColor = graph.sketchBackgroundColor;
+ }
+ else
+ {
+ graph.container.style.backgroundColor = '';
+ }
}
else
{
graph.container.className = 'geDiagramContainer';
canvas.style.backgroundPosition = position;
- canvas.style.backgroundColor = color;
canvas.style.backgroundImage = image;
+
+ if ((graph.background == null || graph.background == mxConstants.NONE) &&
+ !Editor.isDarkMode() && Editor.currentTheme == 'sketch')
+ {
+ canvas.style.backgroundColor = graph.sketchBackgroundColor;
+ }
+ else
+ {
+ canvas.style.backgroundColor = color;
+ }
}
};
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 224ee00d..c4a16890 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -3433,6 +3433,14 @@ EditorUi.prototype.toggleFormatPanel = function(visible)
};
/**
+ *
+ */
+EditorUi.prototype.isFormatPanelVisible = function()
+{
+ return this.formatWidth > 0;
+};
+
+/**
* Adds support for placeholders in labels.
*/
EditorUi.prototype.lightboxFit = function(maxHeight)
@@ -4296,17 +4304,6 @@ EditorUi.prototype.getDiagramContainerOffset = function()
*/
EditorUi.prototype.refresh = function(sizeDidChange)
{
- if (this.formatContainer != null && this.formatContainer.parentNode != null &&
- this.formatContainer.parentNode.className != 'geEditor')
- {
- this.diagramContainer.style.left = '0';
- this.diagramContainer.style.top = '0';
- this.diagramContainer.style.right = '0';
- this.diagramContainer.style.bottom = '0';
-
- return;
- }
-
sizeDidChange = (sizeDidChange != null) ? sizeDidChange : true;
var w = this.container.clientWidth;
@@ -5931,7 +5928,7 @@ EditorUi.prototype.createKeyHandler = function(editor)
keyHandler.bindAction(73, true, 'italic'); // Ctrl+I
keyHandler.bindAction(76, true, 'lockUnlock'); // Ctrl+L
keyHandler.bindAction(76, true, 'layers', true); // Ctrl+Shift+L
- keyHandler.bindAction(80, true, 'formatPanel', true); // Ctrl+Shift+P
+ keyHandler.bindAction(80, true, 'format', true); // Ctrl+Shift+P
keyHandler.bindAction(85, true, 'underline'); // Ctrl+U
keyHandler.bindAction(85, true, 'ungroup', true); // Ctrl+Shift+U
keyHandler.bindAction(190, true, 'superscript'); // Ctrl+.
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index 8af1c452..ffe45cdb 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -341,7 +341,7 @@ Format.prototype.immediateRefresh = function()
mxEvent.addListener(img, 'click', function()
{
- ui.actions.get('formatPanel').funct();
+ ui.actions.get('format').funct();
});
div.appendChild(label2);
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index e660a594..794d2194 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -1747,14 +1747,21 @@ Graph.sanitizeHtml = function(value, editing)
/**
* Returns the size of the page format scaled with the page size.
*/
-Graph.sanitizeLink = function(href)
-{
- var a = document.createElement('a');
- a.setAttribute('href', href);
- Graph.sanitizeNode(a);
-
- return a.getAttribute('href');
-};
+ Graph.sanitizeLink = function(href)
+ {
+ if (href == null)
+ {
+ return null;
+ }
+ else
+ {
+ var a = document.createElement('a');
+ a.setAttribute('href', href);
+ Graph.sanitizeNode(a);
+
+ return a.getAttribute('href');
+ }
+ };
/**
* Sanitizes the given DOM node in-place.
@@ -1772,7 +1779,18 @@ DOMPurify.addHook('afterSanitizeAttributes', function(node)
(node.getAttribute('href') != null && !node.getAttribute('href').startsWith('#'))))
{
node.remove();
- }
+ }
+});
+
+// Workaround for removed content with empty nodes
+DOMPurify.addHook('uponSanitizeAttribute', function (node, evt)
+{
+ if (node.nodeName == 'svg' && evt.attrName == 'content')
+ {
+ evt.forceKeepAttr = true;
+ }
+
+ return node;
});
/**
@@ -1810,6 +1828,7 @@ Graph.clipSvgDataUri = function(dataUri, ignorePreserveAspect)
{
// Strips leading XML declaration and doctypes
div.innerHTML = Graph.sanitizeHtml(data.substring(idx));
+ //div.innerHTML = data.substring(idx);
// Gets the size and removes from DOM
var svgs = div.getElementsByTagName('svg');
@@ -2032,6 +2051,11 @@ Graph.prototype.defaultPageBackgroundColor = '#ffffff';
/**
*
*/
+Graph.prototype.sketchBackgroundColor = '#f0f0f0';
+
+/**
+ *
+ */
Graph.prototype.defaultPageBorderColor = '#ffffff';
/**
@@ -2975,6 +2999,12 @@ Graph.prototype.labelLinkClicked = function(state, elt, evt)
{
var href = elt.getAttribute('href');
+ // Blocks and removes unsafe links in labels
+ if (href != Graph.sanitizeLink(href))
+ {
+ Graph.sanitizeNode(elt);
+ }
+
if (href != null && !this.isCustomLink(href) && ((mxEvent.isLeftMouseButton(evt) &&
!mxEvent.isPopupTrigger(evt)) || mxEvent.isTouchEvent(evt)))
{
@@ -4539,7 +4569,7 @@ Graph.prototype.getIndexableText = function(cells)
{
if (this.isHtmlLabel(cell))
{
- tmp.innerHTML = this.sanitizeHtml(this.getLabel(cell));
+ tmp.innerHTML = Graph.sanitizeHtml(this.getLabel(cell));
label = mxUtils.extractTextWithWhitespace([tmp]);
}
else
@@ -5165,7 +5195,7 @@ Graph.prototype.getTooltipForCell = function(cell)
tmp = this.replacePlaceholders(cell, tmp);
}
- tip = this.sanitizeHtml(tmp);
+ tip = Graph.sanitizeHtml(tmp);
}
else
{
diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js
index f04856d4..bde31ca3 100644
--- a/src/main/webapp/js/grapheditor/Menus.js
+++ b/src/main/webapp/js/grapheditor/Menus.js
@@ -505,7 +505,7 @@ Menus.prototype.init = function()
})));
this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ((this.editorUi.format != null) ? ['formatPanel'] : []).
+ this.addMenuItems(menu, ((this.editorUi.format != null) ? ['format'] : []).
concat(['outline', 'layers', '-', 'pageView', 'pageScale', '-', 'scrollbars', 'tooltips', '-',
'grid', 'guides', '-', 'connectionArrows', 'connectionPoints', '-',
'resetView', 'zoomIn', 'zoomOut'], parent));
@@ -515,7 +515,7 @@ Menus.prototype.init = function()
{
if (this.editorUi.format != null)
{
- this.addMenuItems(menu, ['formatPanel'], parent);
+ this.addMenuItems(menu, ['format'], parent);
}
this.addMenuItems(menu, ['outline', 'layers'], parent);
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index bfa9d95c..8f56865a 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2098,17 +2098,18 @@ this.backgroundPageShape.init(k.container),u.style.position="absolute",k.contain
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(k.isGridEnabled()||k.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=k.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
")";var x=u=0;null!=k.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=k.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=r,k.view.backgroundPageShape.node.style.backgroundImage=m,k.view.backgroundPageShape.node.style.backgroundColor=n,k.view.backgroundPageShape.node.style.borderColor=
-k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+
-" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();
-n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),
-Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks);
-k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
-f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay=
+k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"sketch"!=Editor.currentTheme?k.container.style.backgroundColor="":k.container.style.backgroundColor=k.sketchBackgroundColor):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=k.background&&k.background!=mxConstants.NONE||Editor.isDarkMode()||"sketch"!=Editor.currentTheme?u.style.backgroundColor=
+n:u.style.backgroundColor=k.sketchBackgroundColor)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+
+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*
+this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);
+null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].redraw()):(U=new mxPolyline(U,
+this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});k(this.horizontalPageBreaks);k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=
+this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};
+mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,
+u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,
+arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),
+this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),
+r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};e.useCssTransforms&&(this.lazyZoomDelay=
0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(O,T){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
@@ -2214,7 +2215,7 @@ a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-orig
0==this.dialogs.length)if(!a.scrollbars&&!ha&&a.isScrollWheelEvent(J))ha=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ha.x+(ba?-na:na),ha.y):a.view.setTranslate(ha.x,ha.y+(ba?na:-na));else if(ha||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ha,ha=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ha=1+Math.abs(J.deltaY)/20*(ha-1):null!=J.movementY&&"pointermove"==J.type&&(ha=1+Math.max(1,Math.abs(J.movementY))/20*(ha-1),na=-1),a.lazyZoom(ba,null,na,ha),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
-EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
+EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
@@ -2247,12 +2248,11 @@ b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);th
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);
-var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
-this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=
-f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
-e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");
-a&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
+this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2300,8 +2300,8 @@ e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0]
function(x,B,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");
g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",
!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),
-g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),
-g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,
+!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2573,15 +2573,15 @@ Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;fo
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
-Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});
-Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
+Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(a,b){"svg"==a.nodeName&&"content"==b.attrName&&(b.forceKeepAttr=!0);return a});Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
-Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
-Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.sketchBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
+Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
@@ -2603,7 +2603,7 @@ this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(thi
mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform",
"scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;
k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(a,b,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.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(a,b,f){var e=b.getAttribute("href");e!=Graph.sanitizeLink(e)&&Graph.sanitizeNode(b);if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),a);mxEvent.consume(f)}};
Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)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 g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
@@ -2651,7 +2651,7 @@ this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var D=nu
!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&&
mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var Y=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(Y=Q.parent.getIndex(Q),this.model.add(Q.parent,P,Y))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(Y=a.parent.getIndex(a),this.model.add(a.parent,
S,Y));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);k(m+r.x*f,B+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
@@ -2669,7 +2669,7 @@ Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlan
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)(Graph.translateDiagram&&
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=Graph.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)(Graph.translateDiagram&&
"label"==a[g].nodeName||0>mxUtils.indexOf(f,a[g].nodeName))&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+mxUtils.htmlEntities(e[g].name)+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
b+"</div>"))}}return b};Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
@@ -2960,7 +2960,7 @@ Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.widt
Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("format").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
"none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
@@ -3538,7 +3538,7 @@ var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x
null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var Y=Q[F];if("0"!=d.getCurrentCellStyle(Y).expand){var ja=d.getModel().getGeometry(Y);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(Y,ja))}null!=N&&f(Y,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&
!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(D,F,I){f(m,D,F,I,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-n=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),
+n=this.addAction("format",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return e.isFormatPanelVisible()}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),
this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=
d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};
Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
@@ -3566,10 +3566,10 @@ null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(th
g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
-g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
+new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["format"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["format"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
+["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};Menus.prototype.get=function(a){return this.menus[a]};
+Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
@@ -10677,35 +10677,35 @@ DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,f,k)}),f):this.updateFile(b,f)};
-DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(t){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[t]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=t?this.mergeFile(t,b,f,d):this.reloadFile(b,
-f))}catch(u){null!=f&&f(u)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,k,d){var t=!0;try{this.stats.fileMerged++;var u=this.getShadowPages(),C=b.getShadowPages();if(null!=C&&0<C.length){var F=[this.ui.diffPages(null!=d?d:u,C)],J=this.ignorePatches(F);this.setShadowPages(C);if(J)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",J);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(u,this.ui.pages):null;d={};J={};var c=this.ui.patchPages(u,F[0]),e=this.ui.getHashValueForPages(c,
-d),g=this.ui.getHashValueForPages(C,J);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",F,"backup",this.backupPatch,"checksum",e,"current",g,"valid",e==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=e&&e!=g){var m=this.compressReportData(this.getAnonymizedXmlForPages(C)),p=this.compressReportData(this.getAnonymizedXmlForPages(c)),q=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,F,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+e+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(J)+"\nFrom: "+q+"\nTo: "+z+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile",e,g,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(F,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||F.push(y)}this.patch(F,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var A=this.getCurrentUser(),x=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,I)}}catch(M){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);k.appendChild(t)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(v){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[v]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=v?this.mergeFile(v,b,f,d):this.reloadFile(b,
+f))}catch(x){null!=f&&f(x)}}),f))};
+DrawioFile.prototype.mergeFile=function(b,f,k,d){var v=!0;try{this.stats.fileMerged++;var x=this.getShadowPages(),D=b.getShadowPages();if(null!=D&&0<D.length){var G=[this.ui.diffPages(null!=d?d:x,D)],H=this.ignorePatches(G);this.setShadowPages(D);if(H)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(x,this.ui.pages):null;d={};H={};var I=this.ui.patchPages(x,G[0]),F=this.ui.getHashValueForPages(I,
+d),O=this.ui.getHashValueForPages(D,H);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",G,"backup",this.backupPatch,"checksum",F,"current",O,"valid",F==O,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=F&&F!=O){var c=this.compressReportData(this.getAnonymizedXmlForPages(D)),e=this.compressReportData(this.getAnonymizedXmlForPages(I)),g=this.ui.hashValue(b.getCurrentEtag()),p=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,G,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+F+"\nCurrent: "+O+"\nCurrent Details: "+JSON.stringify(H)+"\nFrom: "+g+"\nTo: "+p+"\n\nFile Data:\n"+c+"\nPatched Shadow:\n"+e,null,"mergeFile",F,O,b.getCurrentRevisionId());return}if(null!=this.sync){var n=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==n||mxUtils.isEmptyObject(n)||G.push(n)}this.patch(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw v=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(A);try{if(v)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var t=this.getCurrentUser(),y=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,A)}}catch(C){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var v=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,v,!0);k.appendChild(v)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,k,d,t,u,C,F){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var J=0;J<f.length;J++)this.ui.anonymizePatch(f[J]);var c=mxUtils.bind(this,function(z){var y=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
-25E3);this.sendErrorReport("Checksum Error in "+t+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==d?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==d?c(z):c(null)}),function(){})}else{var e=this.getCurrentUser(),g=null!=e?e.id:"unknown",m=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",p=JSON.stringify(f).length,q=null;if(null!=f&&this.constructor==DriveFile&&400>p){for(J=0;J<f.length;J++)this.ui.anonymizePatch(f[J]);
-q=JSON.stringify(f);q=null!=q&&250>q.length?Graph.compress(q):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var y=null!=q?"Report":"Error",A=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+y+" in "+t+" "+m,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+p+"-patches_"+f.length+(null!=q?"-json_"+q:"")+"-size_"+this.getSize()+(null!=u?"-expected_"+u:"")+(null!=C?"-current_"+C:"")+(null!=F?
-"-rev_"+this.ui.hashValue(F):"")+(null!=A?"-latest_"+A:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+m,action:t,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+p+"-patches_"+f.length+"-size_"+this.getSize()})}catch(x){}}),b)}}catch(z){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),u=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),F=null!=C?this.ui.hashValue(C.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),e=c.lastIndexOf(".");C="xml";0<e&&(C=c.substring(e));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+F+J+"\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!=f?"\n\n"+f:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+t+"\n\nData:\n"+u,d)}catch(m){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,t=d.getSelectionCells(),u=d.getViewState(),C=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(C,u,t);null!=this.backupPatch&&this.patch([this.backupPatch]);var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+DrawioFile.prototype.checksumError=function(b,f,k,d,v,x,D,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var H=0;H<f.length;H++)this.ui.anonymizePatch(f[H]);var I=mxUtils.bind(this,function(p){var n=this.compressReportData(JSON.stringify(f,null,2));p=null==p?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(p.data)),
+25E3);this.sendErrorReport("Checksum Error in "+v+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+n+(null!=p?"\n\nRemote:\n"+p:""),null,7E4)});null==d?I(null):this.getLatestVersion(mxUtils.bind(this,function(p){null!=p&&p.getCurrentEtag()==d?I(p):I(null)}),function(){})}else{var F=this.getCurrentUser(),O=null!=F?F.id:"unknown",c=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",e=JSON.stringify(f).length,g=null;if(null!=f&&this.constructor==DriveFile&&400>e){for(H=0;H<f.length;H++)this.ui.anonymizePatch(f[H]);
+g=JSON.stringify(f);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(p){try{var n=null!=g?"Report":"Error",t=this.ui.getHashValueForPages(p.getShadowPages());EditorUi.logError("Checksum "+n+" in "+v+" "+c,null,this.getMode()+"."+this.getId(),"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=D?"-current_"+D:"")+(null!=G?
+"-rev_"+this.ui.hashValue(G):"")+(null!=t?"-latest_"+t:"")+(null!=p?"-latestRev_"+this.ui.hashValue(p.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+c,action:v,label:"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(p){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),D=this.getCurrentUser(),G=null!=D?this.ui.hashValue(D.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",I=this.getTitle(),F=I.lastIndexOf(".");D="xml";0<F&&(D=I.substring(F));var O=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+D+")\nUser="+G+H+"\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!=f?"\n\n"+f:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+O+"\n\nShadow:\n"+v+"\n\nData:\n"+x,d)}catch(c){}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,v=d.getSelectionCells(),x=d.getViewState(),D=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(D,x,v);null!=this.backupPatch&&this.patch([this.backupPatch]);var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f};
-DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var d=this.ui.editor.undoManager,t=d.history.slice(),u=d.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var F=this.changeListenerEnabled;this.changeListenerEnabled=k;var J=C.foldingEnabled,c=C.mathEnabled,e=C.cellRenderer.redraw;C.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());e.apply(this,arguments)};C.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,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{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=e;this.changeListenerEnabled=F;k||(d.history=t,d.indexOfNextAdd=u,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=C.mathEnabled?
-(this.ui.editor.updateGraphComponents(),C.refresh()):(J!=C.foldingEnabled?C.view.revalidate():C.view.validate(),C.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,f,k,d,t,u){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",t,"manual",u,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=k)k(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var d=this.ui.editor.undoManager,v=d.history.slice(),x=d.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=k;var H=D.foldingEnabled,I=D.mathEnabled,F=D.cellRenderer.redraw;D.cellRenderer.redraw=function(O){O.view.graph.isEditing(O.cell)&&(O.view.graph.scrollCellToVisible(O.cell),O.view.graph.cellEditor.resize());F.apply(this,arguments)};D.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,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{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=F;this.changeListenerEnabled=G;k||(d.history=v,d.indexOfNextAdd=x,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)I!=D.mathEnabled?
+(this.ui.editor.updateGraphComponents(),D.refresh()):(H!=D.foldingEnabled?D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,f,k,d,v,x){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",v,"manual",x,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(D){if(null!=k)k(D);else throw D;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,f,k){};
DrawioFile.prototype.saveFile=function(b,f,k,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var d=0;null!=k&&d<k.length;d++){var t=k[d];null!=t.id&&0==t.id.indexOf("extFont_")&&t.parentNode.removeChild(t)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var d=0;null!=k&&d<k.length;d++){var v=k[d];null!=v.id&&0==v.id.indexOf("extFont_")&&v.parentNode.removeChild(v)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
@@ -10730,444 +10730,444 @@ DrawioFile.prototype.showRefreshDialog=function(b,f,k){null==k&&(k=mxResources.g
f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,f)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
DrawioFile.prototype.showCopyDialog=function(b,f,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var t=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,t):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):f?this.showConflictDialog(t,u):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(D){this.handleFileError(D,!0)}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,v):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):f?this.showConflictDialog(v,x):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(k,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){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(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(k){b(f,k)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,k,d,t){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var u=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(u),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(u,f,k,d,t)}catch(J){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=d&&d(J);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,J);else{var C=this.getCurrentUser(),F=null!=C?C.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),F,J)}}catch(c){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,f,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var t=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==t&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
-u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=k&&k(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"delay",b,"saving",this.savingFile);this.autosaveThread=t};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.fileSaved=function(b,f,k,d,v){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var x=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(x,f,k,d,v)}catch(H){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=d&&d(H);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,H);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,H)}}catch(I){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,f,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var v=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==v&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",v,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision();
+x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(D){this.autosaveCompleted();null!=k&&k(D)}),mxUtils.bind(this,function(D){null!=d&&d(D)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",v,"delay",b,"saving",this.savingFile);this.autosaveThread=v};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=f.lastIndexOf(".");return b===(0<k?f.substring(k):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,d,t,u){DrawioFile.call(this,b,f);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,d,v,x){DrawioFile.call(this,b,f);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,k){this.saveAs(this.title,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,k,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var C=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),J=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);this.desc.lastModified==p.lastModified?m.write(u?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){try{var z=this.desc;this.savingFile=!1;this.desc=q;this.fileSaved(C,z,F,e);this.removeDraft()}catch(y){e(y)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;e(p)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,u?"image/png":"text/xml",u);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});u?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){J(c)}),d,this.ui.getCurrentFile()!=this?C:null,f.scale,f.border)):J(C)};
+LocalFile.prototype.saveFile=function(b,f,k,d,v){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var x=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var D=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),H=mxUtils.bind(this,function(I){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var F=mxUtils.bind(this,
+function(c){this.savingFile=!1;null!=d&&d({error:c})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(c){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[e],"conflict",this.desc.lastModified!=e.lastModified);this.desc.lastModified==e.lastModified?c.write(x?this.ui.base64ToBlob(I,"image/png"):I).then(mxUtils.bind(this,function(){c.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var p=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(D,p,G,F);this.removeDraft()}catch(n){F(n)}}),F)}),F)}),F):(this.inConflictState=!0,F())}),mxUtils.bind(this,function(e){this.invalidFileHandle=!0;F(e)}))}),F)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(I,b,x?"image/png":"text/xml",x);else if(I.length<MAX_REQUEST_SIZE){var O=b.lastIndexOf(".");O=0<O?b.substring(O+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+O+"&xml="+encodeURIComponent(I)+"&filename="+encodeURIComponent(b)+(x?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}));G()}});x?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(I){H(I)}),d,this.ui.getCurrentFile()!=this?D:null,f.scale,f.border)):H(D)};
LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,k)};
-StorageFile.insertFile=function(b,f,k,d,t){var u=mxUtils.bind(this,function(C){var F=function(){var J=new StorageFile(b,k,f);J.saveFile(f,!1,function(){d(J)},t)};C?b.confirm(mxResources.get("replaceIt",[f]),F,t):F()});StorageFile.getFileContent(b,f,function(C){u(null!=C)},function(){u(!1)})};StorageFile.getFileContent=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=d&&d()}),"files")};
-StorageFile.getFileInfo=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(t)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(t){k(null!=t?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,k,d){if(this.isEditable()){var t=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var C=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:C.length,lastModified:Date.now(),type:this.type},{title:this.title,data:C}],u,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-C,u):null!=d&&d()}),["filesInfo","files"])}catch(F){null!=d&&d(F)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),t,d):t()}),d)}else null!=k&&k()};
-StorageFile.prototype.rename=function(b,f,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){var u=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),k)});null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),u,k):u()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.insertFile=function(b,f,k,d,v){var x=mxUtils.bind(this,function(D){var G=function(){var H=new StorageFile(b,k,f);H.saveFile(f,!1,function(){d(H)},v)};D?b.confirm(mxResources.get("replaceIt",[f]),G,v):G()});StorageFile.getFileContent(b,f,function(D){x(null!=D)},function(){x(!1)})};StorageFile.getFileContent=function(b,f,k,d){b.getDatabaseItem(f,function(v){k(null!=v?v.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=d&&d()}),"files")};
+StorageFile.getFileInfo=function(b,f,k,d){b.getDatabaseItem(f,function(v){k(v)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(v){k(null!=v?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,f,k,d){if(this.isEditable()){var v=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var D=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:D.length,lastModified:Date.now(),type:this.type},{title:this.title,data:D}],x,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+D,x):null!=d&&d()}),["filesInfo","files"])}catch(G){null!=d&&d(G)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),v,d):v()}),d)}else null!=k&&k()};
+StorageFile.prototype.rename=function(b,f,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(v){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),k)});null!=v?this.ui.confirm(mxResources.get("replaceIt",[b]),x,k):x()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var u=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(u||C)&&f.push({title:d,type:u?"F":"L",size:t.length,lastModified:Date.now()})}}return f};
-StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<f.length;d++){var t=f[d],u=localStorage.getItem(t.title);b.add({title:t.title,data:u});k.add(t)}};
-StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(t){var u=[];if(null!=t)for(var C=0;C<t.length;C++)"."==t[C].title.charAt(0)||null!=f&&t[C].type!=f||u.push(t[C]);k(u)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,d){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),v=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<v.length){var x=(null==b||"F"==b)&&("<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12)),D=(null==b||"L"==b)&&"<mxlibrary>"===v.substring(0,11);(x||D)&&f.push({title:d,type:x?"F":"L",size:v.length,lastModified:Date.now()})}}return f};
+StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<f.length;d++){var v=f[d],x=localStorage.getItem(v.title);b.add({title:v.title,data:x});k.add(v)}};
+StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(v){var x=[];if(null!=v)for(var D=0;D<v.length;D++)"."==v[D].title.charAt(0)||null!=f&&v[D].type!=f||x.push(v[D]);k(x)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,d){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,k){};
RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,k){function d(g,m,p,q,z,y){function A(){mxEvent.addListener(x,"click",null!=y?y:function(){p!=App.MODE_GOOGLE||b.isDriveDomain()?p==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(p,!0);f()})):p==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(p,!0);f()}),
-function(n){b.spinner.stop();b.handleError(n)}):(b.setMode(p,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}F++;++C>k&&(mxUtils.br(J),C=1);var x=document.createElement("a");x.style.overflow="hidden";x.style.display="inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.marginTop="8px";x.style.marginBottom="0px";x.style.padding="8px 10px 8px 10px";x.style.width="88px";x.style.height=
-"100px";x.style.whiteSpace="nowrap";x.setAttribute("title",m);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,m);x.appendChild(I);if(null!=g){var M=document.createElement("img");M.setAttribute("src",g);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";x.appendChild(M)}else I.style.paddingTop=
-"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=q&&null==b[q]){M.style.visibility="hidden";mxUtils.setOpacity(I,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(x);
-var Q=window.setTimeout(function(){null==b[q]&&(E.stop(),x.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(n,v){null!=b[q]&&v.getProperty("client")==b[q]&&(window.clearTimeout(Q),mxUtils.setOpacity(I,100),M.style.visibility="",E.stop(),A(),"drive"==q&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else A();J.appendChild(x)}k=null!=k?k:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
-"20px";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";u.style.padding="10px 0px 20px 0px";var C=0,F=0,J=document.createElement("div");J.style.paddingTop="2px";u.appendChild(J);var c=document.createElement("p"),e=document.createElement("p");e.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(e,mxResources.get("saveDiagramsTo")+":");t.appendChild(e);t.appendChild(u);C=0;"function"===typeof window.DriveClient&&
+var StorageDialog=function(b,f,k){function d(O,c,e,g,p,n){function t(){mxEvent.addListener(y,"click",null!=n?n:function(){e!=App.MODE_GOOGLE||b.isDriveDomain()?e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);f()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);f()}),
+function(l){b.spinner.stop();b.handleError(l)}):(b.setMode(e,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}G++;++D>k&&(mxUtils.br(H),D=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height=
+"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",c);var A=document.createElement("div");A.style.textOverflow="ellipsis";A.style.overflow="hidden";A.style.position="absolute";A.style.bottom="8px";A.style.left="0px";A.style.right="0px";mxUtils.write(A,c);y.appendChild(A);if(null!=O){var C=document.createElement("img");C.setAttribute("src",O);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";y.appendChild(C)}else A.style.paddingTop=
+"5px",A.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(A.style.paddingTop="0px",A.style.marginTop="-2px");if(null!=p)for(O=0;O<p.length;O++)mxUtils.br(A),mxUtils.write(A,p[O]);if(null!=g&&null==b[g]){C.style.visibility="hidden";mxUtils.setOpacity(A,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(y);
+var R=window.setTimeout(function(){null==b[g]&&(u.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(l,q){null!=b[g]&&q.getProperty("client")==b[g]&&(window.clearTimeout(R),mxUtils.setOpacity(A,100),C.style.visibility="",u.stop(),t(),"drive"==g&&null!=I.parentNode&&I.parentNode.removeChild(I))}))}else t();H.appendChild(y)}k=null!=k?k:2;var v=document.createElement("div");v.style.textAlign="center";v.style.whiteSpace="nowrap";v.style.paddingTop="0px";v.style.paddingBottom=
+"20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";x.style.padding="10px 0px 20px 0px";var D=0,G=0,H=document.createElement("div");H.style.paddingTop="2px";x.appendChild(H);var I=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");v.appendChild(F);v.appendChild(x);D=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
-d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");u=document.createElement("span");u.style.position="absolute";u.style.cursor="pointer";u.style.bottom="27px";u.style.color="gray";u.style.userSelect="none";u.style.textAlign="center";u.style.left="50%";mxUtils.setPrefixedStyle(u.style,
-"transform","translate(-50%,0)");mxUtils.write(u,mxResources.get("decideLater"));t.appendChild(u);mxEvent.addListener(u,"click",function(){b.hideDialog();var g=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=g});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(c.style.padding="7px",c.style.fontSize="9pt",c.style.marginTop="-14px",
-c.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",t.appendChild(c))},5E3);this.container=t},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
-b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var t=document.createElement("div");t.style.margin="8px 0px 0px 0px";t.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=
+d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");x=document.createElement("span");x.style.position="absolute";x.style.cursor="pointer";x.style.bottom="27px";x.style.color="gray";x.style.userSelect="none";x.style.textAlign="center";x.style.left="50%";mxUtils.setPrefixedStyle(x.style,
+"transform","translate(-50%,0)");mxUtils.write(x,mxResources.get("decideLater"));v.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var O=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=O});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(I.style.padding="7px",I.style.fontSize="9pt",I.style.marginTop="-14px",
+I.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",v.appendChild(I))},5E3);this.container=v},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
+b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var v=document.createElement("div");v.style.margin="8px 0px 0px 0px";v.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=
IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):
-(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",k=mxResources.get("device"));var u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="8px";u.style.fontSize="18px";u.style.padding="10px";u.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",u.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),
-F=document.createElement("tbody"),J=document.createElement("tr"),c=document.createElement("td"),e=document.createElement("td");C.setAttribute("align","center");c.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);e.style.textAlign="left";e.appendChild(d);J.appendChild(c);J.appendChild(e);F.appendChild(J);C.appendChild(F);f.appendChild(C);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(u,mxResources.get("createNewDiagram"));mxEvent.addListener(u,"click",function(){b.hideDialog();b.actions.get("new").funct()});t.appendChild(u);mxUtils.br(t);u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="22px";u.style.fontSize=
-"18px";u.style.padding="10px";u.style.width="340px";mxUtils.write(u,mxResources.get("openExistingDiagram"));mxEvent.addListener(u,"click",function(){b.actions.get("open").funct()});t.appendChild(u);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(p){u.style.marginBottom="24px";var q=document.createElement("a");q.style.display="inline-block";q.style.color="gray";q.style.cursor="pointer";q.style.marginTop="6px";mxUtils.write(q,mxResources.get("signOut"));u.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(q,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){p()})});t.appendChild(q)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");u.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var m=document.createElement("select");m.style.marginLeft="4px";m.style.width="140px";for(k=0;k<g.length;k++)C=document.createElement("option"),mxUtils.write(C,g[k].displayName),C.value=k,m.appendChild(C),
-C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(C,"<"+g[k].email+">"),C.setAttribute("disabled","disabled"),m.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=g.length;m.appendChild(C);mxEvent.addListener(m,"change",function(){var p=m.value,q=g.length!=p;q&&b.drive.setUser(g[p]);b.drive.authorize(q,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
-b.showSplash()})},!0)});t.appendChild(m)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,k,d,t,u,C,F,J){C=null!=C?C:"Check out the diagram I made using @drawio";d=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=u?mxUtils.write(d,u):mxUtils.write(d,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);u=document.createElement("div");
-u.style.position="absolute";u.style.top="30px";u.style.right="30px";u.style.color="gray";mxUtils.write(u,b.formatFileSize(f.length));d.appendChild(u);var e=document.createElement("textarea");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.marginTop="10px";e.style.resize="none";e.style.height="150px";e.style.width="440px";e.style.border=
-"1px solid gray";e.value=mxResources.get("updatingDocument");d.appendChild(e);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(e.value=f,e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)):(e.setAttribute("readonly","true"),e.value=mxResources.get("tooLargeUseDownload"))},0)};u=document.createElement("div");u.style.position="absolute";u.style.bottom="36px";u.style.right="32px";var g=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=F?F:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var p=5E5>f.length?e.value:f;if(null!=t)t(p);else if(c)try{var q=b.openLink(p);null!=q&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=q&&null!=q.location.href&&q.location.href.substring(0,8)!=p.substring(0,8)&&(q.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(y){}}),
-k||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",u.appendChild(g));if(!c||7500<f.length)F=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=J?J:"embed.txt","txt",f,"text/plain")}),F.className="geBtn",u.appendChild(F);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var m=mxUtils.button("",function(){try{var p="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}});F=document.createElement("img");F.setAttribute("src",Editor.facebookImage);F.setAttribute("width","18");F.setAttribute("height",
-"18");F.setAttribute("border","0");m.appendChild(F);m.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");m.style.verticalAlign="bottom";m.style.paddingTop="4px";m.style.minWidth="46px";m.className="geBtn";u.appendChild(m)}7168>f.length&&(m=mxUtils.button("",function(){try{var p="https://twitter.com/intent/tweet?text="+encodeURIComponent(C)+"&url="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),
-F=document.createElement("img"),F.setAttribute("src",Editor.tweetImage),F.setAttribute("width","18"),F.setAttribute("height","18"),F.setAttribute("border","0"),F.style.marginBottom="5px",m.appendChild(F),m.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),m.style.verticalAlign="bottom",m.style.paddingTop="4px",m.style.minWidth="46px",m.className="geBtn",u.appendChild(m))}!b.isOffline()&&5E5>f.length&&(m=mxUtils.button("",function(){try{var p="mailto:?subject="+encodeURIComponent(J||
-b.defaultFilename)+"&body="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),F=document.createElement("img"),F.className="geAdaptiveAsset",F.setAttribute("src",Editor.mailImage),F.setAttribute("width","18"),F.setAttribute("height","18"),F.setAttribute("border","0"),F.style.marginBottom="5px",m.appendChild(F),m.style.verticalAlign="bottom",m.style.paddingTop="4px",m.style.minWidth="46px",m.className="geBtn",u.appendChild(m));
-F=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.appendChild(F);m=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?F.className="geBtn gePrimaryBtn":(u.appendChild(m),m.className="geBtn gePrimaryBtn",F.className="geBtn"):(u.appendChild(g),
-F.className="geBtn",g.className="geBtn gePrimaryBtn");d.appendChild(u);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function k(){var n=null!=Q&&null!=Q.getTitle()?Q.getTitle():this.defaultFilename;if(M.checked&&""!=m.value){var v="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(m.value));null!=n&&(v+="&title="+encodeURIComponent(n));0<E.length&&(v+="&s="+E);""!=p.value&&"0"!=p.value&&(v+="&border="+p.value);""!=g.value&&(v+="&height="+g.value);v+="&pan="+(q.checked?"1":"0");v+="&zoom="+(z.checked?"1":"0");v+="&fit="+(I.checked?"1":"0");
-v+="&resize="+(x.checked?"1":"0");v+="&x0="+Number(e.value);v+="&y0="+J;t.mathEnabled&&(v+="&math=1");A.checked?v+="&edit=_blank":y.checked&&(v+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=v}else Q.constructor==DriveFile||Q.constructor==DropboxFile?(v="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=m.value?v+=encodeURIComponent(mxUtils.htmlEntities(m.value))+"&type=3":(v+=Q.getHash().substring(1),v=Q.constructor==DropboxFile?v+"&type=2":v+"&type=1"),null!=
-n&&(v+="&title="+encodeURIComponent(n)),""!=g.value&&(n=parseInt(g.value)+parseInt(e.value),v+="&height="+n),c.value=v):c.value=""}var d=document.createElement("div"),t=b.editor.graph,u=t.getGraphBounds(),C=t.view.scale,F=Math.floor(u.x/C-t.view.translate.x),J=Math.floor(u.y/C-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";
-d.appendChild(c);mxUtils.br(d);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=F;d.appendChild(e);mxUtils.write(d,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text");
-g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(u.height/C);d.appendChild(g);mxUtils.br(d);u=document.createElement("hr");u.setAttribute("size","1");u.style.marginBottom="16px";u.style.marginTop="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","28");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";m.value=f||"";d.appendChild(m);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";d.appendChild(p);mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";d.appendChild(q);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";d.appendChild(I);mxUtils.write(d,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft=
-"8px";d.appendChild(M);mxUtils.write(d,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),Q=b.getCurrentFile();mxEvent.addListener(q,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(x,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(A,"change",k);mxEvent.addListener(M,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(p,"change",k);mxEvent.addListener(m,"change",k);k();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn gePrimaryBtn";f.appendChild(u);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
-function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var u=new Graph(t);u.setCellsCloneable(!0);u.setPanning(!0);u.setAllowDanglingEdges(!1);u.connectionHandler.select=!1;u.view.setTranslate(20,20);u.border=20;u.panningHandler.useLeftButtonForPanning=!0;var C="curved=1;";u.cellRenderer.installCellOverlayListeners=
-function(z,y,A){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(A.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){y.fireEvent(new mxEventObject("pointerdown","event",x,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(A.node,"touchstart",function(x){y.fireEvent(new mxEventObject("pointerdown","event",x,"state",z))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
-!1;u.connectionHandler.createEdgeState=function(z){z=u.createEdge(null,null,null,null,null,C);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var F=u.getDefaultParent(),J=mxUtils.bind(this,function(z){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(A,x){u.connectionHandler.reset();u.clearSelection();var I=u.getCellGeometry(z),M;g(function(){M=u.insertVertex(F,null,"Entry",I.x,I.y,80,30,"rounded=1;");J(M);u.view.refresh(M);
-u.insertEdge(F,null,"",z,M,C)},function(){u.scrollCellToVisible(M)})});y.addListener("pointerdown",function(A,x){A=x.getProperty("event");x=x.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var I=mxUtils.convertPoint(u.container,mxEvent.getClientX(A),mxEvent.getClientY(A));u.connectionHandler.start(x,I.x,I.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(A);mxEvent.consume(A)});u.addCellOverlay(z,y)});u.getModel().beginUpdate();try{var c=u.insertVertex(F,null,"Start",
-0,0,80,30,"ellipse");J(c)}finally{u.getModel().endUpdate()}if("horizontalTree"==k){var e=new mxCompactTreeLayout(u);e.edgeRouting=!1;e.levelDistance=30;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(e=new mxCompactTreeLayout(u,!1),e.edgeRouting=!1,e.levelDistance=30,C="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(e=new mxRadialTreeLayout(u,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==k?e=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-k?e=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"circle"==k?e=new mxCircleLayout(u):(e=new mxFastOrganicLayout(u,!1),e.forceConstant=80);if(null!=e){var g=function(z,y){u.getModel().beginUpdate();try{null!=z&&z(),e.execute(u.getDefaultParent(),c)}catch(A){throw A;}finally{z=new mxMorphing(u),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),z.startAnimation()}},m=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(z,y,
-A,x,I){m.apply(this,arguments);g()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&d.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(z){u.clearCellOverlays();
-var y=u.getModel().getChildren(u.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,z.x,z.y);z=b.editor.graph.view;var A=z.getBounds(y);A.x-=z.translate.x;A.y-=z.translate.y;b.editor.graph.scrollRectToVisible(A);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(q);q.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||d.appendChild(p)};this.container=d};
+(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",v.style.paddingBottom="10px",v.style.paddingTop="30px",k=mxResources.get("device"));var x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)v.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{v.style.border="1px solid #d3d3d3";v.style.borderWidth="1px 0px 1px 0px";var D=document.createElement("table"),
+G=document.createElement("tbody"),H=document.createElement("tr"),I=document.createElement("td"),F=document.createElement("td");D.setAttribute("align","center");I.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);F.style.textAlign="left";F.appendChild(d);H.appendChild(I);H.appendChild(F);G.appendChild(H);D.appendChild(G);f.appendChild(D);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});v.appendChild(x);mxUtils.br(v);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize=
+"18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});v.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(e){x.style.marginBottom="24px";var g=document.createElement("a");g.style.display="inline-block";g.style.color="gray";g.style.cursor="pointer";g.style.marginTop="6px";mxUtils.write(g,mxResources.get("signOut"));x.style.marginBottom="16px";v.style.paddingBottom="18px";mxEvent.addListener(g,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){e()})});v.appendChild(g)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var O=b.drive.getUsersList();if(0<O.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";v.style.paddingBottom="18px";v.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(k=0;k<O.length;k++)D=document.createElement("option"),mxUtils.write(D,O[k].displayName),D.value=k,c.appendChild(D),
+D=document.createElement("option"),D.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(D,"<"+O[k].email+">"),D.setAttribute("disabled","disabled"),c.appendChild(D);D=document.createElement("option");mxUtils.write(D,mxResources.get("addAccount"));D.value=O.length;c.appendChild(D);mxEvent.addListener(c,"change",function(){var e=c.value,g=O.length!=e;g&&b.drive.setUser(O[e]);b.drive.authorize(g,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();
+b.showSplash()})},!0)});v.appendChild(c)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(v);this.container=f},EmbedDialog=function(b,f,k,d,v,x,D,G,H){D=null!=D?D:"Check out the diagram I made using @drawio";d=document.createElement("div");var I=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>f.length?I?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");
+x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop="10px";F.style.resize="none";F.style.height="150px";F.style.width="440px";F.style.border=
+"1px solid gray";F.value=mxResources.get("updatingDocument");d.appendChild(F);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(F.value=f,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position="absolute";x.style.bottom="36px";x.style.right="32px";var O=null;!EmbedDialog.showPreviewOption||
+mxClient.IS_CHROMEAPP&&!I||navigator.standalone||!(I||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(O=mxUtils.button(null!=G?G:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var e=5E5>f.length?F.value:f;if(null!=v)v(e);else if(I)try{var g=b.openLink(e);null!=g&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=e.substring(0,8)&&(g.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(n){}}),
+k||500)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}else{var p=window.open();p=null!=p?p.document:null;null!=p?(p.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),O.className="geBtn",x.appendChild(O));if(!I||7500<f.length)G=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),G.className="geBtn",x.appendChild(G);if(I&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}});G=document.createElement("img");G.setAttribute("src",Editor.facebookImage);G.setAttribute("width","18");G.setAttribute("height",
+"18");G.setAttribute("border","0");c.appendChild(G);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";x.appendChild(c)}7168>f.length&&(c=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(D)+"&url="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),
+G=document.createElement("img"),G.setAttribute("src",Editor.tweetImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c))}!b.isOffline()&&5E5>f.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(H||
+b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),G=document.createElement("img"),G.className="geAdaptiveAsset",G.setAttribute("src",Editor.mailImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c));
+G=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(G);c=mxUtils.button(mxResources.get("copy"),function(){F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?G.className="geBtn gePrimaryBtn":(x.appendChild(c),c.className="geBtn gePrimaryBtn",G.className="geBtn"):(x.appendChild(O),
+G.className="geBtn",O.className="geBtn gePrimaryBtn");d.appendChild(x);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,f){function k(){var l=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=l&&(q+="&title="+encodeURIComponent(l));0<u.length&&(q+="&s="+u);""!=e.value&&"0"!=e.value&&(q+="&border="+e.value);""!=O.value&&(q+="&height="+O.value);q+="&pan="+(g.checked?"1":"0");q+="&zoom="+(p.checked?"1":"0");q+="&fit="+(A.checked?"1":"0");
+q+="&resize="+(y.checked?"1":"0");q+="&x0="+Number(F.value);q+="&y0="+H;v.mathEnabled&&(q+="&math=1");t.checked?q+="&edit=_blank":n.checked&&(q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));I.value=q}else R.constructor==DriveFile||R.constructor==DropboxFile?(q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?q+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(q+=R.getHash().substring(1),q=R.constructor==DropboxFile?q+"&type=2":q+"&type=1"),null!=
+l&&(q+="&title="+encodeURIComponent(l)),""!=O.value&&(l=parseInt(O.value)+parseInt(F.value),q+="&height="+l),I.value=q):I.value=""}var d=document.createElement("div"),v=b.editor.graph,x=v.getGraphBounds(),D=v.view.scale,G=Math.floor(x.x/D-v.view.translate.x),H=Math.floor(x.y/D-v.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var I=document.createElement("input");I.setAttribute("type","text");I.style.marginBottom="8px";I.style.marginTop="2px";I.style.width="410px";
+d.appendChild(I);mxUtils.br(d);this.init=function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,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=G;d.appendChild(F);mxUtils.write(d,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");
+O.setAttribute("size","4");O.style.marginLeft="4px";O.value=Math.ceil(x.height/D);d.appendChild(O);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=f||"";d.appendChild(c);
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginLeft="16px";d.appendChild(g);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";n.setAttribute("title",window.location.href);d.appendChild(n);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var u=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(g,"change",k);mxEvent.addListener(p,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(A,"change",k);mxEvent.addListener(n,"change",k);mxEvent.addListener(t,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(O,"change",k);mxEvent.addListener(F,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(c,"change",k);k();
+mxEvent.addListener(I,"click",function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
+function(){var v=document.createElement("div");v.style.position="relative";v.style.border="1px solid gray";v.style.width="100%";v.style.height="360px";v.style.overflow="hidden";v.style.marginBottom="16px";mxEvent.disableContextMenu(v);d.appendChild(v);var x=new Graph(v);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;var D="curved=1;";x.cellRenderer.installCellOverlayListeners=
+function(p,n,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){n.fireEvent(new mxEventObject("pointerdown","event",y,"state",p))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(y){n.fireEvent(new mxEventObject("pointerdown","event",y,"state",p))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=
+!1;x.connectionHandler.createEdgeState=function(p){p=x.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,p,this.graph.getCellStyle(p))};var G=x.getDefaultParent(),H=mxUtils.bind(this,function(p){var n=new mxCellOverlay(this.connectImage,"Add outgoing");n.cursor="hand";n.addListener(mxEvent.CLICK,function(t,y){x.connectionHandler.reset();x.clearSelection();var A=x.getCellGeometry(p),C;O(function(){C=x.insertVertex(G,null,"Entry",A.x,A.y,80,30,"rounded=1;");H(C);x.view.refresh(C);
+x.insertEdge(G,null,"",p,C,D)},function(){x.scrollCellToVisible(C)})});n.addListener("pointerdown",function(t,y){t=y.getProperty("event");y=y.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var A=mxUtils.convertPoint(x.container,mxEvent.getClientX(t),mxEvent.getClientY(t));x.connectionHandler.start(y,A.x,A.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(t);mxEvent.consume(t)});x.addCellOverlay(p,n)});x.getModel().beginUpdate();try{var I=x.insertVertex(G,null,"Start",
+0,0,80,30,"ellipse");H(I)}finally{x.getModel().endUpdate()}if("horizontalTree"==k){var F=new mxCompactTreeLayout(x);F.edgeRouting=!1;F.levelDistance=30;D="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(F=new mxCompactTreeLayout(x,!1),F.edgeRouting=!1,F.levelDistance=30,D="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(F=new mxRadialTreeLayout(x,!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==k?F=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+k?F=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"circle"==k?F=new mxCircleLayout(x):(F=new mxFastOrganicLayout(x,!1),F.forceConstant=80);if(null!=F){var O=function(p,n){x.getModel().beginUpdate();try{null!=p&&p(),F.execute(x.getDefaultParent(),I)}catch(t){throw t;}finally{p=new mxMorphing(x),p.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();null!=n&&n()})),p.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(p,n,
+t,y,A){c.apply(this,arguments);O()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);O()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){O()})}var e=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);var g=mxUtils.button(mxResources.get("insert"),function(p){x.clearCellOverlays();
+var n=x.getModel().getChildren(x.getDefaultParent());p=mxEvent.isAltDown(p)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(n,!0));n=b.editor.graph.importCells(n,p.x,p.y);p=b.editor.graph.view;var t=p.getBounds(n);t.x-=p.translate.x;t.y-=p.translate.y;b.editor.graph.scrollRectToVisible(t);b.editor.graph.setSelectionCells(n);null!=v.parentNode&&(x.destroy(),v.parentNode.removeChild(v));b.hideDialog()});d.appendChild(g);g.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||d.appendChild(e)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var u=null!=k&&null!=k.originalSrc;t=!1;var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","geBackgroundImageDialogOption");var F=document.createElement("input");
-F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginBottom="8px";J.style.width="360px";J.value=u||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var e=0;e<b.pages.length;e++){var g=document.createElement("option");mxUtils.write(g,b.pages[e].getName()||
-mxResources.get("pageWithNumber",[e+1]));g.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),t=!0);c.appendChild(g)}u||null!=b.pages&&1!=b.pages.length||(C.style.display="none",F.style.display="none",c.style.display="none");var m=document.createElement("option"),p=!1,q=!1,z=function(M,E){p||null!=M&&q||(F.checked?null!=E&&E(m.selected?null:
-c.value):""==J.value||b.isOffline()?(A.value="",x.value="",null!=E&&E("")):(J.value=mxUtils.trim(J.value),b.loadImage(J.value,function(Q){A.value=Q.width;x.value=Q.height;null!=E&&E(J.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));A.value="";x.value="";null!=E&&E(null)})))},y=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(E,Q,n,v,D,H){J.value=E;z();J.focus()},function(){},function(E){return"image/"==E.type.substring(0,
-6)},function(E){for(var Q=0;Q<E.length;Q++)E[Q]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?c.focus():J.focus();mxEvent.addListener(c,"focus",function(){C.removeAttribute("checked");F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(J,"focus",function(){F.removeAttribute("checked");C.setAttribute("checked","checked");C.checked=!0});if(Graph.fileSupport){J.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=d.parentNode,E=null;mxEvent.addListener(M,
-"dragleave",function(Q){null!=E&&(E.parentNode.removeChild(E),E=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(Q){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(M));Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(Q){null!=E&&(E.parentNode.removeChild(E),E=null);if(0<Q.dataTransfer.files.length)y(Q.dataTransfer.files);else if(0<=mxUtils.indexOf(Q.dataTransfer.types,
-"text/uri-list")){var n=Q.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)&&(J.value=decodeURIComponent(n),z())}Q.stopPropagation();Q.preventDefault()}),!1)}};d.appendChild(C);d.appendChild(J);mxUtils.br(d);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+":");d.appendChild(e);var A=document.createElement("input");A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";
-A.value=null==k||u?"":k.width;d.appendChild(A);mxUtils.write(d,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==k||u?"":k.height;d.appendChild(x);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(J,"change",z);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],
-null!=M&&(J.value=M.url,z()));J.focus()};d.appendChild(F);d.appendChild(c);mxUtils.br(d);u?(F.setAttribute("checked","checked"),F.checked=!0):(C.setAttribute("checked","checked"),C.checked=!0);!t&&F.checked&&(mxUtils.write(m,mxResources.get("pageNotFound")),m.setAttribute("disabled","disabled"),m.setAttribute("selected","selected"),m.setAttribute("value","pageNotFound"),c.appendChild(m),mxEvent.addListener(c,"change",function(){null==m.parentNode||m.selected||m.parentNode.removeChild(m)}));k=document.createElement("div");
-k.style.marginTop="30px";k.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){p=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&k.appendChild(t);e=mxUtils.button(mxResources.get("reset"),function(){J.value="";A.value="";x.value="";C.checked=!0;p=!1});mxEvent.addGestureListeners(e,function(){p=!0});e.className="geBtn";e.width="100";k.appendChild(e);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(M){null!=I.files&&(y(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);e=mxUtils.button(mxResources.get("open"),function(){I.click()});e.className="geBtn";k.appendChild(e)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(M){f(""!=M&&null!=M?new mxImage(M,A.value,x.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){q=!0});applyBtn.className="geBtn gePrimaryBtn";
-k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(t);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(p,q,z){var y=p.split("\n");if("plantUmlPng"==q||"plantUmlSvg"==q||"plantUmlTxt"==q){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(T,V,U,X,l){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(new mxRectangle(0,0,X,l));var B=null;x.getModel().beginUpdate();try{B="txt"==V?b.insertAsPreText(U,u.x,u.y):x.insertVertex(null,null,null,u.x,u.y,
-X,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),x.setAttributeForCell(B,"plantUmlData",JSON.stringify({data:T,format:V},null,2))}finally{x.getModel().endUpdate()}null!=B&&(x.setSelectionCell(B),x.scrollCellToVisible(B))},x=b.editor.graph,I="plantUmlTxt"==q?"txt":"plantUmlPng"==q?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-p&&"svg"==I?window.setTimeout(function(){b.spinner.stop();A(p,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(p,I,function(T,V,U){b.spinner.stop();A(p,I,T,V,U)},function(T){b.handleError(T)})}}else if("mermaid"==q)b.spinner.spin(document.body,mxResources.get("inserting"))&&(x=b.editor.graph,b.generateMermaidImage(p,I,function(T,V,U){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(new mxRectangle(0,0,V,U));b.spinner.stop();var X=null;x.getModel().beginUpdate();try{X=x.insertVertex(null,null,null,u.x,u.y,V,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-T+";"),x.setAttributeForCell(X,"mermaidData",JSON.stringify({data:p,config:EditorUi.defaultMermaidConfig},null,2))}finally{x.getModel().endUpdate()}null!=X&&(x.setSelectionCell(X),x.scrollCellToVisible(X))},function(T){b.handleError(T)}));else if("table"==q){q=null;for(var M=[],E=0,Q={},n=0;n<y.length;n++){var v=mxUtils.trim(y[n]);if("primary key"==v.substring(0,11).toLowerCase()){var D=v.match(/\((.+)\)/);D&&D[1]&&(Q[D[1]]=!0);y.splice(n,1)}else 0<v.toLowerCase().indexOf("primary key")&&(Q[v.split(" ")[0]]=
-!0,y[n]=mxUtils.trim(v.replace(/primary key/i,"")))}for(n=0;n<y.length;n++)if(v=mxUtils.trim(y[n]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-1))),q=new mxCell(v,new mxGeometry(E,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),q.vertex=!0,M.push(q),v=b.editor.graph.getPreferredSizeForCell(H),null!=
-v&&(q.geometry.width=v.width+10);else if(null!=q&&")"==v.charAt(0))E+=q.geometry.width+40,q=null;else if("("!=v&&null!=q){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);D=Q[v.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(D?"1":"0")+";");H.vertex=!0;var K=new mxCell(D?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(D?"fontStyle=1;":""));K.vertex=!0;H.insert(K);v=new mxCell(v,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(D?"fontStyle=5;":""));v.vertex=!0;H.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&q.geometry.width<v.width+30&&(q.geometry.width=Math.min(320,
-Math.max(q.geometry.width,v.width+30)));q.insert(H,D?0:null);q.geometry.height+=30}0<M.length&&(x=b.editor.graph,u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0)),x.setSelectionCells(x.importCells(M,u.x,u.y)),x.scrollCellToVisible(x.getSelectionCell()))}else if("list"==q){if(0<y.length){x=b.editor.graph;H=null;M=[];for(n=q=0;n<y.length;n++)";"!=y[n].charAt(0)&&(0==y[n].length?H=null:null==H?(H=new mxCell(y[n],new mxGeometry(q,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-H.vertex=!0,M.push(H),v=x.getPreferredSizeForCell(H),null!=v&&H.geometry.width<v.width+10&&(H.geometry.width=v.width+10),q+=H.geometry.width+40):"--"==y[n]?(v=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;"),v.vertex=!0,H.geometry.height+=v.geometry.height,H.insert(v)):0<y[n].length&&(E=new mxCell(y[n],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;"),
-E.vertex=!0,v=x.getPreferredSizeForCell(E),null!=v&&E.geometry.width<v.width&&(E.geometry.width=v.width),H.geometry.width=Math.max(H.geometry.width,E.geometry.width),H.geometry.height+=E.geometry.height,H.insert(E)));if(0<M.length){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0));x.getModel().beginUpdate();try{M=x.importCells(M,u.x,u.y);v=[];for(n=0;n<M.length;n++)v.push(M[n]),v=v.concat(M[n].children);x.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{x.getModel().endUpdate()}x.setSelectionCells(M);
-x.scrollCellToVisible(x.getSelectionCell())}}}else{H=function(T){var V=G[T];null==V&&(V=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),V.vertex=!0,G[T]=V,M.push(V));return V};var G={};M=[];for(n=0;n<y.length;n++)if(";"!=y[n].charAt(0)){var N=y[n].split("->");2<=N.length&&(D=H(N[0]),K=H(N[N.length-1]),N=new mxCell(2<N.length?N[1]:"",new mxGeometry),N.edge=!0,D.insertEdge(N,!0),K.insertEdge(N,!1),M.push(N))}if(0<M.length){y=document.createElement("div");y.style.visibility="hidden";
-document.body.appendChild(y);x=new Graph(y);x.getModel().beginUpdate();try{M=x.importCells(M);for(n=0;n<M.length;n++)x.getModel().isVertex(M[n])&&(v=x.getPreferredSizeForCell(M[n]),M[n].geometry.width=Math.max(M[n].geometry.width,v.width),M[n].geometry.height=Math.max(M[n].geometry.height,v.height));n=!0;"horizontalFlow"==q||"verticalFlow"==q?((new mxHierarchicalLayout(x,"horizontalFlow"==q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(x.getDefaultParent(),M),n=!1):"circle"==q?
-(new mxCircleLayout(x)).execute(x.getDefaultParent()):(E=new mxFastOrganicLayout(x),E.disableEdgeStyle=!1,E.forceConstant=180,E.execute(x.getDefaultParent()));n&&(Q=new mxParallelEdgeLayout(x),Q.spacing=30,Q.execute(x.getDefaultParent()))}finally{x.getModel().endUpdate()}x.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{M=x.getModel().getChildren(x.getDefaultParent()),u=mxEvent.isAltDown(z)?u:b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0)),v=b.editor.graph.importCells(M,
-u.x,u.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());x.destroy();y.parentNode.removeChild(y)}}}function t(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value?
-"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var u=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
-"none";C.style.width="100%";C.style.height="354px";C.style.marginBottom="16px";var F=document.createElement("select");if("formatSql"==k||"mermaid"==k)F.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=k&&F.appendChild(J);null!=k&&"fromText"!=k||J.setAttribute("selected","selected");J=document.createElement("option");J.setAttribute("value","table");mxUtils.write(J,mxResources.get("formatSql"));"formatSql"==
-k&&(F.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","mermaid");mxUtils.write(J,mxResources.get("formatSql"));"mermaid"==k&&(F.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var e=document.createElement("option");
-e.setAttribute("value","horizontalFlow");mxUtils.write(e,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(F.appendChild(J),F.appendChild(c),F.appendChild(e),F.appendChild(g));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&J.setAttribute("selected",
-"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(F.appendChild(J),F.appendChild(c),F.appendChild(e));var m=t();C.value=m;f.appendChild(C);this.init=function(){C.focus()};
-Graph.fileSupport&&(C.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),C.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var q=new FileReader;q.onload=function(z){C.value=z.target.result};q.readAsText(p)}},!1));f.appendChild(F);mxEvent.addListener(F,"change",function(){var p=t();if(0==C.value.length||C.value==m)m=p,C.value=m});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(J=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),J.className="geBtn",f.appendChild(J));J=mxUtils.button(mxResources.get("close"),function(){C.value==m?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&f.appendChild(J);c=mxUtils.button(mxResources.get("insert"),function(p){b.hideDialog();d(C.value,F.value,p)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(J);this.container=f},NewDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q,z,y,A){function x(la){null!=la&&(Ga=Ea=la?135:140);la=!0;if(null!=xa)for(;G<xa.length&&(la||0!=mxUtils.mod(G,30));){var da=xa[G++];da=E(da.url,da.libs,da.title,da.tooltip?da.tooltip:da.title,da.select,da.imgUrl,da.info,da.onClick,da.preview,da.noImg,da.clibs);la&&da.click();la=!1}}function I(){if(aa&&null!=p)k||b.hideDialog(),p(aa,Z,K.value);else if(d)k||b.hideDialog(),d(S,K.value,Y,O);else{var la=K.value;null!=la&&
-0<la.length&&b.pickFolder(b.mode,function(da){b.createFile(la,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,da,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(la,da,ca,na,ka,pa,ea){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");T.removeAttribute("disabled");S=da;O=ca;R=pa;W=la;aa=na;Y=ea;Z=ka;W.style.backgroundColor=F;W.style.border=J}function E(la,da,ca,na,ka,pa,ea,ia,
-oa,ua,wa){function Ca(Ja,Ta){null==Ha?(La=Ja,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,La)}))):Ta(Ha,La)}function ya(Ja,Ta,Va){if(null!=Ja&&mxUtils.isAncestorNode(document.body,sa)){Ja=mxUtils.parseXml(Ja);Ja=Editor.parseDiagramNode(Ja.documentElement);var Wa=new mxCodec(Ja.ownerDocument),$a=new mxGraphModel;
-Wa.decode(Ja,$a);Ja=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,Ja,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ca?mxResources.get(ca,null,ca):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(sa,null,null,la,ea,wa)},!0,!1)}}function ta(Ja,Ta){null==la||Qa||
-b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ia?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ia.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ia.naturalWidth+'" height="'+Ia.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ya(Ta,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja))):(b.sidebar.currentElt=
-sa,Qa=!0,Ca(la,function(Va){Qa&&b.sidebar.currentElt==sa&&ya(Va,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja));Qa=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Ga+"px";sa.style.width=Ea+"px";var Ha=null,La=la;null!=ca?sa.setAttribute("title",mxResources.get(ca,null,ca)):null!=na&&0<na.length&&sa.setAttribute("title",na);var Qa=!1,Ia=null;if(null!=pa){sa.style.display="inline-flex";sa.style.justifyContent="center";
-sa.style.alignItems="center";ka=document.createElement("img");ka.setAttribute("src",pa);ka.setAttribute("alt",na);ka.style.maxWidth=Ga+"px";ka.style.maxHeight=Ea+"px";Ia=ka;var Na=pa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(ka);ka.onerror=function(){this.src!=Na?this.src=Na:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){M(sa,null,null,la,ea,wa)}),null,null);mxEvent.addListener(sa,"dblclick",function(Ja){I();
-mxEvent.consume(Ja)})}else if(!ua&&null!=la&&0<la.length){var Oa=function(Ja){T.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";N.spin(ba);Ca(la,function(Ta,Va){N.stop();null!=Ta&&(M(sa,Ta,da,null,null,wa,Va),Ja&&I())})};ka=oa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";sa.style.backgroundImage="url("+ka+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ca){na=document.createElement("table");
-na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";pa=document.createElement("tbody");oa=document.createElement("tr");ua=document.createElement("td");ua.setAttribute("align","center");ua.setAttribute("valign","middle");var Ma=document.createElement("span");Ma.style.display="inline-block";Ma.style.padding="4px 8px 4px 8px";Ma.style.userSelect="none";Ma.style.borderRadius=
-"3px";Ma.style.background="rgba(255,255,255,0.85)";Ma.style.overflow="hidden";Ma.style.textOverflow="ellipsis";Ma.style.maxWidth=Ga-34+"px";mxUtils.write(Ma,mxResources.get(ca,null,ca));ua.appendChild(Ma);oa.appendChild(ua);pa.appendChild(oa);na.appendChild(pa);sa.appendChild(na)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){Oa()}),null,null);mxEvent.addListener(sa,"dblclick",function(Ja){Oa(!0);mxEvent.consume(Ja)})}else na=document.createElement("table"),na.setAttribute("width",
-"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",pa=document.createElement("tbody"),oa=document.createElement("tr"),ua=document.createElement("td"),ua.setAttribute("align","center"),ua.setAttribute("valign","middle"),Ma=document.createElement("span"),Ma.style.display="inline-block",Ma.style.padding="4px 8px 4px 8px",Ma.style.userSelect="none",Ma.style.borderRadius="3px",Ma.style.background="#ffffff",Ma.style.overflow="hidden",Ma.style.textOverflow="ellipsis",Ma.style.maxWidth=
-Ga-34+"px",mxUtils.write(Ma,mxResources.get(ca,null,ca)),ua.appendChild(Ma),oa.appendChild(ua),pa.appendChild(oa),na.appendChild(pa),sa.appendChild(na),ka&&M(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){M(sa,null,null,la,ea)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(Ja){M(sa,null,null,la,ea)}),mxEvent.addListener(sa,"dblclick",function(Ja){I();mxEvent.consume(Ja)}));if(null!=la){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ja){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ja){Ua||ta(Ja,Sa);mxEvent.consume(Ja)}))}ba.appendChild(sa);return sa}function Q(){function la(ta,
-sa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+sa.length+")"}function da(ta,sa,Ha){mxEvent.addListener(sa,"click",function(){Ba!=sa&&(Ba.style.backgroundColor="",Ba=sa,Ba.style.backgroundColor=C,ba.scrollTop=0,ba.innerText="",G=0,xa=Ha?Pa[ta][Ha]:za[ta],U=null,x(!1))})}qa&&(qa=!1,mxEvent.addListener(ba,"scroll",function(ta){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(x(),mxEvent.consume(ta))}));
-if(0<Fa){var ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var na in Aa){var ka=document.createElement("div"),pa=na;ca=Aa[na];18<pa.length&&(pa=pa.substring(0,18)+"&hellip;");ka.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ka.setAttribute("title",
-pa+" ("+ca.length+")");mxUtils.write(ka,ka.getAttribute("title"));null!=c&&(ka.style.padding=c);ma.appendChild(ka);(function(ta,sa){mxEvent.addListener(ka,"click",function(){Ba!=sa&&(Ba.style.backgroundColor="",Ba=sa,Ba.style.backgroundColor=C,ba.scrollTop=0,ba.innerText="",G=0,xa=Aa[ta],U=null,x(!1))})})(na,ka)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(na in za){pa=
-Pa[na];var ea=ka=document.createElement(pa?"ul":"div");ca=za[na];var ia=la(na,ca);if(null!=pa){var oa=document.createElement("li"),ua=document.createElement("div");ua.className="geTempTreeCaret";ua.setAttribute("title",ia);mxUtils.write(ua,ia);ea=ua;oa.appendChild(ua);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var wa in pa){var Ca=document.createElement("li"),ya=la(wa,pa[wa]);Ca.setAttribute("title",ya);mxUtils.write(Ca,ya);da(na,Ca,wa);ia.appendChild(Ca)}oa.appendChild(ia);
-ka.className="geTempTree";ka.appendChild(oa);(function(ta,sa){mxEvent.addListener(sa,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,ua)}else ka.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ka.setAttribute("title",ia),mxUtils.write(ka,ia);null!=c&&(ka.style.padding=c);ma.appendChild(ka);null==Ba&&0<ca.length&&(Ba=ka,Ba.style.backgroundColor=C,xa=ca);da(na,ea)}x(!1)}var n=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;t=null!=t?t:!1;C=null!=C?C:"#ebf2f9";F=null!=F?F:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";J=null!=J?J:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var v=document.createElement("div");
-v.style.userSelect="none";v.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";k&&v.appendChild(D);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||n||!k||D.appendChild(H);k&&mxUtils.write(D,(n?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+H);K.style.marginLeft="10px";K.style.width=f||
-n?"144px":"244px";this.init=function(){k&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(la){b.sidebar.hideTooltip()}),null,null)};k&&(D.appendChild(K),A?K.style.width=f||n?"350px":"450px":(null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),A.style.marginLeft=
-"6px",A.style.width=f||n?"80px":"180px",D.appendChild(A)),null!=b.editor.fileExtensions&&(n=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),n.style.marginTop="12px",D.appendChild(n))));D=!1;var G=0,N=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}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn";
-if(g||m){var V=[],U=null,X=null,l=null,B=function(la){T.setAttribute("disabled","disabled");for(var da=0;da<V.length;da++)V[da].className=da==la?"geBtn gePrimaryBtn":"geBtn"};D=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";v.appendChild(z);n=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";fa.style.display="";ba.style.left="160px";B(0);ba.scrollTop=0;ba.innerText="";G=0;U!=xa&&(xa=U,za=X,Fa=l,ma.innerText="",Q(),U=null)});
-V.push(n);z.appendChild(n);var L=function(la){ma.style.display="none";fa.style.display="none";ba.style.left="30px";B(la?-1:1);null==U&&(U=xa);ba.scrollTop=0;ba.innerText="";N.spin(ba);var da=function(ca,na,ka){G=0;N.stop();xa=ca;ka=ka||{};var pa=0,ea;for(ea in ka)pa+=ka[ea].length;if(na)ba.innerText=na;else if(0==ca.length&&0==pa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<pa){ma.style.display="";ba.style.left="160px";ma.innerText="";Fa=0;za={"draw.io":ca};
-for(ea in ka)za[ea]=ka[ea];Q()}else x(!0)};la?m(P.value,da):g(da)};g&&(n=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),z.appendChild(n),V.push(n));if(m){n=document.createElement("span");n.style.marginLeft="10px";n.innerText=mxResources.get("search")+":";z.appendChild(n);var P=document.createElement("input");P.style.marginRight="10px";P.style.marginLeft="10px";P.style.width="220px";mxEvent.addListener(P,"keypress",function(la){13==la.keyCode&&L(!0)});z.appendChild(P);n=mxUtils.button(mxResources.get("search"),
-function(){L(!0)});n.className="geBtn";z.appendChild(n)}B(0)}var O=null,R=null,S=null,W=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";z=(k?72:40)+(D?30:0);ba.style.top=z+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+
-z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ja=document.createElement("input");ja.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ja.setAttribute("placeholder",mxResources.get("search"));ja.setAttribute("type","text");fa.appendChild(ja);var ha=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ha.setAttribute("src",ra);ha.setAttribute("title",mxResources.get("search"));
-ha.style.position="relative";ha.style.left="-18px";ha.style.top="1px";ha.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ha);mxEvent.addListener(ha,"click",function(){ha.getAttribute("src")==Dialog.prototype.closeImage&&(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search")),ja.value="",null!=Ra&&(Ra.click(),Ra=null));ja.focus()});mxEvent.addListener(ja,"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var da=ja.value;if(""==da)null!=Ra&&(Ra.click(),
-Ra=null);else{if(null==NewDialog.tagsList[e]){var ca={};for(wa in za)for(var na=za[wa],ka=0;ka<na.length;ka++){var pa=na[ka];if(null!=pa.tags)for(var ea=pa.tags.toLowerCase().split(";"),ia=0;ia<ea.length;ia++)null==ca[ea[ia]]&&(ca[ea[ia]]=[]),ca[ea[ia]].push(pa)}NewDialog.tagsList[e]=ca}var oa=da.toLowerCase().split(" ");ca=NewDialog.tagsList[e];if(0<Fa&&null==ca.__tagsList__){for(wa in Aa)for(na=Aa[wa],ka=0;ka<na.length;ka++)for(pa=na[ka],ea=pa.title.split(" "),ea.push(wa),ia=0;ia<ea.length;ia++){var ua=
-ea[ia].toLowerCase();null==ca[ua]&&(ca[ua]=[]);ca[ua].push(pa)}ca.__tagsList__=!0}var wa=[];na={};for(ka=ea=0;ka<oa.length;ka++)if(0<oa[ka].length){ua=ca[oa[ka]];var Ca={};wa=[];if(null!=ua)for(ia=0;ia<ua.length;ia++)pa=ua[ia],0==ea==(null==na[pa.url])&&(Ca[pa.url]=!0,wa.push(pa));na=Ca;ea++}ba.scrollTop=0;ba.innerText="";G=0;ca=document.createElement("div");ca.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ca,mxResources.get(0==wa.length?"noResultsFor":
-"resultsFor",[da]));ba.appendChild(ca);null!=Ba&&null==Ra&&(Ba.style.backgroundColor="",Ra=Ba,Ba=ca);xa=wa;U=null;x(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ja,"keyup",mxUtils.bind(this,function(la){""==ja.value?(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));z+=23;var ma=document.createElement("div");ma.style.cssText="position:absolute;left:30px;width:128px;top:"+
-z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ga=140,Ea=140,za={},Pa={},Aa={},Fa=0,qa=!0,Ba=null,Ra=null;za.basic=[{title:"blankDiagram",select:!0}];var xa=za.basic;if(!f){var Da=function(){mxUtils.get(Ka,function(la){if(!va){va=!0;la=la.getXml().documentElement.firstChild;for(var da={};null!=la;){if("undefined"!==typeof la.getAttribute)if("clibs"==la.nodeName){for(var ca=la.getAttribute("name"),na=
-la.getElementsByTagName("add"),ka=[],pa=0;pa<na.length;pa++)ka.push(encodeURIComponent(mxUtils.getTextContent(na[pa])));null!=ca&&0<ka.length&&(da[ca]=ka.join(";"))}else if(ka=la.getAttribute("url"),null!=ka){na=la.getAttribute("section");ca=la.getAttribute("subsection");if(null==na&&(pa=ka.indexOf("/"),na=ka.substring(0,pa),null==ca)){var ea=ka.indexOf("/",pa+1);-1<ea&&(ca=ka.substring(pa+1,ea))}pa=za[na];null==pa&&(pa=[],za[na]=pa);ka=la.getAttribute("clibs");null!=da[ka]&&(ka=da[ka]);ka={url:la.getAttribute("url"),
-libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ka,tags:la.getAttribute("tags")};pa.push(ka);null!=ca&&(pa=Pa[na],null==pa&&(pa={},Pa[na]=pa),na=pa[ca],null==na&&(na=[],pa[ca]=na),na.push(ka))}la=la.nextSibling}N.stop();Q()}})};v.appendChild(fa);v.appendChild(ma);v.appendChild(ba);var va=!1,Ka=e;/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)&&(Ka=PROXY_URL+"?url="+encodeURIComponent(Ka));
-N.spin(ba);null!=y?y(function(la,da){Aa=la;l=Fa=da;Da()},Da):Da();X=za}mxEvent.addListener(K,"keypress",function(la){b.dialog.container.firstChild==v&&13==la.keyCode&&I()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!k||null!=d||t||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-z.className="geBtn",y.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(z);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(da){null!=da&&0<da.length&&b.editor.loadUrl(b.editor.getProxiedUrl(da),function(ca){S=
-ca;O=null;templateRealURl=da;b.hideDialog();I()},function(ca){b.handleError(ca)})},mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(da){b.openFiles(la.files,!0);
-la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=la}b.newDlgFileInputElt.click()}),q.className="geBtn",y.appendChild(q));y.appendChild(T);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(z);v.appendChild(y);this.container=v};NewDialog.tagsList={};
-var CreateDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q,z,y){function A(D,H,K,G){function N(){mxEvent.addListener(T,"click",function(){var B=K;if(C){var L=M.value,P=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>P){B=null!=B?B:v.value;var O="";B==App.MODE_GOOGLE?O=b.drive.extension:B==App.MODE_GITHUB?O=b.gitHub.extension:B==App.MODE_GITLAB?O=b.gitLab.extension:B==App.MODE_TRELLO?O=b.trello.extension:B==App.MODE_DROPBOX?O=b.dropbox.extension:B==App.MODE_ONEDRIVE?O=b.oneDrive.extension:B==App.MODE_DEVICE&&
-(O=".drawio");0<=P&&(L=L.substring(0,P));M.value=L+O}}x(K)})}var T=document.createElement("a");T.style.overflow="hidden";var V=document.createElement("img");V.src=D;V.setAttribute("border","0");V.setAttribute("align","absmiddle");V.style.width="60px";V.style.height="60px";V.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(V);T.style.color=
-"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=G&&null==b[G]){V.style.visibility="hidden";mxUtils.setOpacity(U,10);var X=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});X.spin(T);var l=window.setTimeout(function(){null==b[G]&&(X.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(l),
-mxUtils.setOpacity(U,100),V.style.visibility="",X.stop(),N())}))}else N();Q.appendChild(T);++n==g&&(mxUtils.br(Q),n=0)}function x(D){var H=M.value;if(null==D||null!=H&&0<H.length)y&&b.hideDialog(),k(H,D,M)}e="1"==urlParams.noDevice?!1:e;C=null!=C?C:!0;F=null!=F?F:!0;g=null!=g?g:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var I=document.createElement("h2");mxUtils.write(I,t||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
-"24px";u.appendChild(I);mxUtils.write(u,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",f);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};u.appendChild(M);null!=z&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),
-t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,M,z)));z=null;if("1"!=urlParams.noDevice&&null!=m&&null!=p&&"image/"==p.substring(0,6)&&("image/svg"!=p.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";t=document.createElement("img");var E=q?m:btoa(unescape(encodeURIComponent(m)));t.setAttribute("src","data:"+p+";base64,"+E);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=p||(z=mxUtils.button(mxResources.get("copy"),function(D){D=b.base64ToBlob(E,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+p+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
-z.style.marginTop="6px",z.className="geBtn");J&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(D){mxEvent.isPopupTrigger(D)||x("_blank")}))}mxUtils.br(u);var Q=document.createElement("div");Q.style.textAlign="center";var n=0;Q.style.marginTop="6px";u.appendChild(Q);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(m=document.createElement("option"),m.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(m,mxResources.get("googleDrive")),v.appendChild(m),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(m,mxResources.get("oneDrive")),v.appendChild(m),b.mode==App.MODE_ONEDRIVE&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(m,mxResources.get("dropbox")),v.appendChild(m),b.mode==App.MODE_DROPBOX&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_GITHUB),mxUtils.write(m,mxResources.get("github")),v.appendChild(m),A(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_GITLAB),mxUtils.write(m,mxResources.get("gitlab")),v.appendChild(m),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_TRELLO),mxUtils.write(m,mxResources.get("trello")),v.appendChild(m),A(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)m=document.createElement("option"),m.setAttribute("value",App.MODE_DEVICE),mxUtils.write(m,mxResources.get("device")),v.appendChild(m),b.mode!=App.MODE_DEVICE&&F||m.setAttribute("selected","selected"),e&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);F&&isLocalStorage&&"0"!=urlParams.browser&&(F=document.createElement("option"),
-F.setAttribute("value",App.MODE_BROWSER),mxUtils.write(F,mxResources.get("browser")),v.appendChild(F),b.mode==App.MODE_BROWSER&&F.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));F=document.createElement("div");F.style.marginTop="26px";F.style.textAlign="center";null!=c&&(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(c)}),e.className="geBtn",F.appendChild(e));e=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
-function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});e.className="geBtn";b.editor.cancelFirst&&null==d&&F.appendChild(e);null==d&&(m=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),m.className="geBtn",F.appendChild(m));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),J.className="geBtn",F.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),
-function(){x("download")}),J.className="geBtn",F.appendChild(J),null!=z&&(J.style.marginTop="6px",F.style.marginTop="6px"));null!=z&&(mxUtils.br(F),F.appendChild(z));b.editor.cancelFirst&&null==d||F.appendChild(e);mxEvent.addListener(M,"keypress",function(D){13==D.keyCode?x(App.MODE_DEVICE):27==D.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(F);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,k,d,t){t=null!=t?t:!0;var u=document.createElement("div");u.style.textAlign="left";u.style.height="100%";mxUtils.write(u,mxResources.get("fileOpenLocation"));mxUtils.br(u);mxUtils.br(u);var C=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";u.appendChild(C);mxUtils.br(u);var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
-null!=k&&k();b.openLink(f,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=C.style.width;u.appendChild(F);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,k,d,t,u,C,F){function J(){0<g.value.length?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}u=null!=u?u:!0;var c=b.editor.graph,e=document.createElement("div");mxUtils.write(e,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
-"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",k);g.setAttribute("type","text");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.style.marginTop="6px";g.style.width=(Graph.fileSupport?460:340)-20+"px";g.style.backgroundImage="url('"+
-Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});
-f.appendChild(g);f.appendChild(k);e.appendChild(f);var m=F,p,q,z=function(I,M,E,Q){var n="data:"==I.substring(0,5);!b.isOffline()||n&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(v){b.spinner.stop();b.hideDialog();var D=!1===Q?1:null!=M&&null!=E?Math.max(M/v.width,E/v.height):Math.min(1,Math.min(520/v.width,520/v.height));u&&(I=b.convertDataUri(I));d(I,Math.round(Number(v.width)*D),Math.round(Number(v.height)*D),m,p,q)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,m,p,q)):(I=b.convertDataUri(I),M=null==M?120:M,E=null==E?100:E,b.hideDialog(),d(I,M,E,m,p,q))},y=function(I,M){if(null!=I){var E=t?null:c.getModel().getGeometry(c.getSelectionCell());null!=E?z(I,E.width,E.height,M):z(I,null,null,M)}else b.hideDialog(),d(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var I=e.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(E){null!=M&&(M.parentNode.removeChild(M),M=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,
-0,0,b.maxImageSize,function(n,v,D,H,K,G,N,T){y(n,T)},function(){},function(n){return"image/"==n.type.substring(0,6)},function(n){for(var v=0;v<n.length;v++)n[v]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var Q=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(Q)&&y(decodeURIComponent(Q))}E.stopPropagation();E.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=
-"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&F.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type",
-"file");mxEvent.addListener(A,"change",function(I){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(M,E,Q,n,v,D){y(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var E=0;E<M.length;E++)M[E]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";F.appendChild(f)}mxEvent.addListener(g,
-"keypress",function(I){13==I.keyCode&&y(g.value)});var x=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,m,function(M,E,Q){m=M;p=E;q=Q});b.showDialog(I.container,300,390,!0,!0)});C&&(x.className="geBtn",F.appendChild(x));mxEvent.addListener(g,"change",function(I){m=null;J()});J();C=mxUtils.button(mxResources.get("apply"),function(){y(g.value)});C.className="geBtn gePrimaryBtn";F.appendChild(C);b.editor.cancelFirst||F.appendChild(k);Graph.fileSupport&&(F.style.marginTop=
-"120px",e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",e.style.backgroundPosition="center 65%",e.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")),e.appendChild(C));e.appendChild(F);this.container=e},LinkDialog=function(b,f,k,d,t,u,C){function F(I,M,E){E=mxUtils.button("",E);
-E.className="geBtn";E.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",I);E.style.minWidth="42px";E.style.verticalAlign="middle";E.appendChild(M);x.appendChild(E)}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,mxResources.get("editLink")+":");var 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";c.style.paddingRight="20px";var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="97%";e.style.boxSizing="border-box";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";e.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title",
-mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){e.value="";e.focus()});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","geLinkDialogOption");
-var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","geLinkDialogOption");var q=document.createElement("select");q.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=C&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);C=null!=C?C:"_blank";z.setAttribute("title",C);u&&(e.style.width="340px");if(t&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(e.setAttribute("value",f),m.setAttribute("checked","checked"),m.defaultChecked=!0);c.appendChild(m);c.appendChild(e);c.appendChild(g);u&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(p);t=!1;for(u=0;u<b.pages.length;u++)g=document.createElement("option"),mxUtils.write(g,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),g.setAttribute("value",
-"data:page/id,"+b.pages[u].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),t=!0),q.appendChild(g);if(!t&&p.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");q.appendChild(y);mxEvent.addListener(q,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}c.appendChild(q)}else e.setAttribute("value",
-f),c.appendChild(e),c.appendChild(g);J.appendChild(c);var A=mxUtils.button(k,function(){b.hideDialog();d(p.checked?"pageNotFound"!==q.value?q.value:f:e.value,LinkDialog.selectedDocs,z.checked?C:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){p.checked?q.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){m.removeAttribute("checked");p.setAttribute("checked",
-"checked");p.checked=!0});mxEvent.addListener(e,"focus",function(){p.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){var I=J.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(E){null!=M&&(M.parentNode.removeChild(M),M=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));E.stopPropagation();E.preventDefault()}));
-mxEvent.addListener(I,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),m.setAttribute("checked","checked"),m.checked=!0,A.click());E.stopPropagation();E.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="18px";x.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-k.style.verticalAlign="middle";k.className="geBtn";x.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&x.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var M=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
-"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+I.docs[0].id);e.value=M;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){e.value=I[0].link;e.focus()}})});null!=b.oneDrive&&F(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(I,M){e.value=M.value[0].webUrl;e.focus()},!0)});null!=b.gitHub&&F(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var M=I[0],E=I[1],Q=I[2];I=I.slice(3,I.length).join("/");e.value="https://github.com/"+M+"/"+E+"/blob/"+Q+"/"+I;e.focus()}})});null!=b.gitLab&&F(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var M=
-I[0],E=I[1],Q=I[2];I=I.slice(3,I.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+M+"/"+E+"/blob/"+Q+"/"+I;e.focus()}})});mxEvent.addListener(e,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(p.checked?q.value:e.value,LinkDialog.selectedDocs))});x.appendChild(A);b.editor.cancelFirst||x.appendChild(k);J.appendChild(x);this.container=J},FeedbackDialog=function(b,f,k,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
-"18px";u.style.marginBottom="18px";t.appendChild(u);u=document.createElement("div");mxUtils.write(u,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));t.appendChild(u);var C=document.createElement("input");C.setAttribute("type","text");C.style.marginTop="6px";C.style.width="600px";var F=mxUtils.button(mxResources.get("sendMessage"),function(){var g=e.value+(c.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;g.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
-":\n"+g),function(m){b.spinner.stop();200<=m.getStatus()&&299>=m.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});F.className="geBtn gePrimaryBtn";if(!k){F.setAttribute("disabled","disabled");var J=/^(([^<>()[\]\\.,;:\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(C,
-"change",function(){0<C.value.length&&0<J.test(C.value)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&J.test(C.value)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")})}t.appendChild(C);this.init=function(){C.focus()};var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
-k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(u);mxEvent.addListener(u,"click",function(g){c.checked=!c.checked;mxEvent.consume(g)});t.appendChild(k);u=document.createElement("div");mxUtils.write(u,mxResources.get("feedback"));t.appendChild(u);var e=document.createElement("textarea");e.style.resize="none";e.style.width="600px";e.style.height="140px";e.style.marginTop="6px";e.setAttribute("placeholder",mxResources.get("comments"));
-t.appendChild(e);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst?(k.appendChild(u),k.appendChild(F)):(k.appendChild(F),k.appendChild(u));t.appendChild(k);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,f,k){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="0px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.left="199px";u.style.width="470px";u.style.height="376px";
-u.style.overflow="hidden";var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";u.appendChild(C);mxEvent.disableContextMenu(u);d.appendChild(u);var F=new Graph(u);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;var J=0,c=null,e=0,g=F.getGlobalVariable;
-F.getGlobalVariable=function(W){return"page"==W&&null!=c&&null!=c[e]?c[e].getAttribute("name"):"pagenumber"==W?e+1:"pagecount"==W?null!=c?c.length:1:g.apply(this,arguments)};F.getLinkForCell=function(){return null};Editor.MathJaxRender&&F.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(F.container)}));var m={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},p=new Spinner(m),q=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(m=0;m<z.length;m++)y[z[m].getAttribute("id")]=z[m];var A=null,x=null,I=null,M=null,E=mxUtils.button("",function(){null!=I&&F.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
-mxUtils.setOpacity(E,20);var Q=mxUtils.button("",function(){null!=I&&F.zoomOut()});Q.className="geSprite geSprite-zoomout";Q.setAttribute("title",mxResources.get("zoomOut"));Q.style.outline="none";Q.style.border="none";Q.style.margin="2px";Q.setAttribute("disabled","disabled");mxUtils.setOpacity(Q,20);var n=mxUtils.button("",function(){null!=I&&(F.maxFitScale=8,F.fit(8),F.center())});n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("fit"));n.style.outline="none";n.style.border=
-"none";n.style.margin="2px";n.setAttribute("disabled","disabled");mxUtils.setOpacity(n,20);var v=mxUtils.button("",function(){null!=I&&(F.zoomActual(),F.center())});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var D=mxUtils.button("",function(){});D.className="geSprite geSprite-middle";D.setAttribute("title",mxResources.get("compare"));
-D.style.outline="none";D.style.border="none";D.style.margin="2px";mxUtils.setOpacity(D,60);var H=u.cloneNode(!1);H.style.pointerEvent="none";u.parentNode.appendChild(H);var K=new Graph(H);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(D,function(W){W=y[c[J].getAttribute("id")];mxUtils.setOpacity(D,20);C.innerText="";null==W?mxUtils.write(C,
-mxResources.get("pageNotFound")):(G.style.display="none",u.style.display="none",H.style.display="",H.style.backgroundColor=u.style.backgroundColor,W=Editor.parseDiagramNode(W),(new mxCodec(W.ownerDocument)).decode(W,K.getModel()),K.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y))},null,function(){mxUtils.setOpacity(D,60);C.innerText="";"none"==u.style.display&&(G.style.display="",u.style.display="",H.style.display="none")});var G=document.createElement("div");G.style.position=
-"absolute";G.style.textAlign="right";G.style.color="gray";G.style.marginTop="10px";G.style.backgroundColor="transparent";G.style.top="440px";G.style.right="32px";G.style.maxWidth="380px";G.style.cursor="default";var N=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var W=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(W,aa,"text/xml"):(W="undefined"===typeof pako?"&xml="+encodeURIComponent(W):"&data="+encodeURIComponent(Graph.compress(W)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+W)).simulate(document,"_blank"))}});N.className="geBtn";N.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(W){null!=I&&null!=M&&(mxEvent.isShiftDown(W)?null!=I&&(W=b.getPagesForNode(I.documentElement),W=b.diffPages(b.pages,W),W=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(W,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){q.patch([JSON.parse(aa)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(W.container,620,460,!0,!0),W.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(aa){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
-T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var V=document.createElement("select");V.setAttribute("disabled","disabled");V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";var U=null;mxEvent.addListener(V,"change",function(W){null!=U&&(U(W),mxEvent.consume(W))});var X=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});X.className="geBtn";X.setAttribute("disabled","disabled");null!=k&&(X.style.display="none");var l=mxUtils.button(mxResources.get("show"),function(){null!=x&&b.openLink(x.getUrl(V.selectedIndex))});l.className="geBtn gePrimaryBtn";l.setAttribute("disabled","disabled");null!=k&&(l.style.display="none",T.className="geBtn gePrimaryBtn");z=document.createElement("div");
-z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var L=null;if(null!=f&&0<f.length){u.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";
-var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(m=f.length-1;0<=m;m--){var S=function(W){var aa=new Date(W.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){p.stop();C.innerText="";var ja=mxUtils.parseXml(fa),ha=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=ha){var ra=function(Ga){null!=Ga&&(Ga=ma(Editor.parseDiagramNode(Ga)));return Ga},ma=function(Ga){var Ea=Ga.getAttribute("background");
-if(null==Ea||""==Ea||Ea==mxConstants.NONE)Ea=F.defaultPageBackgroundColor;u.style.backgroundColor=Ea;(new mxCodec(Ga.ownerDocument)).decode(Ga,F.getModel());F.maxFitScale=1;F.fit(8);F.center();return Ga};V.style.display="none";V.innerText="";I=ja;M=fa;c=parseSelectFunction=null;e=0;if("mxfile"==ha.nodeName){ja=ha.getElementsByTagName("diagram");c=[];for(fa=0;fa<ja.length;fa++)c.push(ja[fa]);e=Math.min(J,c.length-1);0<c.length&&ra(c[e]);if(1<c.length)for(V.removeAttribute("disabled"),V.style.display=
-"",fa=0;fa<c.length;fa++)ja=document.createElement("option"),mxUtils.write(ja,c[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),ja.setAttribute("value",fa),fa==e&&ja.setAttribute("selected","selected"),V.appendChild(ja);U=function(){try{var Ga=parseInt(V.value);e=J=Ga;ra(c[Ga])}catch(Ea){V.value=J,b.handleError(Ea)}}}else ma(ha);fa=W.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+
-" "+aa.toLocaleTimeString());G.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");Q.removeAttribute("disabled");n.removeAttribute("disabled");v.removeAttribute("disabled");D.removeAttribute("disabled");null!=q&&q.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),N.removeAttribute("disabled"),l.removeAttribute("disabled"),X.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(n,60);mxUtils.setOpacity(v,60);
-mxUtils.setOpacity(D,60)}else V.style.display="none",V.innerText="",G.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";W==f[f.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ba,
-aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=W.fileSize?" "+b.formatFileSize(parseInt(W.fileSize)):"")+(null!=W.lastModifyingUserName?" "+W.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){x!=W&&(p.stop(),null!=A&&(A.style.backgroundColor=""),x=W,A=Y,A.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=I=null,G.removeAttribute("title"),
-G.innerText=mxResources.get("loading")+"...",u.style.backgroundColor=F.defaultPageBackgroundColor,C.innerText="",F.getModel().clear(),T.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),V.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(n,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(D,20),p.spin(u),W.getXml(function(ja){if(x==W)try{Z(ja)}catch(ha){G.innerText=mxResources.get("error")+": "+ha.message}},function(ja){p.stop();V.style.display="none";V.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){l.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(f[m]);null!=S&&m==f.length-1&&(L=S)}P.appendChild(O);t.appendChild(P)}else null==q||null==b.drive&&q.constructor==window.DriveFile||null==b.dropbox&&q.constructor==window.DropboxFile?(u.style.display="none",B.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",B.style.display="none",mxUtils.write(t,
-mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";B.appendChild(V);B.appendChild(E);B.appendChild(Q);B.appendChild(v);B.appendChild(n);B.appendChild(D);b.editor.cancelFirst?(z.appendChild(t),z.appendChild(N),z.appendChild(X),z.appendChild(T),z.appendChild(l)):(z.appendChild(N),z.appendChild(X),z.appendChild(T),z.appendChild(l),z.appendChild(t));d.appendChild(z);d.appendChild(B);d.appendChild(G);
-this.container=d},DraftDialog=function(b,f,k,d,t,u,C,F,J){var c=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight="normal";mxUtils.write(e,f);c.appendChild(e);var g=document.createElement("select"),m=mxUtils.bind(this,function(){x=mxUtils.parseXml(J[g.value].data);I=b.editor.extractGraphModel(x.documentElement,!0);M=0;this.init()});if(null!=J){g.style.marginLeft="4px";for(f=0;f<J.length;f++){var p=
-document.createElement("option");p.setAttribute("value",f);var q=new Date(J[f].created),z=new Date(J[f].modified);mxUtils.write(p,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(p)}e.appendChild(g);mxEvent.addListener(g,"change",m)}null==k&&(k=J[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";y.style.marginTop="10px";y.style.left=
-"40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);c.appendChild(y);var A=new Graph(y);A.setEnabled(!1);A.setPanning(!0);A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var x=mxUtils.parseXml(k),I=b.editor.extractGraphModel(x.documentElement,!0),M=0,E=null,Q=A.getGlobalVariable;A.getGlobalVariable=function(v){return"page"==v&&null!=E&&null!=E[M]?
-E[M].getAttribute("name"):"pagenumber"==v?M+1:"pagecount"==v?null!=E?E.length:1:Q.apply(this,arguments)};A.getLinkForCell=function(){return null};k=mxUtils.button("",function(){A.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);e=mxUtils.button("",function(){A.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));
-e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);f=mxUtils.button("",function(){A.maxFitScale=8;A.fit(8);A.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);p=mxUtils.button("",function(){A.zoomActual();A.center()});p.className="geSprite geSprite-actualsize";p.setAttribute("title",mxResources.get("actualSize"));p.style.outline=
-"none";p.style.border="none";p.style.margin="2px";mxUtils.setOpacity(p,60);C=mxUtils.button(C||mxResources.get("discard"),function(){t.apply(this,[g.value,mxUtils.bind(this,function(){null!=g.parentNode&&(g.options[g.selectedIndex].parentNode.removeChild(g.options[g.selectedIndex]),0<g.options.length?(g.value=g.options[0].value,m()):b.hideDialog(!0))})])});C.className="geBtn";var n=document.createElement("select");n.style.maxWidth="80px";n.style.position="relative";n.style.top="-2px";n.style.verticalAlign=
-"bottom";n.style.marginRight="6px";n.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[g.value])});u.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
-function(){function v(G){if(null!=G){var N=G.getAttribute("background");if(null==N||""==N||N==mxConstants.NONE)N=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=N;(new mxCodec(G.ownerDocument)).decode(G,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return G}function D(G){null!=G&&(G=v(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(n,"change",function(G){M=parseInt(n.value);D(E[M]);mxEvent.consume(G)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram");
-E=[];for(var K=0;K<H.length;K++)E.push(H[K]);0<E.length&&D(E[M]);n.innerText="";if(1<E.length)for(n.style.display="",K=0;K<E.length;K++)H=document.createElement("option"),mxUtils.write(H,E[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),H.setAttribute("value",K),K==M&&H.setAttribute("selected","selected"),n.appendChild(H);else n.style.display="none"}else v(I)};z.appendChild(n);z.appendChild(k);z.appendChild(e);z.appendChild(p);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});k.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(q.appendChild(k),null!=F&&q.appendChild(F),q.appendChild(C),q.appendChild(u)):(q.appendChild(u),q.appendChild(C),null!=F&&q.appendChild(F),q.appendChild(k));c.appendChild(q);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,d,t,u){function C(U,X,l,B){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var L=0;L<X.length;L++)if("label"!=X[L].nodeName){var P=mxUtils.trim(X[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(B&&0<=P.indexOf(l)||!B&&P.substring(0,l.length)===l)||null!=U&&U.test(P))return!0}}return!1}function F(){p&&E.value?(N.removeAttribute("disabled"),T.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));E.value&&M.value?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}function J(U,
-X,l){K.innerText="";var B=e.model.getDescendants(e.model.getRoot()),L=M.value.toLowerCase(),P=Q.checked?new RegExp(L):null,O=null;z=null;g!=L&&(g=L,m=null,q=!1);var R=null==m;if(0<L.length){if(q){q=!1;for(var S,W=0;W<b.pages.length;W++)if(b.currentPage==b.pages[W]){S=W;break}U=(S+1)%b.pages.length;m=null;do q=!1,B=b.pages[U],e=b.createTemporaryGraph(e.getStylesheet()),b.updatePageRoot(B),e.model.setRoot(B.root),U=(U+1)%b.pages.length;while(!J(!0,X,l)&&U!=S);m&&(m=null,l?b.editor.graph.model.execute(new SelectPage(b,
-B)):b.selectPage(B));q=!1;e=b.editor.graph;return J(!0,X,l)}for(W=0;W<B.length;W++){S=e.view.getState(B[W]);X&&null!=P&&(R=R||S==m);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(e.model.isVertex(S.cell)||e.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(v.innerHTML=e.sanitizeHtml(e.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([v])):label=e.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;X&&u&&null!=P&&S==m&&(label=label.substr(y),
-aa=y);var Y=""==E.value,Z=Y;if(null==P&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&C(P,S.cell,L,Z))||null!=P&&(P.test(label)||Y&&C(P,S.cell,L,Z)))if(u&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),y=aa+Y.index+z.length)):(z=L,y=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==m}}if(null!=O){if(W==B.length&&n.checked)return m=null,q=!0,J(!0,X,l);m=O;e.scrollCellToVisible(m.cell);e.isEnabled()&&!e.isCellLocked(m.cell)?l||e.getSelectionCell()==m.cell&&
-1==e.getSelectionCount()||e.setSelectionCell(m.cell):e.highlightCell(m.cell)}else{if(!U&&n.checked)return q=!0,J(!0,X,l);e.isEnabled()&&!l&&e.clearSelection()}p=null!=O;u&&!U&&F();return 0==L.length||null!=O}var c=b.actions.get("findReplace"),e=b.editor.graph,g=null,m=null,p=!1,q=!1,z=null,y=0,A=1,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.padding="10px";x.style.height="100%";var I=u?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder",
-mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=I;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";x.appendChild(M);mxUtils.br(x);if(u){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=I;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";
-x.appendChild(E);mxUtils.br(x);mxEvent.addListener(E,"input",F)}var Q=document.createElement("input");Q.setAttribute("id","geFindWinRegExChck");Q.setAttribute("type","checkbox");Q.style.marginRight="4px";x.appendChild(Q);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");x.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));x.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
-"6px";I.style.top="-1px";x.appendChild(I);mxUtils.br(x);var n=document.createElement("input");n.setAttribute("id","geFindWinAllPagesChck");n.setAttribute("type","checkbox");n.style.marginRight="4px";x.appendChild(n);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");x.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));x.appendChild(I);var v=document.createElement("div");mxUtils.br(x);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
-"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";x.appendChild(I);var D=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";u&&(E.value="",F());g=m=null;q=!1;M.focus()});D.setAttribute("title",mxResources.get("reset"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.className="geBtn";u||I.appendChild(D);var H=mxUtils.button(mxResources.get("find"),
-function(){try{M.style.backgroundColor=J()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var K=document.createElement("div");K.style.marginTop="10px";if(u){var G=function(U,X,l,B,L){if(null==L||"1"!=L.html)return B=U.toLowerCase().indexOf(X,
-B),0>B?U:U.substr(0,B)+l+U.substr(B+X.length);var P=U;X=mxUtils.htmlEntities(X);L=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)L.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");B=U.toLowerCase().indexOf(X,B);if(0>B)return P;P=B+X.length;l=mxUtils.htmlEntities(l);U=U.substr(0,B)+l+U.substr(P);for(var R=0,S=0;S<L.length;S++){if(L[S]-R<B)U=U.substr(0,L[S])+O[S]+U.substr(L[S]);else{var W=L[S]-R<P?B+R:L[S]+(l.length-X.length);U=U.substr(0,W)+O[S]+U.substr(W)}R+=O[S].length}return U.replace(/\n/g,
-"<br>")},N=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=m&&E.value){var U=m.cell,X=e.getLabel(U);e.isCellEditable(U)&&e.model.setValue(U,G(X,z,E.value,y-z.length,e.getCurrentCellStyle(U)));M.style.backgroundColor=J(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});N.setAttribute("title",mxResources.get("replFind"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
-"ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");I.appendChild(N);mxUtils.br(I);var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=m&&E.value){var U=m.cell,X=e.getLabel(U);e.model.setValue(U,G(X,z,E.value,y-z.length,e.getCurrentCellStyle(U)));N.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(l){b.handleError(l)}});T.setAttribute("title",mxResources.get("replace"));T.style.float="none";T.style.width="120px";
-T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");I.appendChild(T);var V=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(E.value){g=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;e.getModel().beginUpdate();try{for(var l=0,B={};J(!1,!0,!0)&&100>l;){var L=m.cell,P=e.getLabel(L),O=B[L.id];if(O&&O.replAllMrk==
-A&&O.replAllPos>=y)break;B[L.id]={replAllMrk:A,replAllPos:y};e.isCellEditable(L)&&(e.model.setValue(L,G(P,z,E.value,y-z.length,e.getCurrentCellStyle(L))),l++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(K,mxResources.get("matchesRepl",[l]))}catch(R){b.handleError(R)}finally{e.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}A++}});V.setAttribute("title",mxResources.get("replaceAll"));V.style.float="none";V.style.width="120px";
-V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn gePrimaryBtn";V.setAttribute("disabled","disabled");I.appendChild(V);mxUtils.br(I);I.appendChild(D);D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));D.setAttribute("title",mxResources.get("close"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow=
-"ellipsis";D.className="geBtn";I.appendChild(D);mxUtils.br(I);I.appendChild(K)}else D.style.width="90px",H.style.width="90px";mxEvent.addListener(M,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)c.funct();else if(g!=M.value.toLowerCase()||13==U.keyCode)try{M.style.backgroundColor=J()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(x,"keydown",function(U){70==
-U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(c.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(u?"/"+mxResources.get("replace"):""),x,f,k,d,t,!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?M.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?n.removeAttribute("disabled"):(n.checked=!1,n.setAttribute("disabled","disabled"))):e.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,d,t,u){var C=b.editor.graph,F=document.createElement("div");F.style.textAlign="center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(u){var J=document.createElement("input");J.setAttribute("id","geFreehandBrush");J.setAttribute("type",
-"checkbox");J.checked=C.freehand.isPerfectFreehandMode();J.style.margin="10px 5px 0px 10px";J.style.float="left";F.appendChild(J);var c=document.createElement("label");c.setAttribute("for","geFreehandBrush");c.style.float="left";c.style.marginTop="10px";F.appendChild(c);mxUtils.write(c,mxResources.get("brush"));F.appendChild(c);mxUtils.br(F);var e=document.createElement("input");e.setAttribute("type","range");e.setAttribute("min","2");e.setAttribute("max","30");e.setAttribute("value",C.freehand.getBrushSize());
-e.style.width="90%";e.style.visibility="hidden";F.appendChild(e);mxUtils.br(F);c=function(){C.freehand.setPerfectFreehandMode(J.checked);e.style.visibility=J.checked?"visible":"hidden"};mxEvent.addListener(J,"change",c);c();mxEvent.addListener(e,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?C.freehand.stopDrawing():C.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing"));
-g.style.marginTop=u?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";F.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),F,f,k,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);C.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,
-mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));var m=document.createElement("span");m.style.opacity="0.7";m.style["float"]="right";mxUtils.write(m,"X");g.appendChild(m);g.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(C.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&
-C.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,t){var u=b.editor.graph,C=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,c){if(u.isEnabled()){var e=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var m=[],p=0;p<g.length;p++){var q=mxUtils.trim(g[p]);""!=q&&0>mxUtils.indexOf(J,q)&&m.push(q)}0<m.length&&(u.isSelectionEmpty()?c(J.concat(m)):
-u.addTagsForCells(u.getSelectionCells(),m))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(e.container,300,80,!0,!0);e.init()}}),F=C.div;this.window=new mxWindow(mxResources.get("tags"),F,f,k,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){C.refresh();this.window.fit()}));b.installResizeHandler(this,
-!0)},AuthDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("authorizationRequired"));var C="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
-f==b.dropbox?(C=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):f==b.trello&&(C=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
-[C]));var J=document.createElement("input");J.setAttribute("type","checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});C.insertBefore(F,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize="18px";C.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(C);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(J),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),k.appendChild(u),
-t.appendChild(k),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(u,"click",function(c){J.checked=!J.checked;mxEvent.consume(c)}));this.container=t},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var C=b.sidebar.customEntries[u],F={title:b.getResource(C.title),entries:[]},J=0;J<C.entries.length;J++){var c=C.entries[J];F.entries.push({id:c.id,title:b.getResource(c.title),
-desc:b.getResource(c.desc),image:c.preview})}t.push(F)}for(u=0;u<k.length;u++)if(null==b.sidebar.enabledLibraries)t.push(k[u]);else{F={title:k[u].title,entries:[]};for(J=0;J<k[u].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[u].entries[J].id)&&F.entries.push(k[u].entries[J]);0<F.entries.length&&t.push(F)}k=t;if(f){u=mxUtils.bind(this,function(Q){for(var n=0;n<Q.length;n++)(function(v){var D=q.cloneNode(!1);D.style.fontWeight="bold";D.style.backgroundColor=Editor.isDarkMode()?
-"#505759":"#e5e5e5";D.style.padding="6px 0px 6px 20px";mxUtils.write(D,v.title);e.appendChild(D);for(var H=0;H<v.entries.length;H++)(function(K){var G=q.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",K.title+" ("+K.id+")");var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=b.sidebar.isEntryVisible(K.id);N.defaultChecked=N.checked;G.appendChild(N);
-mxUtils.write(G," "+K.title);e.appendChild(G);var T=function(V){if(null==V||"INPUT"!=mxEvent.getSource(V).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=K.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,K.desc);g.appendChild(U)}null!=K.imageCallback?K.imageCallback(g):null!=K.image?g.innerHTML+='<img border="0" src="'+
-K.image+'"/>':null==K.desc&&(g.style.padding="20px",g.style.color="rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=m&&(m.style.backgroundColor="");m=G;m.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=V&&mxEvent.consume(V)}};mxEvent.addListener(G,"click",T);mxEvent.addListener(G,"dblclick",function(V){N.checked=!N.checked;mxEvent.consume(V)});p.push(function(){return N.checked?K.id:null});0==n&&0==H&&T()})(v.entries[H])})(Q[n])});J=document.createElement("div");
-J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height="40px";J.style.right="0px";var e=document.createElement("div"),g=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom=
-"60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)";g.style.textAlign="center";var m=null,p=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";u(k);d.style.padding="30px";d.appendChild(J);d.appendChild(e);d.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height=
-"60px";k.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";k.appendChild(u);mxEvent.addListener(u,"click",function(Q){z.checked=!z.checked;mxEvent.consume(Q)});var y=document.createElement("input");y.setAttribute("type","checkbox");
-if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(Q){mxEvent.getSource(Q)!=y&&(y.checked=!y.checked,mxEvent.consume(Q))}),k.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";J=mxUtils.button(mxResources.get("apply"),
-function(){b.hideDialog();for(var Q=[],n=0;n<p.length;n++){var v=p[n].apply(this,arguments);null!=v&&Q.push(v)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(n=mxUtils.indexOf(Q,".scratchpad"),null!=b.scratchpad!=(0<=n&&0<Q.splice(n,1).length)&&b.toggleScratchpad(),n=mxUtils.indexOf(Q,"search"),mxSettings.settings.search=0<=n&&0<Q.splice(n,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(Q.join(";"),y.checked,!0);b.setSidebarTitles(z.checked,
-y.checked)});J.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");A.style.width="100%";f=document.createElement("td");t=document.createElement("td");C=document.createElement("td");var x=mxUtils.bind(this,function(Q,n,v){var D=document.createElement("input");D.type="checkbox";A.appendChild(D);D.checked=b.sidebar.isEntryVisible(v);var H=document.createElement("span");
-mxUtils.write(H,n);n=document.createElement("div");n.style.display="block";n.appendChild(D);n.appendChild(H);mxEvent.addListener(H,"click",function(K){D.checked=!D.checked;mxEvent.consume(K)});Q.appendChild(n);return function(){return D.checked?v:null}});J.appendChild(f);J.appendChild(t);J.appendChild(C);u.appendChild(J);A.appendChild(u);p=[];var I=0;for(u=0;u<k.length;u++)for(J=0;J<k[u].entries.length;J++)I++;var M=[f,t,C],E=0;for(u=0;u<k.length;u++)(function(Q){for(var n=0;n<Q.entries.length;n++){var v=
-Q.entries[n];p.push(x(M[Math.floor(E/(I/3))],v.title,v.id));E++}})(k[u]);d.appendChild(A);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";y=document.createElement("input");isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,k.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),k.appendChild(u),mxEvent.addListener(u,"click",function(Q){y.checked=!y.checked;mxEvent.consume(Q)}));
-d.appendChild(k);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var Q=["search"],n=0;n<p.length;n++){var v=p[n].apply(this,arguments);null!=v&&Q.push(v)}b.sidebar.showEntries(0<Q.length?Q.join(";"):"",y.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(u),k.appendChild(J)):
-(k.appendChild(J),k.appendChild(u));d.appendChild(k);this.container=d},PluginsDialog=function(b,f,k,d){function t(){J=!0;if(0==F.length)C.innerText=mxResources.get("noPlugins");else{C.innerText="";for(var q=0;q<F.length;q++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";z.appendChild(y);
-mxUtils.write(z,F[q]);C.appendChild(z);mxUtils.br(C);mxEvent.addListener(y,"click",function(A){return function(){b.confirm(mxResources.get("delete")+' "'+F[A]+'"?',function(){null!=k&&k(F[A]);F.splice(A,1);t()})}}(q))}}}var u=document.createElement("div"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var F=mxSettings.getPlugins().slice(),J=!1;u.appendChild(C);t();J=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(q){q&&0>mxUtils.indexOf(F,
-q)&&F.push(q);t()})}:function(){var q=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");q.appendChild(z);var y=document.createElement("select");y.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var A=document.createElement("option");mxUtils.write(A,App.publicPlugin[z]);A.value=App.publicPlugin[z];y.appendChild(A)}q.appendChild(y);mxUtils.br(q);mxUtils.br(q);z=mxUtils.button(mxResources.get("custom")+
-"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var M=0;M<I.length;M++){var E=I[M],Q=App.pluginRegistry[E];null!=Q&&(E=Q);0<E.length&&0>mxUtils.indexOf(F,E)&&F.push(E)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});z.className="geBtn";q=new CustomDialog(b,q,mxUtils.bind(this,function(){var x=App.pluginRegistry[y.value];0>mxUtils.indexOf(F,
-x)&&(F.push(x),t())}),null,null,null,z);b.showDialog(q.container,360,100,!0,!0)});c.className="geBtn";var e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var g=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";
-m.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});p.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");m.appendChild(p);b.editor.cancelFirst?(d||m.appendChild(e),m.appendChild(c),m.appendChild(g)):(m.appendChild(c),m.appendChild(g),d||m.appendChild(e));u.appendChild(m);this.container=u},CropImageDialog=function(b,f,k,d){function t(){var Q=y.checked,n=A.checked,v=p.geometry,D=J.width,
-H=J.height,K=(300-D)/2,G=(300-H)/2;v.x<K?(v.width-=K-v.x,v.x=K):v.x+v.width>K+D&&(v.width=K+D-v.x,v.x=Math.min(v.x,K+D));v.y<G?(v.height-=G-v.y,v.y=G):v.y+v.height>G+H&&(v.height=G+H-v.y,v.y=Math.min(v.y,G+H));var N=(v.x-K)/D*100;D=100-(v.x+v.width-K)/D*100;K=(v.y-G)/H*100;v=100-(v.y+v.height-G)/H*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(D)+"% "+mxUtils.format(v)+"% "+mxUtils.format(N)+"%"+(Q?" round "+m+"%":n?" round 50%":"")+")"}function u(Q){null!=e&&(!0!==Q&&(e.model.setGeometry(p,
-g.clone()),m=5,I.value=m),e.model.setStyle(p,q+t()),e.selectAll(),x.style.visibility=y.checked?"visible":"hidden")}var C=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var J=document.createElement("img");J.onload=function(){function Q(){e.model.setStyle(p,q+t())}e=new Graph(c);e.autoExtend=!1;e.autoScroll=!1;e.setGridEnabled(!1);
-e.setEnabled(!0);e.setPanning(!1);e.setConnectable(!1);e.getRubberband().setEnabled(!1);e.graphHandler.allowLivePreview=!1;var n=e.createVertexHandler;e.createVertexHandler=function(){var P=n.apply(this,arguments);P.livePreview=!1;return P};if(null!=k)try{if("inset"==k.substring(0,5)){var v=p.geometry,D=J.width,H=J.height,K=(300-D)/2,G=(300-H)/2,N=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(N[0]),V=parseFloat(N[1]),U=parseFloat(N[2]),X=parseFloat(N[3]);isFinite(T)&&isFinite(V)&&isFinite(U)&&
-isFinite(X)?(v.x=X/100*D+K,v.y=T/100*H+G,v.width=(100-V)/100*D+K-v.x,v.height=(100-U)/100*H+G-v.y,"round"==N[4]?"50%"==N[5]?A.setAttribute("checked","checked"):(m=parseInt(N[5]),I.value=m,y.setAttribute("checked","checked"),x.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(P){}p.style=q+(k?k:t());p.vertex=!0;e.addCell(p,null,null,null,null);e.selectAll();e.addListener(mxEvent.CELLS_MOVED,Q);e.addListener(mxEvent.CELLS_RESIZED,Q);var l=e.graphHandler.mouseUp,
-B=e.graphHandler.mouseDown;e.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};e.graphHandler.mouseDown=function(){B.apply(this,arguments);c.style.backgroundColor=""};e.dblClick=function(){};var L=e.getSelectionModel().changeSelection;e.getSelectionModel().changeSelection=function(){L.call(this,[p],[p])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",f);J.style.maxWidth="300px";J.style.maxHeight="300px";F.appendChild(J);C.appendChild(F);
-var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";C.appendChild(c);var e=null,g=new mxGeometry(100,100,100,100),m=5,p=new mxCell("",g.clone(),""),q="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked",
-"checked");z.style.margin="5px";C.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));C.appendChild(f);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";C.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));C.appendChild(f);
-var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingEllipse");A.setAttribute("name","croppingShape");A.style.margin="5px";C.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));C.appendChild(f);mxEvent.addListener(z,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(A,"change",u);var x=document.createElement("div");x.style.textAlign="center";x.style.visibility=
-"hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",m);I.setAttribute("title",mxResources.get("arcSize"));x.appendChild(I);C.appendChild(x);mxEvent.addListener(I,"change",function(){m=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){d(t(),p.geometry.width,p.geometry.height);b.hideDialog()});
-F.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){d(null,J.width,J.height);b.hideDialog()});M.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(f),E.appendChild(M),E.appendChild(F)):(E.appendChild(M),E.appendChild(F),E.appendChild(f));C.appendChild(E);this.container=C},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,t=document.createElement("div"),
-u=document.createElement("table"),C=document.createElement("tbody"),F=document.createElement("tr"),J=document.createElement("td"),c=document.createElement("td");u.style.paddingLeft="6px";mxUtils.write(J,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=d&&d.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};c.appendChild(e);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");
-J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=d?d.x:"";c.appendChild(g);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width=
-"100px";m.value=null!=d?d.y:"";c.appendChild(m);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("dx")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d&&null!=d.offset?d.offset.x:"";c.appendChild(p);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");
-c=document.createElement("td");mxUtils.write(J,mxResources.get("dy")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d&&null!=d.offset?d.offset.y:"";c.appendChild(q);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";
-z.value=null!=d?d.width:"";c.appendChild(z);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";c.appendChild(y);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");
-mxUtils.write(J,mxResources.get("rotation")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(A);F.appendChild(J);F.appendChild(c);C.appendChild(F);u.appendChild(C);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();
-try{for(var I=0;I<f.length;I++){var M=k.getCellGeometry(f[I]);null!=M&&(M=M.clone(),k.isCellMovable(f[I])&&(M.relative=e.checked,0<mxUtils.trim(g.value).length&&(M.x=Number(g.value)),0<mxUtils.trim(m.value).length&&(M.y=Number(m.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(q.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(M.width=
-Number(z.value)),0<mxUtils.trim(y.value).length&&(M.height=Number(y.value))),k.getModel().setGeometry(f[I],M));0<mxUtils.trim(A.value).length&&k.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[f[I]])}}finally{k.getModel().endUpdate()}});x.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(I){13==I.keyCode&&x.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(x)):(u.appendChild(x),
-u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,k,d,t,u){function C(n){for(n=document.elementFromPoint(n.clientX,n.clientY);null!=n&&n.parentNode!=p;)n=n.parentNode;var v=null;if(null!=n){var D=p.firstChild;for(v=0;null!=D&&D!=n;)D=D.nextSibling,v++}return v}function F(n,v,D,H,K,G,N,T,V){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==n&&null!=N||null==z[n]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow=
-"ellipsis";mxUtils.write(S,null!=W.title&&0<W.title.length?W.title:mxResources.get("untitled"));S.style.color=null==W.title||0==W.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var X=K,l=G;if(K>b.maxImageSize||G>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,G));K*=B;G*=B}X>l?(l=Math.round(100*l/X),X=100):(X=Math.round(100*X/l),l=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display=
-"inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition","transform .1s ease-in-out");if(null!=n){var P=document.createElement("img");P.setAttribute("src",I.convert(n));P.style.width=X+"px";P.style.height=l+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((100-l)/2)+"px";P.style.paddingLeft=Math.floor((100-X)/2)+"px";L.appendChild(P)}else if(null!=N){var O=b.stringToCells(Graph.decompress(N.xml));0<O.length&&
-(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var R=document.createElement("img");R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ba){mxEvent.consume(ba)});
-(function(ba,fa,ja){mxEvent.addListener(R,"click",function(ha){z[fa]=null;for(var ra=0;ra<e.length;ra++)if(null!=e[ra].data&&e[ra].data==fa||null!=e[ra].xml&&null!=ja&&e[ra].xml==ja.xml){e.splice(ra,1);break}L.parentNode.removeChild(ba);0==e.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(ha)});mxEvent.addListener(R,"dblclick",function(ha){mxEvent.consume(ha)})})(L,n,N);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");
-S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var W=null;null!=n?(W={data:n,w:K,h:G,title:V},null!=T&&(W.aspect=T),z[n]=P,e.push(W)):null!=N&&(N.aspect="fixed",e.push(N),W=N);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(ba))});U();L.appendChild(S);
-mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,W.title||"",mxResources.get("ok"),function(ja){null!=ja&&(W.title=ja,U())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==
-W.title||0==W.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);x=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";W.title=S.innerHTML;U()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);p.appendChild(L);mxEvent.addListener(L,
-"dragstart",function(ba){null==n&&null!=N&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=N.xml&&ba.dataTransfer.setData("Text",N.xml);y=C(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");
-y=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(X=mxUtils.parseXml(n),"mxlibrary"==X.documentElement.nodeName){l=JSON.parse(mxUtils.getTextContent(X.documentElement));if(null!=l&&0<l.length)for(var aa=0;aa<l.length;aa++)null!=l[aa].xml?F(null,null,0,0,0,0,l[aa]):F(l[aa].data,null,0,0,l[aa].w,l[aa].h,null,"fixed",l[aa].title);K=!0}else if("mxfile"==X.documentElement.nodeName){var Y=
-X.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){l=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(l));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);F(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function J(n){n.dataTransfer.dropEffect=null!=y?"move":"copy";n.stopPropagation();n.preventDefault()}function c(n){n.stopPropagation();
-n.preventDefault();M=!1;A=C(n);if(null!=y)null!=A&&A<p.children.length?(e.splice(A>y?A-1:A,0,e.splice(y,1)[0]),p.insertBefore(p.children[y],p.children[A])):(e.push(e.splice(y,1)[0]),p.appendChild(p.children[y]));else if(0<n.dataTransfer.files.length)b.importFiles(n.dataTransfer.files,0,0,b.maxImageSize,E(n));else if(0<=mxUtils.indexOf(n.dataTransfer.types,"text/uri-list")){var v=decodeURIComponent(n.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(v)||/(\.png)($|\?)/i.test(v)||/(\.gif)($|\?)/i.test(v)||
-/(\.svg)($|\?)/i.test(v))&&b.loadImage(v,function(D){F(v,null,0,0,D.width,D.height);p.scrollTop=p.scrollHeight})}n.stopPropagation();n.preventDefault()}var e=[];k=document.createElement("div");k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",f);m.style.marginRight="20px";m.style.marginLeft=
-"10px";m.style.width="500px";null==t||t.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};g.appendChild(m);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition=
-"center center";p.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));k.appendChild(q);var z={},y=null,A=null,x=null;f=function(n){"true"!=mxEvent.getSource(n).getAttribute("contentEditable")&&
-null!=x&&(x(),x=null,mxEvent.consume(n))};mxEvent.addListener(p,"mousedown",f);mxEvent.addListener(p,"pointerdown",f);mxEvent.addListener(p,"touchstart",f);var I=new mxUrlConverter,M=!1;if(null!=d)for(f=0;f<d.length;f++)g=d[f],F(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(p,"dragleave",function(n){q.style.cursor="";for(var v=mxEvent.getSource(n);null!=v;){if(v==p||v==q){n.stopPropagation();n.preventDefault();break}v=v.parentNode}});var E=function(n){return function(v,D,H,K,G,N,
-T,V,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(X){F(X,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(v,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(X){4==X.readyState&&(b.spinner.stop(),200<=X.status&&299>=X.status&&(F(X.responseText,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?
-null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(F(v,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",J);mxEvent.addListener(p,"drop",c);mxEvent.addListener(q,"dragover",J);mxEvent.addListener(q,"drop",c);k.appendChild(p);d=document.createElement("div");d.style.textAlign=
-"right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&t.getPublicUrl(function(n){b.spinner.stop();if(null!=n){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));
-v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(n);n=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(n.container,450,240,!0);n.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):
-b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var n=b.createLibraryDataFromImages(e),v=m.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(n,v,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(n))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";
-d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var Q=document.createElement("input");Q.setAttribute("multiple","multiple");Q.setAttribute("type","file");mxEvent.addListener(Q,"change",function(n){M=!1;b.importFiles(Q.files,0,0,b.maxImageSize,function(v,D,H,K,G,N,T,V,U){null!=Q.files&&(E(n)(v,D,H,K,G,N,T,V,U),Q.type="",Q.type="file",Q.value="")});p.scrollTop=p.scrollHeight});Q.style.display="none";document.body.appendChild(Q);b.libDlgFileInputElt=Q}g=mxUtils.button(mxResources.get("import"),
-function(){null!=x&&(x(),x=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),function(){null!=x&&(x(),x=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(n,v,D){M=!1;if(null!=n){if("data:image/"==n.substring(0,11)){var H=n.indexOf(",");0<H&&(n=n.substring(0,H)+";base64,"+n.substring(H+1))}F(n,null,0,0,v,D);p.scrollTop=p.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className=
-"geBtn";d.appendChild(g);this.saveBtnClickHandler=function(n,v,D,H){b.saveLibrary(n,v,D,H)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(m.value,e,t,u)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,t){d=null!=d?d:300;t=null!=t?t:120;var u=document.createElement("table"),C=document.createElement("tbody");
-u.style.cellPadding="4px";var F=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,k);F.appendChild(J);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=d-200+"px";c.style.height=t+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};J.appendChild(c);F.appendChild(J);J=document.createElement("td");
-k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top="6px";k.style.width="200px";k.style.height=t+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);J.appendChild(k);var e=new Graph(k);e.setEnabled(!1);var g=b.editor.graph.cloneCell(f);e.addCells([g]);k=e.view.getState(g);var m="";null!=k.shape&&null!=k.shape.stencil&&(m=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,m||"");k=e.getGraphBounds();
-t=Math.min(160/k.width,(t-40)/k.height);e.view.scaleAndTranslate(t,20/t-k.x,20/t-k.y);F.appendChild(J);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",J.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&J.appendChild(t);var p=function(q,z,y){var A=c.value,x=mxUtils.parseXml(A);A=mxUtils.getPrettyXml(x.documentElement);x=x.documentElement.getElementsByTagName("parsererror");if(null!=x&&0<x.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),x=!q.model.contains(z),!y||x||A!=m){A=Graph.compress(A);q.getModel().beginUpdate();try{if(x){var I=b.editor.graph.getFreeInsertPoint();
-z.geometry.x=I.x;z.geometry.y=I.y;q.addCell(z)}q.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+A+")",[z])}catch(M){throw M;}finally{q.getModel().endUpdate()}x&&(q.setSelectionCell(z),q.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){p(e,g,!1)});k.className="geBtn";J.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){p(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";J.appendChild(k);b.editor.cancelFirst||J.appendChild(t);F.appendChild(J);
-C.appendChild(F);u.appendChild(C);this.container=u},CustomDialog=function(b,f,k,d,t,u,C,F,J,c,e){var g=document.createElement("div");g.appendChild(f);var m=document.createElement("div");m.style.marginTop="30px";m.style.textAlign="center";null!=C&&m.appendChild(C);b.isOffline()||null==u||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(u)}),f.className="geBtn",m.appendChild(f));J=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});J.className="geBtn";
-F&&(J.style.display="none");b.editor.cancelFirst&&m.appendChild(J);t=mxUtils.button(t||mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var p=k();if("string"===typeof p){b.showError(mxResources.get("error"),p);return}}c&&b.hideDialog(null,null,this.container)}));m.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||m.appendChild(J);if(null!=e)for(F=0;F<e.length;F++)(function(p,q,z){p=mxUtils.button(p,function(y){q(y)});null!=
-z&&p.setAttribute("title",z);p.className="geBtn";m.appendChild(p)})(e[F][0],e[F][1],e[F][2]);g.appendChild(m);this.cancelBtn=J;this.okButton=t;this.container=g},TemplatesDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q){function z(ea){qa.innerText=ea;qa.style.display="block";setTimeout(function(){qa.style.display="none"},4E3)}function y(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",B=l,l=null)}function A(ea,ia,oa,ua,wa,Ca,ya){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;
-ea.className+=" geTempDlgRadioBtnActive";V.querySelector(".geTempDlgRadioBtn[data-id="+ua+"]").className="geTempDlgRadioBtn "+(ya?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");V.querySelector("."+ia).src="/images/"+oa+"-sel.svg";V.querySelector("."+wa).src="/images/"+Ca+".svg";return!0}function x(ea,ia,oa,ua){function wa(sa,Ha){null==ya?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,
-function(La){200<=La.getStatus()&&299>=La.getStatus()&&(ya=La.getText());Ha(ya)}))):Ha(ya)}function Ca(sa,Ha,La){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Qa=new mxCodec(sa.ownerDocument),Ia=new mxGraphModel;Qa.decode(sa,Ia);sa=Ia.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||
-document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ha,La),!0,null,!0);var Na=document.createElement("div");Na.className="geTempDlgDialogMask";V.appendChild(Na);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Na&&(V.removeChild(Na),Na=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=
-Oa)};mxEvent.addListener(Na,"click",function(){b.sidebar.hideTooltip()})}}var ya=null;if(Ra||b.sidebar.currentElt==ia)b.sidebar.hideTooltip();else{var ta=function(sa){Ra&&b.sidebar.currentElt==ia&&Ca(sa,mxEvent.getClientX(ua),mxEvent.getClientY(ua));Ra=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;Ra=!0;oa.src="/images/aui-wait.gif";ea.isExt?J(ea,ta,function(){z(mxResources.get("cantLoadPrev"));Ra=!1;oa.src="/images/icon-search.svg"}):wa(ea.url,ta)}}function I(ea,
-ia,oa){if(null!=L){for(var ua=L.className.split(" "),wa=0;wa<ua.length;wa++)if(-1<ua[wa].indexOf("Active")){ua.splice(wa,1);break}L.className=ua.join(" ")}null!=ea?(L=ea,L.className+=" "+ia,P=oa,Pa.className="geTempDlgCreateBtn"):(P=L=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(ea,ia){if(null!=P){var oa=function(ta){ya.isExternal?J(ya,function(sa){ua(sa,ta)},wa):ya.url?mxUtils.get(TEMPLATE_PATH+"/"+ya.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?
-ua(sa.getText(),ta):wa()})):ua(b.emptyDiagramXml,ta)},ua=function(ta,sa){q||b.hideDialog(!0);f(ta,sa,ya,ia)},wa=function(){z(mxResources.get("cannotLoad"));Ca()},Ca=function(){P=ya;Pa.className="geTempDlgCreateBtn";ia&&(Aa.className="geTempDlgOpenBtn")},ya=P;P=null;"boolean"!==typeof ia&&(ia=ya.isExternal&&g);1==ea?c(ya.url,ya):ia?(Aa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==
-App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),oa,ea,function(ta){var sa=null!=ta&&0<ta.length;return sa&&q?(oa(ta),!1):sa},null,null,null,Ca,p?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function E(ea){Pa.innerText=mxResources.get(ba||ea?"create":"copy");ea=ea?"none":"";g&&(Aa.style.display=ea);for(var ia=V.querySelectorAll(".geTempDlgLinkToDiagram"),oa=
-0;oa<ia.length;oa++)ia[oa].style.display=ea}function Q(ea,ia,oa,ua,wa){wa||(ja.innerText="",I(),W=ea,aa=ua);var Ca=null;if(oa){Ca=document.createElement("table");Ca.className="geTempDlgDiagramsListGrid";var ya=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");ya.appendChild(ta);ta=document.createElement("th");ta.style.width=
-"25%";ta.innerText=mxResources.get("lastModifiedOn");ya.appendChild(ta);Ca.appendChild(ya);ja.appendChild(Ca)}for(ya=0;ya<ea.length;ya++){ea[ya].isExternal=!ia;var sa=ea[ya].url,Ha=(ta=mxUtils.htmlEntities(ia?mxResources.get(ea[ya].title,null,ea[ya].title):ea[ya].title))||ea[ya].url,La=ea[ya].imgUrl,Qa=ea[ya].changedBy||"",Ia="";ea[ya].lastModifiedOn&&(Ia=b.timeSince(new Date(ea[ya].lastModifiedOn)),null==Ia&&(Ia=mxResources.get("lessThanAMinute")),Ia=mxResources.get("timeAgo",[Ia],"{1} ago"));La||
-(La=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=oa?50:15;null!=ta&&ta.length>sa&&(ta=ta.substring(0,sa)+"&hellip;");if(oa){var Na=document.createElement("tr");La=document.createElement("td");var Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramListPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));wa||La.appendChild(Oa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;La.appendChild(Ha);
-Na.appendChild(La);La=document.createElement("td");La.innerText=Qa;Na.appendChild(La);La=document.createElement("td");La.innerText=Ia;Na.appendChild(La);Ca.appendChild(Na);null==L&&(E(ia),I(Na,"geTempDlgDiagramsListGridActive",ea[ya]));(function(Ja,Ta,Va){mxEvent.addListener(Na,"click",function(){L!=Ta&&(E(ia),I(Ta,"geTempDlgDiagramsListGridActive",Ja))});mxEvent.addListener(Na,"dblclick",M);mxEvent.addListener(Oa,"click",function(Wa){x(Ja,Ta,Va,Wa)})})(ea[ya],Na,Oa)}else{var Ma=document.createElement("div");
-Ma.className="geTempDlgDiagramTile";Ma.setAttribute("title",Ha);null==L&&(E(ia),I(Ma,"geTempDlgDiagramTileActive",ea[ya]));Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ja,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ja.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,
-Qa,La?La.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=La;Qa.appendChild(Sa);Ma.appendChild(Qa);Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileLbl";Qa.innerHTML=null!=ta?ta:"";Ma.appendChild(Qa);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));wa||Ma.appendChild(Oa);(function(Ja,Ta,Va){mxEvent.addListener(Ma,"click",function(){L!=Ta&&(E(ia),
-I(Ta,"geTempDlgDiagramTileActive",Ja))});mxEvent.addListener(Ma,"dblclick",M);mxEvent.addListener(Oa,"click",function(Wa){x(Ja,Ta,Va,Wa)})})(ea[ya],Ma,Oa);ja.appendChild(Ma)}}for(var Ua in ua)ea=ua[Ua],0<ea.length&&(wa=document.createElement("div"),wa.className="geTempDlgImportCat",wa.innerText=mxResources.get(Ua,null,Ua),ja.appendChild(wa),Q(ea,ia,oa,null,!0))}function n(ea,ia){za.innerText="";I();var oa=Math.floor(za.offsetWidth/150)-1;ia=!ia&&ea.length>oa?oa:ea.length;for(var ua=0;ua<ia;ua++){var wa=
-ea[ua];wa.isCategory=!0;var Ca=document.createElement("div"),ya=mxResources.get(wa.title);null==ya&&(ya=wa.title.substring(0,1).toUpperCase()+wa.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem";Ca.setAttribute("title",ya);ya=mxUtils.htmlEntities(ya);15<ya.length&&(ya=ya.substring(0,15)+"&hellip;");null==L&&(E(!0),I(Ca,"geTempDlgNewDiagramCatItemActive",wa));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+
-"/"+wa.img;ta.appendChild(sa);Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ya;Ca.appendChild(ta);za.appendChild(Ca);(function(Ha,La){mxEvent.addListener(Ca,"click",function(){L!=La&&(E(!0),I(La,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ca,"dblclick",M)})(wa,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";ya=mxResources.get("showAllTemps");Ca.setAttribute("title",ya);ta=document.createElement("div");
-ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerText=ya;Ca.appendChild(ta);za.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ha(){var Qa=La.querySelector(".geTemplateDrawioCatLink");null!=Qa?Qa.click():setTimeout(Ha,200)}ba=!0;var La=V.querySelector(".geTemplatesList");La.style.display="block";ma.style.width="";Fa.style.display="";Fa.value=
-"";Y=null;Ha()});fa.style.display=ea.length<=oa?"none":""}function v(ea,ia,oa){function ua(Sa,Ua){var Ja=mxResources.get(Sa);null==Ja&&(Ja=Sa.substring(0,1).toUpperCase()+Sa.substring(1));Sa=Ja+" ("+Ua.length+")";var Ta=Ja=mxUtils.htmlEntities(Ja);15<Ja.length&&(Ja=Ja.substring(0,15)+"&hellip;");return{lbl:Ja+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function wa(Sa,Ua,Ja,Ta,Va){mxEvent.addListener(Ja,"click",function(){l!=Ja&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Ea.style.display=
-"none",Ga.style.minHeight="100%"),l=Ja,l.style.fontWeight="bold",l.style.textDecoration="underline",ma.scrollTop=0,U&&(X=!0),ha.innerHTML=Ua,ra.style.display="none",Q(Va?ia[Sa]:Ta?Ka[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ca=V.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ca.appendChild(oa);for(var ya in ia){oa=document.createElement("div");
-var ta=ia[ya];ta=ua(ya,ta);oa.className="geTemplateCatLink";oa.setAttribute("title",ta.fullLbl);oa.innerHTML=ta.lbl;Ca.appendChild(oa);wa(ya,ta.lblOnly,oa,null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ca.appendChild(oa)}for(ya in ea){var sa=Ka[ya],Ha=oa=document.createElement(sa?"ul":"div");ta=ea[ya];ta=ua(ya,ta);if(null!=sa){var La=document.createElement("li"),
-Qa=document.createElement("div");Qa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Qa.style.padding="0";Qa.setAttribute("title",ta.fullLbl);Qa.innerHTML=ta.lbl;Ha=Qa;La.appendChild(Qa);var Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var Na in sa){var Oa=document.createElement("li"),Ma=ua(Na,sa[Na]);Oa.setAttribute("title",Ma.fullLbl);Oa.innerHTML=Ma.lbl;Oa.className="geTemplateCatLink";Oa.style.padding="0";Oa.style.margin=
-"0";wa(ya,Ma.lblOnly,Oa,Na);Ia.appendChild(Oa)}La.appendChild(Ia);oa.className="geTempTree";oa.appendChild(La);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ja=Sa.querySelectorAll("li"),Ta=0;Ta<Ja.length;Ta++)Ja[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ja.length;Va++)Ja[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ia,
-Qa)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",ta.fullLbl),oa.innerHTML=ta.lbl;Ca.appendChild(oa);wa(ya,ta.lblOnly,Ha)}}function D(){mxUtils.get(d,function(ea){if(!xa){xa=!0;ea=ea.getXml().documentElement.firstChild;for(var ia={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var oa=ea.getAttribute("name"),ua=ea.getElementsByTagName("add"),wa=[],Ca=0;Ca<ua.length;Ca++)wa.push(encodeURIComponent(mxUtils.getTextContent(ua[Ca])));
-null!=oa&&0<wa.length&&(ia[oa]=wa.join(";"))}else if(wa=ea.getAttribute("url"),null!=wa){ua=ea.getAttribute("section");oa=ea.getAttribute("subsection");if(null==ua&&(Ca=wa.indexOf("/"),ua=wa.substring(0,Ca),null==oa)){var ya=wa.indexOf("/",Ca+1);-1<ya&&(oa=wa.substring(Ca+1,ya))}Ca=va[ua];null==Ca&&(ca++,Ca=[],va[ua]=Ca);wa=ea.getAttribute("clibs");null!=ia[wa]&&(wa=ia[wa]);wa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),
-clibs:wa,tags:ea.getAttribute("tags")};Ca.push(wa);null!=oa&&(Ca=Ka[ua],null==Ca&&(Ca={},Ka[ua]=Ca),ua=Ca[oa],null==ua&&(ua=[],Ca[oa]=ua),ua.push(wa))}ea=ea.nextSibling}v(va,la,na)}})}function H(ea){C&&(ma.scrollTop=0,ja.innerText="",Ba.spin(ja),X=!1,U=!0,ha.innerText=mxResources.get("recentDiag"),Y=null,C(ka,function(){z(mxResources.get("cannotLoad"));ka([])},ea?null:u))}function K(ea){if(""==ea)null!=B&&(B.click(),B=null);else{if(null==TemplatesDialog.tagsList[d]){var ia={};for(Ha in va)for(var oa=
-va[Ha],ua=0;ua<oa.length;ua++){var wa=oa[ua];if(null!=wa.tags)for(var Ca=wa.tags.toLowerCase().split(";"),ya=0;ya<Ca.length;ya++)null==ia[Ca[ya]]&&(ia[Ca[ya]]=[]),ia[Ca[ya]].push(wa)}TemplatesDialog.tagsList[d]=ia}var ta=ea.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[d];if(0<na&&null==ia.__tagsList__){for(Ha in la)for(oa=la[Ha],ua=0;ua<oa.length;ua++)for(wa=oa[ua],Ca=wa.title.split(" "),Ca.push(Ha),ya=0;ya<Ca.length;ya++){var sa=Ca[ya].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(wa)}ia.__tagsList__=
-!0}var Ha=[];oa={};for(ua=Ca=0;ua<ta.length;ua++)if(0<ta[ua].length){sa=ia[ta[ua]];var La={};Ha=[];if(null!=sa)for(ya=0;ya<sa.length;ya++)wa=sa[ya],0==Ca==(null==oa[wa.url])&&(La[wa.url]=!0,Ha.push(wa));oa=La;Ca++}0==Ha.length?ha.innerText=mxResources.get("noResultsFor",[ea]):Q(Ha,!0)}}function G(ea){if(Y!=ea||R!=Z)y(),ma.scrollTop=0,ja.innerText="",ha.innerText=mxResources.get("searchResults")+' "'+ea+'"',pa=null,ba?K(ea):F&&(ea?(Ba.spin(ja),X=!1,U=!0,F(ea,ka,function(){z(mxResources.get("searchFailed"));
-ka([])},R?null:u)):H(R)),Y=ea,Z=R}function N(ea){null!=pa&&clearTimeout(pa);13==ea.keyCode?G(Fa.value):pa=setTimeout(function(){G(Fa.value)},1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(F?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
-mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
+var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var v=document.createElement("h2");mxUtils.write(v,mxResources.get("backgroundImage"));v.style.marginTop="0px";d.appendChild(v);var x=null!=k&&null!=k.originalSrc;v=!1;var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var G=document.createElement("input");
+G.style.cssText="margin-right:8px;margin-bottom:8px;";G.setAttribute("value","url");G.setAttribute("type","radio");G.setAttribute("name","geBackgroundImageDialogOption");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.width="360px";H.value=x||null==k?"":k.src;var I=document.createElement("select");I.style.width="360px";if(null!=b.pages)for(var F=0;F<b.pages.length;F++){var O=document.createElement("option");mxUtils.write(O,b.pages[F].getName()||
+mxResources.get("pageWithNumber",[F+1]));O.setAttribute("value","data:page/id,"+b.pages[F].getId());b.pages[F]==b.currentPage&&O.setAttribute("disabled","disabled");null!=k&&k.originalSrc==O.getAttribute("value")&&(O.setAttribute("selected","selected"),v=!0);I.appendChild(O)}x||null!=b.pages&&1!=b.pages.length||(D.style.display="none",G.style.display="none",I.style.display="none");var c=document.createElement("option"),e=!1,g=!1,p=function(C,u){e||null!=C&&g||(G.checked?null!=u&&u(c.selected?null:
+I.value):""==H.value||b.isOffline()?(t.value="",y.value="",null!=u&&u("")):(H.value=mxUtils.trim(H.value),b.loadImage(H.value,function(R){t.value=R.width;y.value=R.height;null!=u&&u(H.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));t.value="";y.value="";null!=u&&u(null)})))},n=mxUtils.bind(this,function(C){b.importFiles(C,0,0,b.maxBackgroundSize,function(u,R,l,q,B,J){H.value=u;p();H.focus()},function(){},function(u){return"image/"==u.type.substring(0,
+6)},function(u){for(var R=0;R<u.length;R++)u[R]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){x?I.focus():H.focus();mxEvent.addListener(I,"focus",function(){D.removeAttribute("checked");G.setAttribute("checked","checked");G.checked=!0});mxEvent.addListener(H,"focus",function(){G.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});if(Graph.fileSupport){H.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=d.parentNode,u=null;mxEvent.addListener(C,
+"dragleave",function(R){null!=u&&(u.parentNode.removeChild(u),u=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<R.dataTransfer.files.length)n(R.dataTransfer.files);else if(0<=mxUtils.indexOf(R.dataTransfer.types,
+"text/uri-list")){var l=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)&&(H.value=decodeURIComponent(l),p())}R.stopPropagation();R.preventDefault()}),!1)}};d.appendChild(D);d.appendChild(H);mxUtils.br(d);F=document.createElement("span");F.style.marginLeft="30px";mxUtils.write(F,mxResources.get("width")+":");d.appendChild(F);var t=document.createElement("input");t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="8px";t.style.marginRight="16px";
+t.value=null==k||x?"":k.width;d.appendChild(t);mxUtils.write(d,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||x?"":k.height;d.appendChild(y);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(H,"change",p);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],
+null!=C&&(H.value=C.url,p()));H.focus()};d.appendChild(G);d.appendChild(I);mxUtils.br(d);x?(G.setAttribute("checked","checked"),G.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!v&&G.checked&&(mxUtils.write(c,mxResources.get("pageNotFound")),c.setAttribute("disabled","disabled"),c.setAttribute("selected","selected"),c.setAttribute("value","pageNotFound"),I.appendChild(c),mxEvent.addListener(I,"change",function(){null==c.parentNode||c.selected||c.parentNode.removeChild(c)}));k=document.createElement("div");
+k.style.marginTop="30px";k.style.textAlign="right";v=mxUtils.button(mxResources.get("cancel"),function(){e=!0;b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&k.appendChild(v);F=mxUtils.button(mxResources.get("reset"),function(){H.value="";t.value="";y.value="";D.checked=!0;e=!1});mxEvent.addGestureListeners(F,function(){e=!0});F.className="geBtn";F.width="100";k.appendChild(F);if(Graph.fileSupport){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type",
+"file");mxEvent.addListener(A,"change",function(C){null!=A.files&&(n(A.files),A.type="",A.type="file",A.value="")});A.style.display="none";d.appendChild(A);F=mxUtils.button(mxResources.get("open"),function(){A.click()});F.className="geBtn";k.appendChild(F)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();p(null,function(C){f(""!=C&&null!=C?new mxImage(C,t.value,y.value):null,null==C)})});mxEvent.addGestureListeners(applyBtn,function(){g=!0});applyBtn.className="geBtn gePrimaryBtn";
+k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(v);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(e,g,p){var n=e.split("\n");if("plantUmlPng"==g||"plantUmlSvg"==g||"plantUmlTxt"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(P,S,V,X,m){x=mxEvent.isAltDown(p)?x:y.getCenterInsertPoint(new mxRectangle(0,0,X,m));var z=null;y.getModel().beginUpdate();try{z="txt"==S?b.insertAsPreText(V,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y,
+X,m,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),y.setAttributeForCell(z,"plantUmlData",JSON.stringify({data:P,format:S},null,2))}finally{y.getModel().endUpdate()}null!=z&&(y.setSelectionCell(z),y.scrollCellToVisible(z))},y=b.editor.graph,A="plantUmlTxt"==g?"txt":"plantUmlPng"==g?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+e&&"svg"==A?window.setTimeout(function(){b.spinner.stop();t(e,A,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(e,A,function(P,S,V){b.spinner.stop();t(e,A,P,S,V)},function(P){b.handleError(P)})}}else if("mermaid"==g)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(e,A,function(P,S,V){x=mxEvent.isAltDown(p)?x:y.getCenterInsertPoint(new mxRectangle(0,0,S,V));b.spinner.stop();var X=null;y.getModel().beginUpdate();try{X=y.insertVertex(null,null,null,x.x,x.y,S,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+P+";"),y.setAttributeForCell(X,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=X&&(y.setSelectionCell(X),y.scrollCellToVisible(X))},function(P){b.handleError(P)}));else if("table"==g){g=null;for(var C=[],u=0,R={},l=0;l<n.length;l++){var q=mxUtils.trim(n[l]);if("primary key"==q.substring(0,11).toLowerCase()){var B=q.match(/\((.+)\)/);B&&B[1]&&(R[B[1]]=!0);n.splice(l,1)}else 0<q.toLowerCase().indexOf("primary key")&&(R[q.split(" ")[0]]=
+!0,n[l]=mxUtils.trim(q.replace(/primary key/i,"")))}for(l=0;l<n.length;l++)if(q=mxUtils.trim(n[l]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-1))),g=new mxCell(q,new mxGeometry(u,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),g.vertex=!0,C.push(g),q=b.editor.graph.getPreferredSizeForCell(J),null!=
+q&&(g.geometry.width=q.width+10);else if(null!=g&&")"==q.charAt(0))u+=g.geometry.width+40,g=null;else if("("!=q&&null!=g){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);B=R[q.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(B?"1":"0")+";");J.vertex=!0;var M=new mxCell(B?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(B?"fontStyle=1;":""));M.vertex=!0;J.insert(M);q=new mxCell(q,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(B?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&g.geometry.width<q.width+30&&(g.geometry.width=Math.min(320,
+Math.max(g.geometry.width,q.width+30)));g.insert(J,B?0:null);g.geometry.height+=30}0<C.length&&(y=b.editor.graph,x=mxEvent.isAltDown(p)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0)),y.setSelectionCells(y.importCells(C,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==g){if(0<n.length){y=b.editor.graph;J=null;C=[];for(l=g=0;l<n.length;l++)";"!=n[l].charAt(0)&&(0==n[l].length?J=null:null==J?(J=new mxCell(n[l],new mxGeometry(g,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+J.vertex=!0,C.push(J),q=y.getPreferredSizeForCell(J),null!=q&&J.geometry.width<q.width+10&&(J.geometry.width=q.width+10),g+=J.geometry.width+40):"--"==n[l]?(q=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;"),q.vertex=!0,J.geometry.height+=q.geometry.height,J.insert(q)):0<n[l].length&&(u=new mxCell(n[l],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;"),
+u.vertex=!0,q=y.getPreferredSizeForCell(u),null!=q&&u.geometry.width<q.width&&(u.geometry.width=q.width),J.geometry.width=Math.max(J.geometry.width,u.geometry.width),J.geometry.height+=u.geometry.height,J.insert(u)));if(0<C.length){x=mxEvent.isAltDown(p)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0));y.getModel().beginUpdate();try{C=y.importCells(C,x.x,x.y);q=[];for(l=0;l<C.length;l++)q.push(C[l]),q=q.concat(C[l].children);y.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{y.getModel().endUpdate()}y.setSelectionCells(C);
+y.scrollCellToVisible(y.getSelectionCell())}}}else{J=function(P){var S=E[P];null==S&&(S=new mxCell(P,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),S.vertex=!0,E[P]=S,C.push(S));return S};var E={};C=[];for(l=0;l<n.length;l++)if(";"!=n[l].charAt(0)){var L=n[l].split("->");2<=L.length&&(B=J(L[0]),M=J(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,B.insertEdge(L,!0),M.insertEdge(L,!1),C.push(L))}if(0<C.length){n=document.createElement("div");n.style.visibility="hidden";
+document.body.appendChild(n);y=new Graph(n);y.getModel().beginUpdate();try{C=y.importCells(C);for(l=0;l<C.length;l++)y.getModel().isVertex(C[l])&&(q=y.getPreferredSizeForCell(C[l]),C[l].geometry.width=Math.max(C[l].geometry.width,q.width),C[l].geometry.height=Math.max(C[l].geometry.height,q.height));l=!0;"horizontalFlow"==g||"verticalFlow"==g?((new mxHierarchicalLayout(y,"horizontalFlow"==g?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),C),l=!1):"circle"==g?
+(new mxCircleLayout(y)).execute(y.getDefaultParent()):(u=new mxFastOrganicLayout(y),u.disableEdgeStyle=!1,u.forceConstant=180,u.execute(y.getDefaultParent()));l&&(R=new mxParallelEdgeLayout(y),R.spacing=30,R.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{C=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(p)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(C,!0)),q=b.editor.graph.importCells(C,
+x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();n.parentNode.removeChild(n)}}}function v(){return"list"==G.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==G.value?
+"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==G.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"==G.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"==G.value||"plantUmlTxt"==G.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 x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var D=document.createElement("textarea");D.style.boxSizing="border-box";D.style.resize=
+"none";D.style.width="100%";D.style.height="354px";D.style.marginBottom="16px";var G=document.createElement("select");if("formatSql"==k||"mermaid"==k)G.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));"plantUml"!=k&&G.appendChild(H);null!=k&&"fromText"!=k||H.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==
+k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("formatSql"));"mermaid"==k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));var I=document.createElement("option");I.setAttribute("value","circle");mxUtils.write(I,mxResources.get("circle"));var F=document.createElement("option");
+F.setAttribute("value","horizontalFlow");mxUtils.write(F,mxResources.get("horizontalFlow"));var O=document.createElement("option");O.setAttribute("value","verticalFlow");mxUtils.write(O,mxResources.get("verticalFlow"));"plantUml"!=k&&(G.appendChild(H),G.appendChild(I),G.appendChild(F),G.appendChild(O));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&H.setAttribute("selected",
+"selected");I=document.createElement("option");I.setAttribute("value","plantUmlPng");mxUtils.write(I,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(G.appendChild(H),G.appendChild(I),G.appendChild(F));var c=v();D.value=c;f.appendChild(D);this.init=function(){D.focus()};
+Graph.fileSupport&&(D.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),D.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=e.dataTransfer.files[0];var g=new FileReader;g.onload=function(p){D.value=p.target.result};g.readAsText(e)}},!1));f.appendChild(G);mxEvent.addListener(G,"change",function(){var e=v();if(0==D.value.length||D.value==c)c=e,D.value=c});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(H=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),H.className="geBtn",f.appendChild(H));H=mxUtils.button(mxResources.get("close"),function(){D.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);I=mxUtils.button(mxResources.get("insert"),function(e){b.hideDialog();d(D.value,G.value,e)});f.appendChild(I);I.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+f.appendChild(H);this.container=f},NewDialog=function(b,f,k,d,v,x,D,G,H,I,F,O,c,e,g,p,n,t){function y(ma){null!=ma&&(xa=ta=ma?135:140);ma=!0;if(null!=ua)for(;E<ua.length&&(ma||0!=mxUtils.mod(E,30));){var ea=ua[E++];ea=u(ea.url,ea.libs,ea.title,ea.tooltip?ea.tooltip:ea.title,ea.select,ea.imgUrl,ea.info,ea.onClick,ea.preview,ea.noImg,ea.clibs);ma&&ea.click();ma=!1}}function A(){if(Z&&null!=e)k||b.hideDialog(),e(Z,ba,M.value);else if(d)k||b.hideDialog(),d(T,M.value,ca,N);else{var ma=M.value;null!=ma&&
+0<ma.length&&b.pickFolder(b.mode,function(ea){b.createFile(ma,T,null!=N&&0<N.length?N:null,null,function(){b.hideDialog()},null,ea,null,null!=U&&0<U.length?U:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function C(ma,ea,aa,na,la,pa,ia){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");P.removeAttribute("disabled");T=ea;N=aa;U=pa;W=ma;Z=na;ca=ia;ba=la;W.style.backgroundColor=G;W.style.border=H}function u(ma,ea,aa,na,la,pa,ia,ja,
+oa,ya,Aa){function Fa(Ha,Ta){null==Ma?(Qa=Ha,Qa=/^https?:\/\//.test(Qa)&&!b.editor.isCorsEnabledForUrl(Qa)?PROXY_URL+"?url="+encodeURIComponent(Qa):TEMPLATE_PATH+"/"+Qa,mxUtils.get(Qa,mxUtils.bind(this,function(Sa){200<=Sa.getStatus()&&299>=Sa.getStatus()&&(Ma=Sa.getText());Ta(Ma,Qa)}))):Ta(Ma,Qa)}function Da(Ha,Ta,Sa){if(null!=Ha&&mxUtils.isAncestorNode(document.body,sa)){Ha=mxUtils.parseXml(Ha);Ha=Editor.parseDiagramNode(Ha.documentElement);var Wa=new mxCodec(Ha.ownerDocument),$a=new mxGraphModel;
+Wa.decode(Ha,$a);Ha=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,Ha,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=aa?mxResources.get(aa,null,aa):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(sa,null,null,ma,ia,Aa)},!0,!1)}}function va(Ha,Ta){null==ma||Va||
+b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ga?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ga.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ga.naturalWidth+'" height="'+Ga.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Da(Ta,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha))):(b.sidebar.currentElt=
+sa,Va=!0,Fa(ma,function(Sa){Va&&b.sidebar.currentElt==sa&&Da(Sa,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha));Va=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=xa+"px";sa.style.width=ta+"px";var Ma=null,Qa=ma;null!=aa?sa.setAttribute("title",mxResources.get(aa,null,aa)):null!=na&&0<na.length&&sa.setAttribute("title",na);var Va=!1,Ga=null;if(null!=pa){sa.style.display="inline-flex";sa.style.justifyContent="center";
+sa.style.alignItems="center";la=document.createElement("img");la.setAttribute("src",pa);la.setAttribute("alt",na);la.style.maxWidth=xa+"px";la.style.maxHeight=ta+"px";Ga=la;var Ia=pa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(la);la.onerror=function(){this.src!=Ia?this.src=Ia:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ha){C(sa,null,null,ma,ia,Aa)}),null,null);mxEvent.addListener(sa,"dblclick",function(Ha){A();
+mxEvent.consume(Ha)})}else if(!ya&&null!=ma&&0<ma.length){var Ja=function(Ha){P.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";L.spin(fa);Fa(ma,function(Ta,Sa){L.stop();null!=Ta&&(C(sa,Ta,ea,null,null,Aa,Sa),Ha&&A())})};la=oa||TEMPLATE_PATH+"/"+ma.substring(0,ma.length-4)+".png";sa.style.backgroundImage="url("+la+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=aa){na=document.createElement("table");
+na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";pa=document.createElement("tbody");oa=document.createElement("tr");ya=document.createElement("td");ya.setAttribute("align","center");ya.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";Pa.style.userSelect="none";Pa.style.borderRadius=
+"3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=xa-34+"px";mxUtils.write(Pa,mxResources.get(aa,null,aa));ya.appendChild(Pa);oa.appendChild(ya);pa.appendChild(oa);na.appendChild(pa);sa.appendChild(na)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ha){Ja()}),null,null);mxEvent.addListener(sa,"dblclick",function(Ha){Ja(!0);mxEvent.consume(Ha)})}else na=document.createElement("table"),na.setAttribute("width",
+"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",pa=document.createElement("tbody"),oa=document.createElement("tr"),ya=document.createElement("td"),ya.setAttribute("align","center"),ya.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",Pa.style.maxWidth=
+xa-34+"px",mxUtils.write(Pa,mxResources.get(aa,null,aa)),ya.appendChild(Pa),oa.appendChild(ya),pa.appendChild(oa),na.appendChild(pa),sa.appendChild(na),la&&C(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ha){C(sa,null,null,ma,ia)}),null,null),null!=ja?mxEvent.addListener(sa,"click",ja):(mxEvent.addListener(sa,"click",function(Ha){C(sa,null,null,ma,ia)}),mxEvent.addListener(sa,"dblclick",function(Ha){A();mxEvent.consume(Ha)}));if(null!=ma){var Ra=document.createElement("img");Ra.setAttribute("src",
+Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";sa.appendChild(Ra);var Ua=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ha){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ha){Ua||va(Ha,Ra);mxEvent.consume(Ha)}))}fa.appendChild(sa);return sa}function R(){function ma(va,
+sa){var Ma=mxResources.get(va);null==Ma&&(Ma=va.substring(0,1).toUpperCase()+va.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+" ("+sa.length+")"}function ea(va,sa,Ma){mxEvent.addListener(sa,"click",function(){qa!=sa&&(qa.style.backgroundColor="",qa=sa,qa.style.backgroundColor=D,fa.scrollTop=0,fa.innerText="",E=0,ua=Ma?Na[va][Ma]:ka[va],V=null,y(!1))})}ra&&(ra=!1,mxEvent.addListener(fa,"scroll",function(va){fa.scrollTop+fa.clientHeight>=fa.scrollHeight&&(y(),mxEvent.consume(va))}));
+if(0<Ea){var aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(aa,mxResources.get("custom"));za.appendChild(aa);for(var na in Ka){var la=document.createElement("div"),pa=na;aa=Ka[na];18<pa.length&&(pa=pa.substring(0,18)+"&hellip;");la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";la.setAttribute("title",
+pa+" ("+aa.length+")");mxUtils.write(la,la.getAttribute("title"));null!=I&&(la.style.padding=I);za.appendChild(la);(function(va,sa){mxEvent.addListener(la,"click",function(){qa!=sa&&(qa.style.backgroundColor="",qa=sa,qa.style.backgroundColor=D,fa.scrollTop=0,fa.innerText="",E=0,ua=Ka[va],V=null,y(!1))})})(na,la)}aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(aa,"draw.io");za.appendChild(aa)}for(na in ka){pa=
+Na[na];var ia=la=document.createElement(pa?"ul":"div");aa=ka[na];var ja=ma(na,aa);if(null!=pa){var oa=document.createElement("li"),ya=document.createElement("div");ya.className="geTempTreeCaret";ya.setAttribute("title",ja);mxUtils.write(ya,ja);ia=ya;oa.appendChild(ya);ja=document.createElement("ul");ja.className="geTempTreeNested";ja.style.visibility="hidden";for(var Aa in pa){var Fa=document.createElement("li"),Da=ma(Aa,pa[Aa]);Fa.setAttribute("title",Da);mxUtils.write(Fa,Da);ea(na,Fa,Aa);ja.appendChild(Fa)}oa.appendChild(ja);
+la.className="geTempTree";la.appendChild(oa);(function(va,sa){mxEvent.addListener(sa,"click",function(){va.style.visibility="visible";va.classList.toggle("geTempTreeActive");va.classList.toggle("geTempTreeNested")&&setTimeout(function(){va.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ja,ya)}else la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+la.setAttribute("title",ja),mxUtils.write(la,ja);null!=I&&(la.style.padding=I);za.appendChild(la);null==qa&&0<aa.length&&(qa=la,qa.style.backgroundColor=D,ua=aa);ea(na,ia)}y(!1)}var l=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;v=null!=v?v:!1;D=null!=D?D:"#ebf2f9";G=null!=G?G:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";H=null!=H?H:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";F=null!=F?F:EditorUi.templateFile;var q=document.createElement("div");
+q.style.userSelect="none";q.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";k&&q.appendChild(B);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||l||!k||B.appendChild(J);k&&mxUtils.write(B,(l?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var M=document.createElement("input");M.setAttribute("value",b.defaultFilename+J);M.style.marginLeft="10px";M.style.width=f||
+l?"144px":"244px";this.init=function(){k&&(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null));null!=fa.parentNode&&null!=fa.parentNode.parentNode&&mxEvent.addGestureListeners(fa.parentNode.parentNode,mxUtils.bind(this,function(ma){b.sidebar.hideTooltip()}),null,null)};k&&(B.appendChild(M),t?M.style.width=f||l?"350px":"450px":(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),t.style.marginLeft=
+"6px",t.style.width=f||l?"80px":"180px",B.appendChild(t)),null!=b.editor.fileExtensions&&(l=FilenameDialog.createTypeHint(b,M,b.editor.fileExtensions),l.style.marginTop="12px",B.appendChild(l))));B=!1;var E=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(p||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");A();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";
+if(O||c){var S=[],V=null,X=null,m=null,z=function(ma){P.setAttribute("disabled","disabled");for(var ea=0;ea<S.length;ea++)S[ea].className=ea==ma?"geBtn gePrimaryBtn":"geBtn"};B=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";q.appendChild(p);l=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){za.style.display="";Y.style.display="";fa.style.left="160px";z(0);fa.scrollTop=0;fa.innerText="";E=0;V!=ua&&(ua=V,ka=X,Ea=m,za.innerText="",R(),V=null)});
+S.push(l);p.appendChild(l);var K=function(ma){za.style.display="none";Y.style.display="none";fa.style.left="30px";z(ma?-1:1);null==V&&(V=ua);fa.scrollTop=0;fa.innerText="";L.spin(fa);var ea=function(aa,na,la){E=0;L.stop();ua=aa;la=la||{};var pa=0,ia;for(ia in la)pa+=la[ia].length;if(na)fa.innerText=na;else if(0==aa.length&&0==pa)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<pa){za.style.display="";fa.style.left="160px";za.innerText="";Ea=0;ka={"draw.io":aa};
+for(ia in la)ka[ia]=la[ia];R()}else y(!0)};ma?c(Q.value,ea):O(ea)};O&&(l=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){K()}),p.appendChild(l),S.push(l));if(c){l=document.createElement("span");l.style.marginLeft="10px";l.innerText=mxResources.get("search")+":";p.appendChild(l);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ma){13==ma.keyCode&&K(!0)});p.appendChild(Q);l=mxUtils.button(mxResources.get("search"),
+function(){K(!0)});l.className="geBtn";p.appendChild(l)}z(0)}var N=null,U=null,T=null,W=null,Z=null,ca=null,ba=null,fa=document.createElement("div");fa.style.border="1px solid #d3d3d3";fa.style.position="absolute";fa.style.left="160px";fa.style.right="34px";p=(k?72:40)+(B?30:0);fa.style.top=p+"px";fa.style.bottom="68px";fa.style.margin="6px 0 0 -1px";fa.style.padding="6px";fa.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+p+
+"px;height:22px;margin-top: 6px;white-space: nowrap";var ha=document.createElement("input");ha.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ha.setAttribute("placeholder",mxResources.get("search"));ha.setAttribute("type","text");Y.appendChild(ha);var da=document.createElement("img"),wa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";da.setAttribute("src",wa);da.setAttribute("title",mxResources.get("search"));
+da.style.position="relative";da.style.left="-18px";da.style.top="1px";da.style.background="url('"+b.editor.transparentImage+"')";Y.appendChild(da);mxEvent.addListener(da,"click",function(){da.getAttribute("src")==Dialog.prototype.closeImage&&(da.setAttribute("src",wa),da.setAttribute("title",mxResources.get("search")),ha.value="",null!=Oa&&(Oa.click(),Oa=null));ha.focus()});mxEvent.addListener(ha,"keydown",mxUtils.bind(this,function(ma){if(13==ma.keyCode){var ea=ha.value;if(""==ea)null!=Oa&&(Oa.click(),
+Oa=null);else{if(null==NewDialog.tagsList[F]){var aa={};for(Aa in ka)for(var na=ka[Aa],la=0;la<na.length;la++){var pa=na[la];if(null!=pa.tags)for(var ia=pa.tags.toLowerCase().split(";"),ja=0;ja<ia.length;ja++)null==aa[ia[ja]]&&(aa[ia[ja]]=[]),aa[ia[ja]].push(pa)}NewDialog.tagsList[F]=aa}var oa=ea.toLowerCase().split(" ");aa=NewDialog.tagsList[F];if(0<Ea&&null==aa.__tagsList__){for(Aa in Ka)for(na=Ka[Aa],la=0;la<na.length;la++)for(pa=na[la],ia=pa.title.split(" "),ia.push(Aa),ja=0;ja<ia.length;ja++){var ya=
+ia[ja].toLowerCase();null==aa[ya]&&(aa[ya]=[]);aa[ya].push(pa)}aa.__tagsList__=!0}var Aa=[];na={};for(la=ia=0;la<oa.length;la++)if(0<oa[la].length){ya=aa[oa[la]];var Fa={};Aa=[];if(null!=ya)for(ja=0;ja<ya.length;ja++)pa=ya[ja],0==ia==(null==na[pa.url])&&(Fa[pa.url]=!0,Aa.push(pa));na=Fa;ia++}fa.scrollTop=0;fa.innerText="";E=0;aa=document.createElement("div");aa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(aa,mxResources.get(0==Aa.length?"noResultsFor":
+"resultsFor",[ea]));fa.appendChild(aa);null!=qa&&null==Oa&&(qa.style.backgroundColor="",Oa=qa,qa=aa);ua=Aa;V=null;y(!1)}mxEvent.consume(ma)}}));mxEvent.addListener(ha,"keyup",mxUtils.bind(this,function(ma){""==ha.value?(da.setAttribute("src",wa),da.setAttribute("title",mxResources.get("search"))):(da.setAttribute("src",Dialog.prototype.closeImage),da.setAttribute("title",mxResources.get("reset")))}));p+=23;var za=document.createElement("div");za.style.cssText="position:absolute;left:30px;width:128px;top:"+
+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(fa,"scroll",function(){b.sidebar.hideTooltip()});var xa=140,ta=140,ka={},Na={},Ka={},Ea=0,ra=!0,qa=null,Oa=null;ka.basic=[{title:"blankDiagram",select:!0}];var ua=ka.basic;if(!f){var Ca=function(){mxUtils.get(La,function(ma){if(!Ba){Ba=!0;ma=ma.getXml().documentElement.firstChild;for(var ea={};null!=ma;){if("undefined"!==typeof ma.getAttribute)if("clibs"==ma.nodeName){for(var aa=ma.getAttribute("name"),na=
+ma.getElementsByTagName("add"),la=[],pa=0;pa<na.length;pa++)la.push(encodeURIComponent(mxUtils.getTextContent(na[pa])));null!=aa&&0<la.length&&(ea[aa]=la.join(";"))}else if(la=ma.getAttribute("url"),null!=la){na=ma.getAttribute("section");aa=ma.getAttribute("subsection");if(null==na&&(pa=la.indexOf("/"),na=la.substring(0,pa),null==aa)){var ia=la.indexOf("/",pa+1);-1<ia&&(aa=la.substring(pa+1,ia))}pa=ka[na];null==pa&&(pa=[],ka[na]=pa);la=ma.getAttribute("clibs");null!=ea[la]&&(la=ea[la]);la={url:ma.getAttribute("url"),
+libs:ma.getAttribute("libs"),title:ma.getAttribute("title"),tooltip:ma.getAttribute("name")||ma.getAttribute("url"),preview:ma.getAttribute("preview"),clibs:la,tags:ma.getAttribute("tags")};pa.push(la);null!=aa&&(pa=Na[na],null==pa&&(pa={},Na[na]=pa),na=pa[aa],null==na&&(na=[],pa[aa]=na),na.push(la))}ma=ma.nextSibling}L.stop();R()}})};q.appendChild(Y);q.appendChild(za);q.appendChild(fa);var Ba=!1,La=F;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La));
+L.spin(fa);null!=n?n(function(ma,ea){Ka=ma;m=Ea=ea;Ca()},Ca):Ca();X=ka}mxEvent.addListener(M,"keypress",function(ma){b.dialog.container.firstChild==q&&13==ma.keyCode&&A()});n=document.createElement("div");n.style.marginTop=f?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";f||b.isOffline()||!k||null!=d||v||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+p.className="geBtn",n.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||v&&null==x||n.appendChild(p);f||"1"==urlParams.embed||v||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ma=new FilenameDialog(b,"",mxResources.get("create"),function(ea){null!=ea&&0<ea.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ea),function(aa){T=
+aa;N=null;templateRealURl=ea;b.hideDialog();A()},function(aa){b.handleError(aa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ma.container,300,80,!0,!0);ma.init()}),f.className="geBtn",n.appendChild(f));Graph.fileSupport&&g&&(g=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ma=document.createElement("input");ma.setAttribute("multiple","multiple");ma.setAttribute("type","file");mxEvent.addListener(ma,"change",function(ea){b.openFiles(ma.files,!0);
+ma.value=""});ma.style.display="none";document.body.appendChild(ma);b.newDlgFileInputElt=ma}b.newDlgFileInputElt.click()}),g.className="geBtn",n.appendChild(g));n.appendChild(P);b.editor.cancelFirst||null!=d||v&&null==x||n.appendChild(p);q.appendChild(n);this.container=q};NewDialog.tagsList={};
+var CreateDialog=function(b,f,k,d,v,x,D,G,H,I,F,O,c,e,g,p,n){function t(B,J,M,E){function L(){mxEvent.addListener(P,"click",function(){var z=M;if(D){var K=C.value,Q=K.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){z=null!=z?z:q.value;var N="";z==App.MODE_GOOGLE?N=b.drive.extension:z==App.MODE_GITHUB?N=b.gitHub.extension:z==App.MODE_GITLAB?N=b.gitLab.extension:z==App.MODE_TRELLO?N=b.trello.extension:z==App.MODE_DROPBOX?N=b.dropbox.extension:z==App.MODE_ONEDRIVE?N=b.oneDrive.extension:z==App.MODE_DEVICE&&
+(N=".drawio");0<=Q&&(K=K.substring(0,Q));C.value=K+N}}y(M)})}var P=document.createElement("a");P.style.overflow="hidden";var S=document.createElement("img");S.src=B;S.setAttribute("border","0");S.setAttribute("align","absmiddle");S.style.width="60px";S.style.height="60px";S.style.paddingBottom="6px";P.style.display="inline-block";P.className="geBaseButton";P.style.position="relative";P.style.margin="4px";P.style.padding="8px 8px 10px 8px";P.style.whiteSpace="nowrap";P.appendChild(S);P.style.color=
+"gray";P.style.fontSize="11px";var V=document.createElement("div");P.appendChild(V);mxUtils.write(V,J);if(null!=E&&null==b[E]){S.style.visibility="hidden";mxUtils.setOpacity(V,10);var X=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});X.spin(P);var m=window.setTimeout(function(){null==b[E]&&(X.stop(),P.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[E]&&(window.clearTimeout(m),
+mxUtils.setOpacity(V,100),S.style.visibility="",X.stop(),L())}))}else L();R.appendChild(P);++l==O&&(mxUtils.br(R),l=0)}function y(B){var J=C.value;if(null==B||null!=J&&0<J.length)n&&b.hideDialog(),k(J,B,C)}F="1"==urlParams.noDevice?!1:F;D=null!=D?D:!0;G=null!=G?G:!0;O=null!=O?O:4;n=null!=n?n:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var A=document.createElement("h2");mxUtils.write(A,v||mxResources.get("create"));A.style.marginTop="0px";A.style.marginBottom=
+"24px";x.appendChild(A);mxUtils.write(x,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",f);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};x.appendChild(C);null!=p&&(null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),
+v.style.marginLeft="6px",v.style.width="90px",x.appendChild(v)),x.appendChild(FilenameDialog.createTypeHint(b,C,p)));p=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";v=document.createElement("img");var u=g?c:btoa(unescape(encodeURIComponent(c)));v.setAttribute("src","data:"+e+";base64,"+u);v.style.position="absolute";v.style.top="70px";v.style.right="100px";v.style.maxWidth="120px";v.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)");x.appendChild(v);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=e||(p=mxUtils.button(mxResources.get("copy"),function(B){B=b.base64ToBlob(u,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+e+";base64,"+u+'">'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
+p.style.marginTop="6px",p.className="geBtn");H&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(B){mxEvent.isPopupTrigger(B)||y("_blank")}))}mxUtils.br(x);var R=document.createElement("div");R.style.textAlign="center";var l=0;R.style.marginTop="6px";x.appendChild(R);var q=document.createElement("select");q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),q.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),q.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(c,mxResources.get("dropbox")),q.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),q.appendChild(c),t(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),q.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),q.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),q.appendChild(c),b.mode!=App.MODE_DEVICE&&G||c.setAttribute("selected","selected"),F&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);G&&isLocalStorage&&"0"!=urlParams.browser&&(G=document.createElement("option"),
+G.setAttribute("value",App.MODE_BROWSER),mxUtils.write(G,mxResources.get("browser")),q.appendChild(G),b.mode==App.MODE_BROWSER&&G.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));G=document.createElement("div");G.style.marginTop="26px";G.style.textAlign="center";null!=I&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(I)}),F.className="geBtn",G.appendChild(F));F=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
+function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==d&&G.appendChild(F);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),c.className="geBtn",G.appendChild(c));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),H.className="geBtn",G.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),
+function(){y("download")}),H.className="geBtn",G.appendChild(H),null!=p&&(H.style.marginTop="6px",G.style.marginTop="6px"));null!=p&&(mxUtils.br(G),G.appendChild(p));b.editor.cancelFirst&&null==d||G.appendChild(F);mxEvent.addListener(C,"keypress",function(B){13==B.keyCode?y(App.MODE_DEVICE):27==B.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(G);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,f,k,d,v){v=null!=v?v:!0;var x=document.createElement("div");x.style.textAlign="left";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var D=mxUtils.button(mxResources.get("openInThisWindow"),function(){v&&b.hideDialog();null!=d&&d()});D.className="geBtn";D.style.marginBottom="8px";D.style.width="280px";x.appendChild(D);mxUtils.br(x);var G=mxUtils.button(mxResources.get("openInNewWindow"),function(){v&&b.hideDialog();
+null!=k&&k();b.openLink(f,null,!0)});G.className="geBtn gePrimaryBtn";G.style.width=D.style.width;x.appendChild(G);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,k,d,v,x,D,G){function H(){0<O.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}x=null!=x?x:!0;var I=b.editor.graph,F=document.createElement("div");mxUtils.write(F,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
+"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var O=document.createElement("input");O.setAttribute("value",k);O.setAttribute("type","text");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete","off");O.setAttribute("autocapitalize","off");O.style.marginTop="6px";O.style.width=(Graph.fileSupport?460:340)-20+"px";O.style.backgroundImage="url('"+
+Dialog.prototype.clearImage+"')";O.style.backgroundRepeat="no-repeat";O.style.backgroundPosition="100% 50%";O.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){O.value="";O.focus()});
+f.appendChild(O);f.appendChild(k);F.appendChild(f);var c=G,e,g,p=function(A,C,u,R){var l="data:"==A.substring(0,5);!b.isOffline()||l&&"undefined"===typeof chrome?0<A.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(A,function(q){b.spinner.stop();b.hideDialog();var B=!1===R?1:null!=C&&null!=u?Math.max(C/q.width,u/q.height):Math.min(1,Math.min(520/q.width,520/q.height));x&&(A=b.convertDataUri(A));d(A,Math.round(Number(q.width)*B),Math.round(Number(q.height)*B),c,e,g)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(A,null,null,c,e,g)):(A=b.convertDataUri(A),C=null==C?120:C,u=null==u?100:u,b.hideDialog(),d(A,C,u,c,e,g))},n=function(A,C){if(null!=A){var u=v?null:I.getModel().getGeometry(I.getSelectionCell());null!=u?p(A,u.width,u.height,C):p(A,null,null,C)}else b.hideDialog(),d(null)};this.init=function(){O.focus();if(Graph.fileSupport){O.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var A=F.parentNode,C=null;mxEvent.addListener(A,"dragleave",function(u){null!=C&&(C.parentNode.removeChild(C),C=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(u){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(A));u.stopPropagation();u.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(u){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<u.dataTransfer.files.length)b.importFiles(u.dataTransfer.files,
+0,0,b.maxImageSize,function(l,q,B,J,M,E,L,P){n(l,P)},function(){},function(l){return"image/"==l.type.substring(0,6)},function(l){for(var q=0;q<l.length;q++)l[q]()},!mxEvent.isControlDown(u),null,null,!0);else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")){var R=u.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(R)&&n(decodeURIComponent(R))}u.stopPropagation();u.preventDefault()}),!1)}};G=document.createElement("div");G.style.marginTop="14px";G.style.textAlign=
+"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&G.appendChild(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&&(O.value=A.url));O.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type",
+"file");mxEvent.addListener(t,"change",function(A){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(C,u,R,l,q,B){n(C)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var u=0;u<C.length;u++)C[u]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";G.appendChild(f)}mxEvent.addListener(O,
+"keypress",function(A){13==A.keyCode&&n(O.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var A=new CropImageDialog(b,O.value,c,function(C,u,R){c=C;e=u;g=R});b.showDialog(A.container,300,390,!0,!0)});D&&(y.className="geBtn",G.appendChild(y));mxEvent.addListener(O,"change",function(A){c=null;H()});H();D=mxUtils.button(mxResources.get("apply"),function(){n(O.value)});D.className="geBtn gePrimaryBtn";G.appendChild(D);b.editor.cancelFirst||G.appendChild(k);Graph.fileSupport&&(G.style.marginTop=
+"120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),F.appendChild(D));F.appendChild(G);this.container=F},LinkDialog=function(b,f,k,d,v,x,D){function G(A,C,u){u=mxUtils.button("",u);
+u.className="geBtn";u.setAttribute("title",C);C=document.createElement("img");C.style.height="26px";C.style.width="26px";C.setAttribute("src",A);u.style.minWidth="42px";u.style.verticalAlign="middle";u.appendChild(C);y.appendChild(u)}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var I=document.createElement("div");I.className="geTitle";I.style.backgroundColor="transparent";I.style.borderColor="transparent";I.style.whiteSpace="nowrap";I.style.textOverflow=
+"clip";I.style.cursor="default";I.style.paddingRight="20px";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="97%";F.style.boxSizing="border-box";F.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="14px";F.style.marginBottom="4px";var O=document.createElement("div");O.setAttribute("title",
+mxResources.get("reset"));O.style.position="relative";O.style.left="-16px";O.style.width="12px";O.style.height="14px";O.style.cursor="pointer";O.style.display="inline-block";O.style.top="3px";O.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(O,"click",function(){F.value="";F.focus()});var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");
+var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var g=document.createElement("select");g.style.width="520px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.margin="0 6p 0 6px";null!=D&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);D=null!=D?D:"_blank";p.setAttribute("title",D);x&&(F.style.width="340px");if(v&&
+null!=b.pages){null!=f&&Graph.isPageLink(f)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(F.setAttribute("value",f),c.setAttribute("checked","checked"),c.defaultChecked=!0);I.appendChild(c);I.appendChild(F);I.appendChild(O);x&&(I.appendChild(p),mxUtils.write(I,mxResources.get("openInNewWindow")));mxUtils.br(I);I.appendChild(e);v=!1;for(x=0;x<b.pages.length;x++)O=document.createElement("option"),mxUtils.write(O,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),O.setAttribute("value",
+"data:page/id,"+b.pages[x].getId()),f==O.getAttribute("value")&&(O.setAttribute("selected","selected"),v=!0),g.appendChild(O);if(!v&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value","pageNotFound");g.appendChild(n);mxEvent.addListener(g,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}I.appendChild(g)}else F.setAttribute("value",
+f),I.appendChild(F),I.appendChild(O);H.appendChild(I);var t=mxUtils.button(k,function(){b.hideDialog();d(e.checked?"pageNotFound"!==g.value?g.value:f:F.value,LinkDialog.selectedDocs,p.checked?D:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?g.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(g,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked",
+"checked");e.checked=!0});mxEvent.addListener(F,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var A=H.parentNode,C=null;mxEvent.addListener(A,"dragleave",function(u){null!=C&&(C.parentNode.removeChild(C),C=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(u){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(A));u.stopPropagation();u.preventDefault()}));
+mxEvent.addListener(A,"drop",mxUtils.bind(this,function(u){null!=C&&(C.parentNode.removeChild(C),C=null);0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(u.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click());u.stopPropagation();u.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(A){if(A.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=A.docs;var C=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)?C="https://www.draw.io/#G"+A.docs[0].id:"application/vnd.google-apps.folder"==A.docs[0].mimeType&&(C="https://drive.google.com/#folders/"+A.docs[0].id);F.value=C;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&G(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(C){LinkDialog.filePicked(C)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&G(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(A){F.value=A[0].link;F.focus()}})});null!=b.oneDrive&&G(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(A,C){F.value=C.value[0].webUrl;F.focus()},!0)});null!=b.gitHub&&G(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(A){if(null!=A){A=A.split("/");var C=A[0],u=A[1],R=A[2];A=A.slice(3,A.length).join("/");F.value="https://github.com/"+C+"/"+u+"/blob/"+R+"/"+A;F.focus()}})});null!=b.gitLab&&G(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(A){if(null!=A){A=A.split("/");var C=
+A[0],u=A[1],R=A[2];A=A.slice(3,A.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+C+"/"+u+"/blob/"+R+"/"+A;F.focus()}})});mxEvent.addListener(F,"keypress",function(A){13==A.keyCode&&(b.hideDialog(),d(e.checked?g.value:F.value,LinkDialog.selectedDocs))});y.appendChild(t);b.editor.cancelFirst||y.appendChild(k);H.appendChild(y);this.container=H},FeedbackDialog=function(b,f,k,d){var v=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize=
+"18px";x.style.marginBottom="18px";v.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));v.appendChild(x);var D=document.createElement("input");D.setAttribute("type","text");D.style.marginTop="6px";D.style.width="600px";var G=mxUtils.button(mxResources.get("sendMessage"),function(){var O=F.value+(I.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;O.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(D.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
+":\n"+O),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});G.className="geBtn gePrimaryBtn";if(!k){G.setAttribute("disabled","disabled");var H=/^(([^<>()[\]\\.,;:\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(D,
+"change",function(){0<D.value.length&&0<H.test(D.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")});mxEvent.addListener(D,"keyup",function(){0<D.value.length&&H.test(D.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")})}v.appendChild(D);this.init=function(){D.focus()};var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("checked","checked");I.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
+k.appendChild(I);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(x);mxEvent.addListener(x,"click",function(O){I.checked=!I.checked;mxEvent.consume(O)});v.appendChild(k);x=document.createElement("div");mxUtils.write(x,mxResources.get("feedback"));v.appendChild(x);var F=document.createElement("textarea");F.style.resize="none";F.style.width="600px";F.style.height="140px";F.style.marginTop="6px";F.setAttribute("placeholder",mxResources.get("comments"));
+v.appendChild(F);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst?(k.appendChild(x),k.appendChild(G)):(k.appendChild(G),k.appendChild(x));v.appendChild(k);this.container=v};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,f,k){var d=document.createElement("div"),v=document.createElement("h3");v.style.marginTop="0px";mxUtils.write(v,mxResources.get("revisionHistory"));d.appendChild(v);v=document.createElement("div");v.style.position="absolute";v.style.overflow="auto";v.style.width="170px";v.style.height="378px";d.appendChild(v);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.left="199px";x.style.width="470px";x.style.height="376px";
+x.style.overflow="hidden";var D=document.createElement("div");D.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";x.appendChild(D);mxEvent.disableContextMenu(x);d.appendChild(x);var G=new Graph(x);G.setTooltips(!1);G.setEnabled(!1);G.setPanning(!0);G.panningHandler.ignoreCell=!0;G.panningHandler.useLeftButtonForPanning=!0;G.minFitScale=null;G.maxFitScale=null;G.centerZoom=!0;var H=0,I=null,F=0,O=G.getGlobalVariable;
+G.getGlobalVariable=function(W){return"page"==W&&null!=I&&null!=I[F]?I[F].getAttribute("name"):"pagenumber"==W?F+1:"pagecount"==W?null!=I?I.length:1:O.apply(this,arguments)};G.getLinkForCell=function(){return null};Editor.MathJaxRender&&G.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(G.container)}));var c={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},e=new Spinner(c),g=b.getCurrentFile(),p=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),n={};for(c=0;c<p.length;c++)n[p[c].getAttribute("id")]=p[c];var t=null,y=null,A=null,C=null,u=mxUtils.button("",function(){null!=A&&G.zoomIn()});u.className="geSprite geSprite-zoomin";u.setAttribute("title",mxResources.get("zoomIn"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");
+mxUtils.setOpacity(u,20);var R=mxUtils.button("",function(){null!=A&&G.zoomOut()});R.className="geSprite geSprite-zoomout";R.setAttribute("title",mxResources.get("zoomOut"));R.style.outline="none";R.style.border="none";R.style.margin="2px";R.setAttribute("disabled","disabled");mxUtils.setOpacity(R,20);var l=mxUtils.button("",function(){null!=A&&(G.maxFitScale=8,G.fit(8),G.center())});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border=
+"none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var q=mxUtils.button("",function(){null!=A&&(G.zoomActual(),G.center())});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline="none";q.style.border="none";q.style.margin="2px";q.setAttribute("disabled","disabled");mxUtils.setOpacity(q,20);var B=mxUtils.button("",function(){});B.className="geSprite geSprite-middle";B.setAttribute("title",mxResources.get("compare"));
+B.style.outline="none";B.style.border="none";B.style.margin="2px";mxUtils.setOpacity(B,60);var J=x.cloneNode(!1);J.style.pointerEvent="none";x.parentNode.appendChild(J);var M=new Graph(J);M.setTooltips(!1);M.setEnabled(!1);M.setPanning(!0);M.panningHandler.ignoreCell=!0;M.panningHandler.useLeftButtonForPanning=!0;M.minFitScale=null;M.maxFitScale=null;M.centerZoom=!0;mxEvent.addGestureListeners(B,function(W){W=n[I[H].getAttribute("id")];mxUtils.setOpacity(B,20);D.innerText="";null==W?mxUtils.write(D,
+mxResources.get("pageNotFound")):(E.style.display="none",x.style.display="none",J.style.display="",J.style.backgroundColor=x.style.backgroundColor,W=Editor.parseDiagramNode(W),(new mxCodec(W.ownerDocument)).decode(W,M.getModel()),M.view.scaleAndTranslate(G.view.scale,G.view.translate.x,G.view.translate.y))},null,function(){mxUtils.setOpacity(B,60);D.innerText="";"none"==x.style.display&&(E.style.display="",x.style.display="",J.style.display="none")});var E=document.createElement("div");E.style.position=
+"absolute";E.style.textAlign="right";E.style.color="gray";E.style.marginTop="10px";E.style.backgroundColor="transparent";E.style.top="440px";E.style.right="32px";E.style.maxWidth="380px";E.style.cursor="default";var L=mxUtils.button(mxResources.get("download"),function(){if(null!=A){var W=mxUtils.getXml(A.documentElement),Z=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(W,Z,"text/xml"):(W="undefined"===typeof pako?"&xml="+encodeURIComponent(W):"&data="+encodeURIComponent(Graph.compress(W)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Z)+"&format=xml"+W)).simulate(document,"_blank"))}});L.className="geBtn";L.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),function(W){null!=A&&null!=C&&(mxEvent.isShiftDown(W)?null!=A&&(W=b.getPagesForNode(A.documentElement),W=b.diffPages(b.pages,W),W=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(W,null,2),function(Z){if(0<Z.length)try{b.confirm(mxResources.get("areYouSure"),function(){g.patch([JSON.parse(Z)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(W.container,620,460,!0,!0),W.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&g.save(!0,function(Z){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)})}))});
+P.className="geBtn";P.setAttribute("disabled","disabled");P.setAttribute("title","Shift+Click for Diff");var S=document.createElement("select");S.setAttribute("disabled","disabled");S.style.maxWidth="80px";S.style.position="relative";S.style.top="-2px";S.style.verticalAlign="bottom";S.style.marginRight="6px";S.style.display="none";var V=null;mxEvent.addListener(S,"change",function(W){null!=V&&(V(W),mxEvent.consume(W))});var X=mxUtils.button(mxResources.get("edit"),function(){null!=A&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(A.documentElement)),b.openLink(b.getUrl(),null,!0))});X.className="geBtn";X.setAttribute("disabled","disabled");null!=k&&(X.style.display="none");var m=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(S.selectedIndex))});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");null!=k&&(m.style.display="none",P.className="geBtn gePrimaryBtn");p=document.createElement("div");
+p.style.position="absolute";p.style.top="482px";p.style.width="640px";p.style.textAlign="right";var z=document.createElement("div");z.className="geToolbarContainer";z.style.backgroundColor="transparent";z.style.padding="2px";z.style.border="none";z.style.left="199px";z.style.top="442px";var K=null;if(null!=f&&0<f.length){x.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";
+var N=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(c=f.length-1;0<=c;c--){var T=function(W){var Z=new Date(W.modifiedDate),ca=null;if(0<=Z.getTime()){var ba=function(Y){e.stop();D.innerText="";var ha=mxUtils.parseXml(Y),da=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=da){var wa=function(xa){null!=xa&&(xa=za(Editor.parseDiagramNode(xa)));return xa},za=function(xa){var ta=xa.getAttribute("background");
+if(null==ta||""==ta||ta==mxConstants.NONE)ta=G.defaultPageBackgroundColor;x.style.backgroundColor=ta;(new mxCodec(xa.ownerDocument)).decode(xa,G.getModel());G.maxFitScale=1;G.fit(8);G.center();return xa};S.style.display="none";S.innerText="";A=ha;C=Y;I=parseSelectFunction=null;F=0;if("mxfile"==da.nodeName){ha=da.getElementsByTagName("diagram");I=[];for(Y=0;Y<ha.length;Y++)I.push(ha[Y]);F=Math.min(H,I.length-1);0<I.length&&wa(I[F]);if(1<I.length)for(S.removeAttribute("disabled"),S.style.display="",
+Y=0;Y<I.length;Y++)ha=document.createElement("option"),mxUtils.write(ha,I[Y].getAttribute("name")||mxResources.get("pageWithNumber",[Y+1])),ha.setAttribute("value",Y),Y==F&&ha.setAttribute("selected","selected"),S.appendChild(ha);V=function(){try{var xa=parseInt(S.value);F=H=xa;wa(I[xa])}catch(ta){S.value=H,b.handleError(ta)}}}else za(da);Y=W.lastModifyingUserName;null!=Y&&20<Y.length&&(Y=Y.substring(0,20)+"...");E.innerText="";mxUtils.write(E,(null!=Y?Y+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());
+E.setAttribute("title",ca.getAttribute("title"));u.removeAttribute("disabled");R.removeAttribute("disabled");l.removeAttribute("disabled");q.removeAttribute("disabled");B.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),L.removeAttribute("disabled"),m.removeAttribute("disabled"),X.removeAttribute("disabled"));mxUtils.setOpacity(u,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(l,60);mxUtils.setOpacity(q,60);mxUtils.setOpacity(B,60)}else S.style.display=
+"none",S.innerText="",E.innerText="",mxUtils.write(E,mxResources.get("errorLoadingFile")),mxUtils.write(D,mxResources.get("errorLoadingFile"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.style.cursor="pointer";var fa=document.createElement("td");fa.style.padding="6px";fa.style.whiteSpace="nowrap";W==f[f.length-1]?mxUtils.write(fa,mxResources.get("current")):Z.toDateString()===U?mxUtils.write(fa,Z.toLocaleTimeString()):mxUtils.write(fa,Z.toLocaleDateString()+
+" "+Z.toLocaleTimeString());ca.appendChild(fa);ca.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=W.fileSize?" "+b.formatFileSize(parseInt(W.fileSize)):"")+(null!=W.lastModifyingUserName?" "+W.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(Y){y!=W&&(e.stop(),null!=t&&(t.style.backgroundColor=""),y=W,t=ca,t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=A=null,E.removeAttribute("title"),E.innerText=mxResources.get("loading")+"...",
+x.style.backgroundColor=G.defaultPageBackgroundColor,D.innerText="",G.getModel().clear(),P.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(R,
+20),mxUtils.setOpacity(l,20),mxUtils.setOpacity(q,20),mxUtils.setOpacity(B,20),e.spin(x),W.getXml(function(ha){if(y==W)try{ba(ha)}catch(da){E.innerText=mxResources.get("error")+": "+da.message}},function(ha){e.stop();S.style.display="none";S.innerText="";E.innerText="";mxUtils.write(E,mxResources.get("errorLoadingFile"));mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Y))});mxEvent.addListener(ca,"dblclick",function(Y){m.click();window.getSelection?window.getSelection().removeAllRanges():
+document.selection&&document.selection.empty();mxEvent.consume(Y)},!1);N.appendChild(ca)}return ca}(f[c]);null!=T&&c==f.length-1&&(K=T)}Q.appendChild(N);v.appendChild(Q)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(x.style.display="none",z.style.display="none",mxUtils.write(v,mxResources.get("notAvailable"))):(x.style.display="none",z.style.display="none",mxUtils.write(v,mxResources.get("noRevisions")));this.init=function(){null!=
+K&&K.click()};v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.className="geBtn";z.appendChild(S);z.appendChild(u);z.appendChild(R);z.appendChild(q);z.appendChild(l);z.appendChild(B);b.editor.cancelFirst?(p.appendChild(v),p.appendChild(L),p.appendChild(X),p.appendChild(P),p.appendChild(m)):(p.appendChild(L),p.appendChild(X),p.appendChild(P),p.appendChild(m),p.appendChild(v));d.appendChild(p);d.appendChild(z);d.appendChild(E);this.container=d},DraftDialog=function(b,f,k,d,v,
+x,D,G,H){var I=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);I.appendChild(F);var O=document.createElement("select"),c=mxUtils.bind(this,function(){y=mxUtils.parseXml(H[O.value].data);A=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=H){O.style.marginLeft="4px";for(f=0;f<H.length;f++){var e=document.createElement("option");e.setAttribute("value",
+f);var g=new Date(H[f].created),p=new Date(H[f].modified);mxUtils.write(e,g.toLocaleDateString()+" "+g.toLocaleTimeString()+" - "+(g.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());O.appendChild(e)}F.appendChild(O);mxEvent.addListener(O,"change",c)}null==k&&(k=H[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=
+"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);I.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var y=mxUtils.parseXml(k),A=b.editor.extractGraphModel(y.documentElement,!0),C=0,u=null,R=t.getGlobalVariable;t.getGlobalVariable=function(q){return"page"==q&&null!=u&&null!=u[C]?u[C].getAttribute("name"):"pagenumber"==q?C+1:"pagecount"==q?
+null!=u?u.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};k=mxUtils.button("",function(){t.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);F=mxUtils.button("",function(){t.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin=
+"2px";mxUtils.setOpacity(F,60);f=mxUtils.button("",function(){t.maxFitScale=8;t.fit(8);t.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);e=mxUtils.button("",function(){t.zoomActual();t.center()});e.className="geSprite geSprite-actualsize";e.setAttribute("title",mxResources.get("actualSize"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,
+60);D=mxUtils.button(D||mxResources.get("discard"),function(){v.apply(this,[O.value,mxUtils.bind(this,function(){null!=O.parentNode&&(O.options[O.selectedIndex].parentNode.removeChild(O.options[O.selectedIndex]),0<O.options.length?(O.value=O.options[0].value,c()):b.hideDialog(!0))})])});D.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";x=mxUtils.button(x||
+mxResources.get("edit"),function(){d.apply(this,[O.value])});x.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";p=document.createElement("div");p.className="geToolbarContainer";p.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function q(E){if(null!=E){var L=E.getAttribute("background");if(null==
+L||""==L||L==mxConstants.NONE)L=Editor.isDarkMode()?"transparent":"#ffffff";n.style.backgroundColor=L;(new mxCodec(E.ownerDocument)).decode(E,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return E}function B(E){null!=E&&(E=q(Editor.parseDiagramNode(E)));return E}mxEvent.addListener(l,"change",function(E){C=parseInt(l.value);B(u[C]);mxEvent.consume(E)});if("mxfile"==A.nodeName){var J=A.getElementsByTagName("diagram");u=[];for(var M=0;M<J.length;M++)u.push(J[M]);0<u.length&&B(u[C]);l.innerText=
+"";if(1<u.length)for(l.style.display="",M=0;M<u.length;M++)J=document.createElement("option"),mxUtils.write(J,u[M].getAttribute("name")||mxResources.get("pageWithNumber",[M+1])),J.setAttribute("value",M),M==C&&J.setAttribute("selected","selected"),l.appendChild(J);else l.style.display="none"}else q(A)};p.appendChild(l);p.appendChild(k);p.appendChild(F);p.appendChild(e);p.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});k.className="geBtn";G=null!=G?mxUtils.button(mxResources.get("ignore"),
+G):null;null!=G&&(G.className="geBtn");b.editor.cancelFirst?(g.appendChild(k),null!=G&&g.appendChild(G),g.appendChild(D),g.appendChild(x)):(g.appendChild(x),g.appendChild(D),null!=G&&g.appendChild(G),g.appendChild(k));I.appendChild(g);I.appendChild(p);this.container=I},FindWindow=function(b,f,k,d,v,x){function D(V,X,m,z){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;for(var K=0;K<X.length;K++)if("label"!=X[K].nodeName){var Q=mxUtils.trim(X[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
+" ")).toLowerCase();if(null==V&&(z&&0<=Q.indexOf(m)||!z&&Q.substring(0,m.length)===m)||null!=V&&V.test(Q))return!0}}return!1}function G(){e&&u.value?(L.removeAttribute("disabled"),P.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));u.value&&C.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}function H(V,X,m){M.innerText="";var z=F.model.getDescendants(F.model.getRoot()),K=C.value.toLowerCase(),Q=R.checked?new RegExp(K):
+null,N=null;p=null;O!=K&&(O=K,c=null,g=!1);var U=null==c;if(0<K.length){if(g){g=!1;for(var T,W=0;W<b.pages.length;W++)if(b.currentPage==b.pages[W]){T=W;break}V=(T+1)%b.pages.length;c=null;do g=!1,z=b.pages[V],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(z),F.model.setRoot(z.root),V=(V+1)%b.pages.length;while(!H(!0,X,m)&&V!=T);c&&(c=null,m?b.editor.graph.model.execute(new SelectPage(b,z)):b.selectPage(z));g=!1;F=b.editor.graph;return H(!0,X,m)}for(W=0;W<z.length;W++){T=F.view.getState(z[W]);
+X&&null!=Q&&(U=U||T==c);if(null!=T&&null!=T.cell.value&&(U||null==N)&&(F.model.isVertex(T.cell)||F.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(q.innerHTML=F.sanitizeHtml(F.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([q])):label=F.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;X&&x&&null!=Q&&T==c&&(label=label.substr(n),Z=n);var ca=""==u.value,ba=ca;if(null==Q&&(ba&&0<=label.indexOf(K)||!ba&&label.substring(0,K.length)===
+K||ca&&D(Q,T.cell,K,ba))||null!=Q&&(Q.test(label)||ca&&D(Q,T.cell,K,ba)))if(x&&(null!=Q?(ca=label.match(Q),null!=ca&&0<ca.length&&(p=ca[0].toLowerCase(),n=Z+ca.index+p.length)):(p=K,n=p.length)),U){N=T;break}else null==N&&(N=T)}U=U||T==c}}if(null!=N){if(W==z.length&&l.checked)return c=null,g=!0,H(!0,X,m);c=N;F.scrollCellToVisible(c.cell);F.isEnabled()&&!F.isCellLocked(c.cell)?m||F.getSelectionCell()==c.cell&&1==F.getSelectionCount()||F.setSelectionCell(c.cell):F.highlightCell(c.cell)}else{if(!V&&
+l.checked)return g=!0,H(!0,X,m);F.isEnabled()&&!m&&F.clearSelection()}e=null!=N;x&&!V&&G();return 0==K.length||null!=N}var I=b.actions.get("findReplace"),F=b.editor.graph,O=null,c=null,e=!1,g=!1,p=null,n=0,t=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var A=x?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
+C.style.marginBottom="6px";C.style.width=A;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);if(x){var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("replaceWith"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=A;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";y.appendChild(u);mxUtils.br(y);mxEvent.addListener(u,"input",G)}var R=document.createElement("input");
+R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";y.appendChild(R);A=document.createElement("label");A.setAttribute("for","geFindWinRegExChck");y.appendChild(A);mxUtils.write(A,mxResources.get("regularExpression"));y.appendChild(A);A=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");A.style.position="relative";A.style.marginLeft="6px";A.style.top="-1px";y.appendChild(A);mxUtils.br(y);var l=document.createElement("input");l.setAttribute("id",
+"geFindWinAllPagesChck");l.setAttribute("type","checkbox");l.style.marginRight="4px";y.appendChild(l);A=document.createElement("label");A.setAttribute("for","geFindWinAllPagesChck");y.appendChild(A);mxUtils.write(A,mxResources.get("allPages"));y.appendChild(A);var q=document.createElement("div");mxUtils.br(y);A=document.createElement("div");A.style.left="0px";A.style.right="0px";A.style.marginTop="6px";A.style.padding="0 6px 0 6px";A.style.textAlign="center";y.appendChild(A);var B=mxUtils.button(mxResources.get("reset"),
+function(){M.innerText="";C.value="";C.style.backgroundColor="";x&&(u.value="",G());O=c=null;g=!1;C.focus()});B.setAttribute("title",mxResources.get("reset"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";x||A.appendChild(B);var J=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});
+J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";A.appendChild(J);var M=document.createElement("div");M.style.marginTop="10px";if(x){var E=function(V,X,m,z,K){if(null==K||"1"!=K.html)return z=V.toLowerCase().indexOf(X,z),0>z?V:V.substr(0,z)+m+V.substr(z+X.length);var Q=V;X=mxUtils.htmlEntities(X);K=[];var N=
+-1;for(V=V.replace(/<br>/ig,"\n");-1<(N=V.indexOf("<",N+1));)K.push(N);N=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");z=V.toLowerCase().indexOf(X,z);if(0>z)return Q;Q=z+X.length;m=mxUtils.htmlEntities(m);V=V.substr(0,z)+m+V.substr(Q);for(var U=0,T=0;T<K.length;T++){if(K[T]-U<z)V=V.substr(0,K[T])+N[T]+V.substr(K[T]);else{var W=K[T]-U<Q?z+U:K[T]+(m.length-X.length);V=V.substr(0,W)+N[T]+V.substr(W)}U+=N[T].length}return V.replace(/\n/g,"<br>")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=
+p&&null!=c&&u.value){var V=c.cell,X=F.getLabel(V);F.isCellEditable(V)&&F.model.setValue(V,E(X,p,u.value,n-p.length,F.getCurrentCellStyle(V)));C.style.backgroundColor=H(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(m){b.handleError(m)}});L.setAttribute("title",mxResources.get("replFind"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
+"disabled");A.appendChild(L);mxUtils.br(A);var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c&&u.value){var V=c.cell,X=F.getLabel(V);F.model.setValue(V,E(X,p,u.value,n-p.length,F.getCurrentCellStyle(V)));L.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(m){b.handleError(m)}});P.setAttribute("title",mxResources.get("replace"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow=
+"hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");A.appendChild(P);var S=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerText="";if(u.value){O=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var m=0,z={};H(!1,!0,!0)&&100>m;){var K=c.cell,Q=F.getLabel(K),N=z[K.id];if(N&&N.replAllMrk==t&&N.replAllPos>=n)break;z[K.id]={replAllMrk:t,replAllPos:n};F.isCellEditable(K)&&
+(F.model.setValue(K,E(Q,p,u.value,n-p.length,F.getCurrentCellStyle(K))),m++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(M,mxResources.get("matchesRepl",[m]))}catch(U){b.handleError(U)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}t++}});S.setAttribute("title",mxResources.get("replaceAll"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow=
+"ellipsis";S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");A.appendChild(S);mxUtils.br(A);A.appendChild(B);B=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));B.setAttribute("title",mxResources.get("close"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";A.appendChild(B);mxUtils.br(A);A.appendChild(M)}else B.style.width=
+"90px",J.style.width="90px";mxEvent.addListener(C,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)I.funct();else if(O!=C.value.toLowerCase()||13==V.keyCode)try{C.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(I.funct(),mxEvent.consume(V))});
+this.window=new mxWindow(mxResources.get("find")+(x?"/"+mxResources.get("replace"):""),y,f,k,d,v,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?l.removeAttribute("disabled"):
+(l.checked=!1,l.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,d,v,x){var D=b.editor.graph,G=document.createElement("div");G.style.textAlign="center";G.style.userSelect="none";G.style.overflow="hidden";G.style.height="100%";if(x){var H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=D.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float=
+"left";G.appendChild(H);var I=document.createElement("label");I.setAttribute("for","geFreehandBrush");I.style.float="left";I.style.marginTop="10px";G.appendChild(I);mxUtils.write(I,mxResources.get("brush"));G.appendChild(I);mxUtils.br(G);var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min","2");F.setAttribute("max","30");F.setAttribute("value",D.freehand.getBrushSize());F.style.width="90%";F.style.visibility="hidden";G.appendChild(F);mxUtils.br(G);I=function(){D.freehand.setPerfectFreehandMode(H.checked);
+F.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",I);I();mxEvent.addListener(F,"change",function(){D.freehand.setBrushSize(parseInt(this.value))})}var O=mxUtils.button(mxResources.get("startDrawing"),function(){D.freehand.isDrawing()?D.freehand.stopDrawing():D.freehand.startDrawing()});O.setAttribute("title",mxResources.get("startDrawing"));O.style.marginTop=x?"5px":"10px";O.style.width="90%";O.style.boxSizing="border-box";O.style.overflow="hidden";O.style.textOverflow=
+"ellipsis";O.style.textAlign="center";O.className="geBtn gePrimaryBtn";G.appendChild(O);this.window=new mxWindow(mxResources.get("freehand"),G,f,k,d,v,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);D.addListener("freehandStateChanged",mxUtils.bind(this,function(){O.innerText="";mxUtils.write(O,mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));var c=document.createElement("span");c.style.opacity="0.7";
+c.style["float"]="right";mxUtils.write(c,"X");O.appendChild(c);O.setAttribute("title",mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));O.className="geBtn"+(D.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){D.freehand.isDrawing()&&D.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,v){var x=b.editor.graph,
+D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,I){if(x.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(O){b.hideDialog();if(null!=O&&0<O.length){O=O.split(" ");for(var c=[],e=0;e<O.length;e++){var g=mxUtils.trim(O[e]);""!=g&&0>mxUtils.indexOf(H,g)&&c.push(g)}0<c.length&&(x.isSelectionEmpty()?I(H.concat(c)):x.addTagsForCells(x.getSelectionCells(),c))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
+")");b.showDialog(F.container,300,80,!0,!0);F.init()}}),G=D.div;this.window=new mxWindow(mxResources.get("tags"),G,f,k,d,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,d){var v=document.createElement("div");v.style.textAlign=
+"center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var D="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(D=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
+f==b.oneDrive?(D=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(D=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg",G.style.width="32px"):f==b.trello&&(D=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[D]));var H=document.createElement("input");H.setAttribute("type",
+"checkbox");D=mxUtils.button(mxResources.get("authorize"),function(){d(H.checked)});D.insertBefore(G,D.firstChild);D.style.marginTop="6px";D.className="geBigButton";D.style.fontSize="18px";D.style.padding="14px";v.appendChild(x);v.appendChild(b);v.appendChild(D);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(H),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),k.appendChild(x),v.appendChild(k),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(x,
+"click",function(I){H.checked=!H.checked;mxEvent.consume(I)}));this.container=v},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),v=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var D=b.sidebar.customEntries[x],G={title:b.getResource(D.title),entries:[]},H=0;H<D.entries.length;H++){var I=D.entries[H];G.entries.push({id:I.id,title:b.getResource(I.title),desc:b.getResource(I.desc),image:I.preview})}v.push(G)}for(x=
+0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)v.push(k[x]);else{G={title:k[x].title,entries:[]};for(H=0;H<k[x].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[H].id)&&G.entries.push(k[x].entries[H]);0<G.entries.length&&v.push(G)}k=v;if(f){x=mxUtils.bind(this,function(R){for(var l=0;l<R.length;l++)(function(q){var B=g.cloneNode(!1);B.style.fontWeight="bold";B.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";B.style.padding="6px 0px 6px 20px";mxUtils.write(B,
+q.title);F.appendChild(B);for(var J=0;J<q.entries.length;J++)(function(M){var E=g.cloneNode(!1);E.style.cursor="pointer";E.style.padding="4px 0px 4px 20px";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.setAttribute("title",M.title+" ("+M.id+")");var L=document.createElement("input");L.setAttribute("type","checkbox");L.checked=b.sidebar.isEntryVisible(M.id);L.defaultChecked=L.checked;E.appendChild(L);mxUtils.write(E," "+M.title);F.appendChild(E);var P=function(S){if(null==
+S||"INPUT"!=mxEvent.getSource(S).nodeName){O.style.textAlign="center";O.style.padding="0px";O.style.color="";O.innerText="";if(null!=M.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,M.desc);O.appendChild(V)}null!=M.imageCallback?M.imageCallback(O):null!=M.image?O.innerHTML+='<img border="0" src="'+M.image+'"/>':null==M.desc&&(O.style.padding="20px",O.style.color=
+"rgb(179, 179, 179)",mxUtils.write(O,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor="");c=E;c.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=S&&mxEvent.consume(S)}};mxEvent.addListener(E,"click",P);mxEvent.addListener(E,"dblclick",function(S){L.checked=!L.checked;mxEvent.consume(S)});e.push(function(){return L.checked?M.id:null});0==l&&0==J&&P()})(q.entries[J])})(R[l])});H=document.createElement("div");H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));
+H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height="40px";H.style.right="0px";var F=document.createElement("div"),O=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";O.style.position="absolute";O.style.left="202px";O.style.right="0px";O.style.top="40px";O.style.bottom="60px";O.style.overflow="auto";O.style.borderLeft="1px solid rgb(211, 211, 211)";
+O.style.textAlign="center";var c=null,e=[],g=document.createElement("div");g.style.position="relative";g.style.left="0px";g.style.right="0px";x(k);d.style.padding="30px";d.appendChild(H);d.appendChild(F);d.appendChild(O);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var p=document.createElement("input");
+p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;p.defaultChecked=p.checked;k.appendChild(p);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),
+x.style.paddingRight="20px",x.appendChild(n),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(x,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],l=0;l<e.length;l++){var q=
+e[l].apply(this,arguments);null!=q&&R.push(q)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(l=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=l&&0<R.splice(l,1).length)&&b.toggleScratchpad(),l=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=l&&0<R.splice(l,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});H.className="geBtn gePrimaryBtn"}else{var t=
+document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";H=document.createElement("tr");t.style.width="100%";f=document.createElement("td");v=document.createElement("td");D=document.createElement("td");var y=mxUtils.bind(this,function(R,l,q){var B=document.createElement("input");B.type="checkbox";t.appendChild(B);B.checked=b.sidebar.isEntryVisible(q);var J=document.createElement("span");mxUtils.write(J,l);l=document.createElement("div");l.style.display=
+"block";l.appendChild(B);l.appendChild(J);mxEvent.addListener(J,"click",function(M){B.checked=!B.checked;mxEvent.consume(M)});R.appendChild(l);return function(){return B.checked?q:null}});H.appendChild(f);H.appendChild(v);H.appendChild(D);x.appendChild(H);t.appendChild(x);e=[];var A=0;for(x=0;x<k.length;x++)for(H=0;H<k[x].entries.length;H++)A++;var C=[f,v,D],u=0;for(x=0;x<k.length;x++)(function(R){for(var l=0;l<R.entries.length;l++){var q=R.entries[l];e.push(y(C[Math.floor(u/(A/3))],q.title,q.id));
+u++}})(k[x]);d.appendChild(t);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,k.appendChild(n),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(R){n.checked=!n.checked;mxEvent.consume(R)}));d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],l=0;l<e.length;l++){var q=e[l].apply(this,arguments);null!=q&&R.push(q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});H.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(H)):(k.appendChild(H),k.appendChild(x));d.appendChild(k);this.container=
+d},PluginsDialog=function(b,f,k,d){function v(){H=!0;if(0==G.length)D.innerText=mxResources.get("noPlugins");else{D.innerText="";for(var g=0;g<G.length;g++){var p=document.createElement("span");p.style.whiteSpace="nowrap";var n=document.createElement("span");n.className="geSprite geSprite-delete";n.style.position="relative";n.style.cursor="pointer";n.style.top="5px";n.style.marginRight="4px";n.style.display="inline-block";p.appendChild(n);mxUtils.write(p,G[g]);D.appendChild(p);mxUtils.br(D);mxEvent.addListener(n,
+"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+G[t]+'"?',function(){null!=k&&k(G[t]);G.splice(t,1);v()})}}(g))}}}var x=document.createElement("div"),D=document.createElement("div");D.style.height="180px";D.style.overflow="auto";var G=mxSettings.getPlugins().slice(),H=!1;x.appendChild(D);v();H=!1;var I=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(g){g&&0>mxUtils.indexOf(G,g)&&G.push(g);v()})}:function(){var g=document.createElement("div"),p=document.createElement("span");
+p.style.marginTop="6px";mxUtils.write(p,mxResources.get("builtinPlugins")+": ");g.appendChild(p);var n=document.createElement("select");n.style.width="150px";for(p=0;p<App.publicPlugin.length;p++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[p]);t.value=App.publicPlugin[p];n.appendChild(t)}g.appendChild(n);mxUtils.br(g);mxUtils.br(g);p=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();
+if(null!=A&&0<A.length){A=A.split(";");for(var C=0;C<A.length;C++){var u=A[C],R=App.pluginRegistry[u];null!=R&&(u=R);0<u.length&&0>mxUtils.indexOf(G,u)&&G.push(u)}v()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});p.className="geBtn";g=new CustomDialog(b,g,mxUtils.bind(this,function(){var y=App.pluginRegistry[n.value];0>mxUtils.indexOf(G,y)&&(G.push(y),v())}),null,null,null,p);b.showDialog(g.container,360,100,!0,!0)});I.className=
+"geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var O=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(G),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});O.className="geBtn gePrimaryBtn";var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";var e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
+e.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(e.style.display="none");c.appendChild(e);b.editor.cancelFirst?(d||c.appendChild(F),c.appendChild(I),c.appendChild(O)):(c.appendChild(I),c.appendChild(O),d||c.appendChild(F));x.appendChild(c);this.container=x},CropImageDialog=function(b,f,k,d){function v(){var R=n.checked,l=t.checked,q=e.geometry,B=H.width,J=H.height,M=(300-B)/2,E=(300-J)/2;q.x<M?(q.width-=M-q.x,q.x=M):q.x+q.width>M+B&&(q.width=M+B-q.x,q.x=Math.min(q.x,M+B));q.y<E?(q.height-=
+E-q.y,q.y=E):q.y+q.height>E+J&&(q.height=E+J-q.y,q.y=Math.min(q.y,E+J));var L=(q.x-M)/B*100;B=100-(q.x+q.width-M)/B*100;M=(q.y-E)/J*100;q=100-(q.y+q.height-E)/J*100;return"inset("+mxUtils.format(M)+"% "+mxUtils.format(B)+"% "+mxUtils.format(q)+"% "+mxUtils.format(L)+"%"+(R?" round "+c+"%":l?" round 50%":"")+")"}function x(R){null!=F&&(!0!==R&&(F.model.setGeometry(e,O.clone()),c=5,A.value=c),F.model.setStyle(e,g+v()),F.selectAll(),y.style.visibility=n.checked?"visible":"hidden")}var D=document.createElement("div"),
+G=document.createElement("div");G.style.height="300px";G.style.width="300px";G.style.display="inline-flex";G.style.justifyContent="center";G.style.alignItems="center";G.style.position="absolute";var H=document.createElement("img");H.onload=function(){function R(){F.model.setStyle(e,g+v())}F=new Graph(I);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);F.graphHandler.allowLivePreview=!1;var l=F.createVertexHandler;
+F.createVertexHandler=function(){var Q=l.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var q=e.geometry,B=H.width,J=H.height,M=(300-B)/2,E=(300-J)/2,L=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),P=parseFloat(L[0]),S=parseFloat(L[1]),V=parseFloat(L[2]),X=parseFloat(L[3]);isFinite(P)&&isFinite(S)&&isFinite(V)&&isFinite(X)?(q.x=X/100*B+M,q.y=P/100*J+E,q.width=(100-S)/100*B+M-q.x,q.height=(100-V)/100*J+E-q.y,"round"==L[4]?"50%"==L[5]?t.setAttribute("checked",
+"checked"):(c=parseInt(L[5]),A.value=c,n.setAttribute("checked","checked"),y.style.visibility="visible"):p.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}e.style=g+(k?k:v());e.vertex=!0;F.addCell(e,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,R);F.addListener(mxEvent.CELLS_RESIZED,R);var m=F.graphHandler.mouseUp,z=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){m.apply(this,arguments);I.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){z.apply(this,
+arguments);I.style.backgroundColor=""};F.dblClick=function(){};var K=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){K.call(this,[e],[e])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";G.appendChild(H);D.appendChild(G);var I=document.createElement("div");I.style.width="300px";I.style.height="300px";I.style.overflow="hidden";I.style.backgroundColor="#fff9";D.appendChild(I);
+var F=null,O=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",O.clone(),""),g="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";D.appendChild(p);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
+D.appendChild(f);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";D.appendChild(n);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));D.appendChild(f);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";
+D.appendChild(t);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));D.appendChild(f);mxEvent.addListener(p,"change",x);mxEvent.addListener(n,"change",x);mxEvent.addListener(t,"change",x);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var A=document.createElement("input");A.setAttribute("type","range");A.setAttribute("min","1");A.setAttribute("max","49");A.setAttribute("value",c);A.setAttribute("title",
+mxResources.get("arcSize"));y.appendChild(A);D.appendChild(y);mxEvent.addListener(A,"change",function(){c=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){d(v(),e.geometry.width,e.geometry.height);b.hideDialog()});G.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,H.width,H.height);b.hideDialog()});C.className="geBtn";var u=document.createElement("div");
+u.style.marginTop="10px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(f),u.appendChild(C),u.appendChild(G)):(u.appendChild(C),u.appendChild(G),u.appendChild(f));D.appendChild(u);this.container=D},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,v=document.createElement("div"),x=document.createElement("table"),D=document.createElement("tbody"),G=document.createElement("tr"),H=document.createElement("td"),I=document.createElement("td");
+x.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=d&&d.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};I.appendChild(F);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("left")+":");var O=document.createElement("input");
+O.setAttribute("type","text");O.style.width="100px";O.value=null!=d?d.x:"";I.appendChild(O);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";I.appendChild(c);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");
+I=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";I.appendChild(e);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";
+g.value=null!=d&&null!=d.offset?d.offset.y:"";I.appendChild(g);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";I.appendChild(p);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=
+document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.height:"";I.appendChild(n);G.appendChild(H);G.appendChild(I);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=
+1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";I.appendChild(t);G.appendChild(H);G.appendChild(I);D.appendChild(G);x.appendChild(D);v.appendChild(x);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var A=0;A<f.length;A++){var C=k.getCellGeometry(f[A]);null!=C&&(C=C.clone(),k.isCellMovable(f[A])&&(C.relative=F.checked,
+0<mxUtils.trim(O.value).length&&(C.x=Number(O.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(g.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(g.value))),k.isCellResizable(f[A])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),k.getModel().setGeometry(f[A],C));0<mxUtils.trim(t.value).length&&
+k.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[f[A]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keypress",function(A){13==A.keyCode&&y.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(y)):(x.appendChild(y),x.appendChild(d));v.appendChild(x);this.container=v},LibraryDialog=function(b,f,k,d,v,x){function D(l){for(l=document.elementFromPoint(l.clientX,
+l.clientY);null!=l&&l.parentNode!=e;)l=l.parentNode;var q=null;if(null!=l){var B=e.firstChild;for(q=0;null!=B&&B!=l;)B=B.nextSibling,q++}return q}function G(l,q,B,J,M,E,L,P,S){try{if(b.spinner.stop(),null==q||"image/"==q.substring(0,6))if(null==l&&null!=L||null==p[l]){var V=function(){T.innerText="";T.style.cursor="pointer";T.style.whiteSpace="nowrap";T.style.textOverflow="ellipsis";mxUtils.write(T,null!=W.title&&0<W.title.length?W.title:mxResources.get("untitled"));T.style.color=null==W.title||0==
+W.title.length?"#d0d0d0":""};e.style.backgroundImage="";g.style.display="none";var X=M,m=E;if(M>b.maxImageSize||E>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,M)),b.maxImageSize/Math.max(1,E));M*=z;E*=z}X>m?(m=Math.round(100*m/X),X=100):(X=Math.round(100*X/m),m=100);var K=document.createElement("div");K.setAttribute("draggable","true");K.style.display="inline-block";K.style.position="relative";K.style.padding="0 12px";K.style.cursor="move";mxUtils.setPrefixedStyle(K.style,"transition",
+"transform .1s ease-in-out");if(null!=l){var Q=document.createElement("img");Q.setAttribute("src",A.convert(l));Q.style.width=X+"px";Q.style.height=m+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-m)/2)+"px";Q.style.paddingLeft=Math.floor((100-X)/2)+"px";K.appendChild(Q)}else if(null!=L){var N=b.stringToCells(Graph.decompress(L.xml));0<N.length&&(b.sidebar.createThumb(N,100,100,K,null,!0,!1),K.firstChild.style.display="inline-block",K.firstChild.style.cursor="")}var U=document.createElement("img");
+U.setAttribute("src",Editor.closeBlackImage);U.setAttribute("border","0");U.setAttribute("title",mxResources.get("delete"));U.setAttribute("align","top");U.style.paddingTop="4px";U.style.position="absolute";U.style.marginLeft="-12px";U.style.zIndex="1";U.style.cursor="pointer";mxEvent.addListener(U,"dragstart",function(fa){mxEvent.consume(fa)});(function(fa,Y,ha){mxEvent.addListener(U,"click",function(da){p[Y]=null;for(var wa=0;wa<F.length;wa++)if(null!=F[wa].data&&F[wa].data==Y||null!=F[wa].xml&&
+null!=ha&&F[wa].xml==ha.xml){F.splice(wa,1);break}K.parentNode.removeChild(fa);0==F.length&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.display="");mxEvent.consume(da)});mxEvent.addListener(U,"dblclick",function(da){mxEvent.consume(da)})})(K,l,L);K.appendChild(U);K.style.marginBottom="30px";var T=document.createElement("div");T.style.position="absolute";T.style.boxSizing="border-box";T.style.bottom="-18px";T.style.left="10px";T.style.right="10px";T.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";T.style.overflow="hidden";T.style.textAlign="center";var W=null;null!=l?(W={data:l,w:M,h:E,title:S},null!=P&&(W.aspect=P),p[l]=Q,F.push(W)):null!=L&&(L.aspect="fixed",F.push(L),W=L);mxEvent.addListener(T,"keydown",function(fa){13==fa.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(fa))});V();K.appendChild(T);mxEvent.addListener(T,"mousedown",function(fa){"true"!=T.getAttribute("contentEditable")&&mxEvent.consume(fa)});N=function(fa){if(mxClient.IS_IOS||
+mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Y=new FilenameDialog(b,W.title||"",mxResources.get("ok"),function(ha){null!=ha&&(W.title=ha,V())},mxResources.get("enterValue"));b.showDialog(Y.container,300,80,!0,!0);Y.init();mxEvent.consume(fa)}else if("true"!=T.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==W.title||0==W.title.length)T.innerText="";T.style.textOverflow="";T.style.whiteSpace="";T.style.cursor="text";T.style.color="";T.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(T.style,"user-select","text");T.focus();document.execCommand("selectAll",!1,null);y=function(){T.removeAttribute("contentEditable");T.style.cursor="pointer";W.title=T.innerHTML;V()};mxEvent.consume(fa)}};mxEvent.addListener(T,"click",N);mxEvent.addListener(K,"dblclick",N);e.appendChild(K);mxEvent.addListener(K,"dragstart",function(fa){null==l&&null!=L&&(U.style.visibility="hidden",T.style.visibility="hidden");mxClient.IS_FF&&null!=L.xml&&fa.dataTransfer.setData("Text",
+L.xml);n=D(fa);mxClient.IS_GC&&(K.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(K.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(K,30);U.style.visibility="";T.style.visibility=""},0)});mxEvent.addListener(K,"dragend",function(fa){"hidden"==U.style.visibility&&(U.style.visibility="",T.style.visibility="");n=null;mxUtils.setOpacity(K,100);mxUtils.setPrefixedStyle(K.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{M=
+!1;try{if(X=mxUtils.parseXml(l),"mxlibrary"==X.documentElement.nodeName){m=JSON.parse(mxUtils.getTextContent(X.documentElement));if(null!=m&&0<m.length)for(var Z=0;Z<m.length;Z++)null!=m[Z].xml?G(null,null,0,0,0,0,m[Z]):G(m[Z].data,null,0,0,m[Z].w,m[Z].h,null,"fixed",m[Z].title);M=!0}else if("mxfile"==X.documentElement.nodeName){var ca=X.documentElement.getElementsByTagName("diagram");for(Z=0;Z<ca.length;Z++){m=mxUtils.getTextContent(ca[Z]);N=b.stringToCells(Graph.decompress(m));var ba=b.editor.graph.getBoundingBoxFromGeometry(N);
+G(null,null,0,0,0,0,{xml:m,w:ba.width,h:ba.height})}M=!0}}catch(fa){}M||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function H(l){l.dataTransfer.dropEffect=null!=n?"move":"copy";l.stopPropagation();l.preventDefault()}function I(l){l.stopPropagation();l.preventDefault();C=!1;t=D(l);if(null!=n)null!=t&&t<e.children.length?(F.splice(t>n?t-1:t,0,F.splice(n,1)[0]),e.insertBefore(e.children[n],e.children[t])):(F.push(F.splice(n,1)[0]),e.appendChild(e.children[n]));
+else if(0<l.dataTransfer.files.length)b.importFiles(l.dataTransfer.files,0,0,b.maxImageSize,u(l));else if(0<=mxUtils.indexOf(l.dataTransfer.types,"text/uri-list")){var q=decodeURIComponent(l.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(q)||/(\.png)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.svg)($|\?)/i.test(q))&&b.loadImage(q,function(B){G(q,null,0,0,B.width,B.height);e.scrollTop=e.scrollHeight})}l.stopPropagation();l.preventDefault()}var F=[];k=document.createElement("div");
+k.style.height="100%";var O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.height="40px";k.appendChild(O);mxUtils.write(O,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var c=document.createElement("input");c.setAttribute("value",f);c.style.marginRight="20px";c.style.marginLeft="10px";c.style.width="500px";null==v||v.isRenamable()||c.setAttribute("disabled","true");this.init=function(){if(null==v||v.isRenamable())c.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};O.appendChild(c);var e=document.createElement("div");e.style.borderWidth="1px 0px 1px 0px";e.style.borderColor="#d3d3d3";e.style.borderStyle="solid";e.style.marginTop="6px";e.style.overflow="auto";e.style.height="340px";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";0==F.length&&Graph.fileSupport&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var g=document.createElement("div");
+g.style.position="absolute";g.style.width="640px";g.style.top="260px";g.style.textAlign="center";g.style.fontSize="22px";g.style.color="#a0c3ff";mxUtils.write(g,mxResources.get("dragImagesHere"));k.appendChild(g);var p={},n=null,t=null,y=null;f=function(l){"true"!=mxEvent.getSource(l).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(l))};mxEvent.addListener(e,"mousedown",f);mxEvent.addListener(e,"pointerdown",f);mxEvent.addListener(e,"touchstart",f);var A=new mxUrlConverter,C=
+!1;if(null!=d)for(f=0;f<d.length;f++)O=d[f],G(O.data,null,0,0,O.w,O.h,O,O.aspect,O.title);mxEvent.addListener(e,"dragleave",function(l){g.style.cursor="";for(var q=mxEvent.getSource(l);null!=q;){if(q==e||q==g){l.stopPropagation();l.preventDefault();break}q=q.parentNode}});var u=function(l){return function(q,B,J,M,E,L,P,S,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(X){G(X,B,J,M,E,L,P,"fixed",mxEvent.isAltDown(l)?
+null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(q,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(X){4==X.readyState&&(b.spinner.stop(),200<=X.status&&299>=X.status&&(G(X.responseText,B,J,M,E,L,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(G(q,B,J,M,E,L,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight)}};mxEvent.addListener(e,"dragover",H);mxEvent.addListener(e,"drop",I);mxEvent.addListener(g,"dragover",H);mxEvent.addListener(g,"drop",I);k.appendChild(e);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
+d.appendChild(f);"draw.io"!=b.getServiceName()||null==v||v.constructor!=DriveLibrary&&v.constructor!=GitHubLibrary||(O=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&v.getPublicUrl(function(l){b.spinner.stop();if(null!=l){var q=b.getSearch("create title mode url drive splash state clibs ui".split(" "));q+=(0==q.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(l);l=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
+"/"+q,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(l.container,450,240,!0);l.init()}else v.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(v.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),O.className="geBtn",d.appendChild(O));O=mxUtils.button(mxResources.get("export"),
+function(){var l=b.createLibraryDataFromImages(F),q=c.value;/(\.xml)$/i.test(q)||(q+=".xml");b.isLocalFileSave()?b.saveLocalFile(l,q,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(q)+"&format=xml&xml="+encodeURIComponent(l))).simulate(document,"_blank")});O.setAttribute("id","btnDownload");O.className="geBtn";d.appendChild(O);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var R=document.createElement("input");R.setAttribute("multiple","multiple");
+R.setAttribute("type","file");mxEvent.addListener(R,"change",function(l){C=!1;b.importFiles(R.files,0,0,b.maxImageSize,function(q,B,J,M,E,L,P,S,V){null!=R.files&&(u(l)(q,B,J,M,E,L,P,S,V),R.type="",R.type="file",R.value="")});e.scrollTop=e.scrollHeight});R.style.display="none";document.body.appendChild(R);b.libDlgFileInputElt=R}O=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});O.setAttribute("id","btnAddImage");O.className="geBtn";d.appendChild(O)}O=
+mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(l,q,B){C=!1;if(null!=l){if("data:image/"==l.substring(0,11)){var J=l.indexOf(",");0<J&&(l=l.substring(0,J)+";base64,"+l.substring(J+1))}G(l,null,0,0,q,B);e.scrollTop=e.scrollHeight}})});O.setAttribute("id","btnAddImageUrl");O.className="geBtn";d.appendChild(O);this.saveBtnClickHandler=function(l,q,B,J){b.saveLibrary(l,q,B,J)};O=mxUtils.button(mxResources.get("save"),
+mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(c.value,F,v,x)}));O.setAttribute("id","btnSave");O.className="geBtn gePrimaryBtn";d.appendChild(O);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,v){d=null!=d?d:300;v=null!=v?v:120;var x=document.createElement("table"),D=document.createElement("tbody");x.style.cellPadding="4px";var G=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan",
+"2");H.style.fontSize="10pt";mxUtils.write(H,k);G.appendChild(H);D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");var I=document.createElement("textarea");I.style.outline="none";I.style.resize="none";I.style.width=d-200+"px";I.style.height=v+"px";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};H.appendChild(I);G.appendChild(H);H=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top=
+"6px";k.style.width="200px";k.style.height=v+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);H.appendChild(k);var F=new Graph(k);F.setEnabled(!1);var O=b.editor.graph.cloneCell(f);F.addCells([O]);k=F.view.getState(O);var c="";null!=k.shape&&null!=k.shape.stencil&&(c=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(I,c||"");k=F.getGraphBounds();v=Math.min(160/k.width,(v-40)/k.height);F.view.scaleAndTranslate(v,20/v-k.x,20/v-k.y);G.appendChild(H);
+D.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),v.className="geBtn",H.appendChild(v));v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&H.appendChild(v);
+var e=function(g,p,n){var t=I.value,y=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),y=!g.model.contains(p),!n||y||t!=c){t=Graph.compress(t);g.getModel().beginUpdate();try{if(y){var A=b.editor.graph.getFreeInsertPoint();p.geometry.x=A.x;p.geometry.y=A.y;g.addCell(p)}g.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+t+")",[p])}catch(C){throw C;}finally{g.getModel().endUpdate()}y&&(g.setSelectionCell(p),g.scrollCellToVisible(p))}};k=mxUtils.button(mxResources.get("preview"),function(){e(F,O,!1)});k.className="geBtn";H.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";H.appendChild(k);b.editor.cancelFirst||H.appendChild(v);G.appendChild(H);D.appendChild(G);x.appendChild(D);this.container=x},CustomDialog=function(b,f,k,d,v,x,
+D,G,H,I,F){var O=document.createElement("div");O.appendChild(f);var c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="center";null!=D&&c.appendChild(D);b.isOffline()||null==x||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(x)}),f.className="geBtn",c.appendChild(f));H=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});H.className="geBtn";G&&(H.style.display="none");b.editor.cancelFirst&&c.appendChild(H);v=mxUtils.button(v||
+mxResources.get("ok"),mxUtils.bind(this,function(){I||b.hideDialog(null,null,this.container);if(null!=k){var e=k();if("string"===typeof e){b.showError(mxResources.get("error"),e);return}}I&&b.hideDialog(null,null,this.container)}));c.appendChild(v);v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(H);if(null!=F)for(G=0;G<F.length;G++)(function(e,g,p){e=mxUtils.button(e,function(n){g(n)});null!=p&&e.setAttribute("title",p);e.className="geBtn";c.appendChild(e)})(F[G][0],F[G][1],F[G][2]);
+O.appendChild(c);this.cancelBtn=H;this.okButton=v;this.container=O},TemplatesDialog=function(b,f,k,d,v,x,D,G,H,I,F,O,c,e,g){function p(ia){ra.innerText=ia;ra.style.display="block";setTimeout(function(){ra.style.display="none"},4E3)}function n(){null!=m&&(m.style.fontWeight="normal",m.style.textDecoration="none",z=m,m=null)}function t(ia,ja,oa,ya,Aa,Fa,Da){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";S.querySelector(".geTempDlgRadioBtn[data-id="+
+ya+"]").className="geTempDlgRadioBtn "+(Da?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");S.querySelector("."+ja).src="/images/"+oa+"-sel.svg";S.querySelector("."+Aa).src="/images/"+Fa+".svg";return!0}function y(ia,ja,oa,ya){function Aa(sa,Ma){null==Da?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Da=Qa.getText());Ma(Da)}))):Ma(Da)}
+function Fa(sa,Ma,Qa){if(null!=sa&&mxUtils.isAncestorNode(document.body,ja)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Va=new mxCodec(sa.ownerDocument),Ga=new mxGraphModel;Va.decode(sa,Ga);sa=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(ja,sa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ma,Qa),!0,null,!0);var Ia=document.createElement("div");Ia.className="geTempDlgDialogMask";S.appendChild(Ia);var Ja=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ia&&(S.removeChild(Ia),Ia=null,Ja.apply(this,arguments),b.sidebar.hideTooltip=Ja)};mxEvent.addListener(Ia,"click",function(){b.sidebar.hideTooltip()})}}var Da=null;if(Oa||b.sidebar.currentElt==
+ja)b.sidebar.hideTooltip();else{var va=function(sa){Oa&&b.sidebar.currentElt==ja&&Fa(sa,mxEvent.getClientX(ya),mxEvent.getClientY(ya));Oa=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ja;Oa=!0;oa.src="/images/aui-wait.gif";ia.isExt?H(ia,va,function(){p(mxResources.get("cantLoadPrev"));Oa=!1;oa.src="/images/icon-search.svg"}):Aa(ia.url,va)}}function A(ia,ja,oa){if(null!=K){for(var ya=K.className.split(" "),Aa=0;Aa<ya.length;Aa++)if(-1<ya[Aa].indexOf("Active")){ya.splice(Aa,
+1);break}K.className=ya.join(" ")}null!=ia?(K=ia,K.className+=" "+ja,Q=oa,Na.className="geTempDlgCreateBtn"):(Q=K=null,Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(ia,ja){if(null!=Q){var oa=function(va){Da.isExternal?H(Da,function(sa){ya(sa,va)},Aa):Da.url?mxUtils.get(TEMPLATE_PATH+"/"+Da.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?ya(sa.getText(),va):Aa()})):ya(b.emptyDiagramXml,va)},ya=function(va,sa){g||b.hideDialog(!0);f(va,sa,Da,ja)},Aa=function(){p(mxResources.get("cannotLoad"));
+Fa()},Fa=function(){Q=Da;Na.className="geTempDlgCreateBtn";ja&&(Ka.className="geTempDlgOpenBtn")},Da=Q;Q=null;"boolean"!==typeof ja&&(ja=Da.isExternal&&O);1==ia?I(Da.url,Da):ja?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),oa,ia,function(va){var sa=null!=va&&0<va.length;return sa&&g?(oa(va),!1):sa},null,null,null,Fa,e?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function u(ia){Na.innerText=mxResources.get(fa||ia?"create":"copy");ia=ia?"none":"";O&&(Ka.style.display=ia);for(var ja=S.querySelectorAll(".geTempDlgLinkToDiagram"),oa=0;oa<ja.length;oa++)ja[oa].style.display=ia}function R(ia,ja,oa,ya,Aa){Aa||(ha.innerText="",A(),W=ia,Z=ya);var Fa=null;if(oa){Fa=document.createElement("table");
+Fa.className="geTempDlgDiagramsListGrid";var Da=document.createElement("tr"),va=document.createElement("th");va.style.width="50%";va.innerText=mxResources.get("diagram");Da.appendChild(va);va=document.createElement("th");va.style.width="25%";va.innerText=mxResources.get("changedBy");Da.appendChild(va);va=document.createElement("th");va.style.width="25%";va.innerText=mxResources.get("lastModifiedOn");Da.appendChild(va);Fa.appendChild(Da);ha.appendChild(Fa)}for(Da=0;Da<ia.length;Da++){ia[Da].isExternal=
+!ja;var sa=ia[Da].url,Ma=(va=mxUtils.htmlEntities(ja?mxResources.get(ia[Da].title,null,ia[Da].title):ia[Da].title))||ia[Da].url,Qa=ia[Da].imgUrl,Va=ia[Da].changedBy||"",Ga="";ia[Da].lastModifiedOn&&(Ga=b.timeSince(new Date(ia[Da].lastModifiedOn)),null==Ga&&(Ga=mxResources.get("lessThanAMinute")),Ga=mxResources.get("timeAgo",[Ga],"{1} ago"));Qa||(Qa=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=oa?50:15;null!=va&&va.length>sa&&(va=va.substring(0,sa)+"&hellip;");if(oa){var Ia=document.createElement("tr");
+Qa=document.createElement("td");var Ja=document.createElement("img");Ja.src="/images/icon-search.svg";Ja.className="geTempDlgDiagramListPreviewBtn";Ja.setAttribute("title",mxResources.get("preview"));Aa||Qa.appendChild(Ja);Ma=document.createElement("span");Ma.className="geTempDlgDiagramTitle";Ma.innerHTML=va;Qa.appendChild(Ma);Ia.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;Ia.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ga;Ia.appendChild(Qa);Fa.appendChild(Ia);
+null==K&&(u(ja),A(Ia,"geTempDlgDiagramsListGridActive",ia[Da]));(function(Ha,Ta,Sa){mxEvent.addListener(Ia,"click",function(){K!=Ta&&(u(ja),A(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(Ia,"dblclick",C);mxEvent.addListener(Ja,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ia[Da],Ia,Ja)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",Ma);null==K&&(u(ja),A(Pa,"geTempDlgDiagramTileActive",ia[Da]));Va=document.createElement("div");Va.className=
+"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Pa.appendChild(Va);Va=document.createElement("div");
+Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=va?va:"";Pa.appendChild(Va);Ja=document.createElement("img");Ja.src="/images/icon-search.svg";Ja.className="geTempDlgDiagramPreviewBtn";Ja.setAttribute("title",mxResources.get("preview"));Aa||Pa.appendChild(Ja);(function(Ha,Ta,Sa){mxEvent.addListener(Pa,"click",function(){K!=Ta&&(u(ja),A(Ta,"geTempDlgDiagramTileActive",Ha))});mxEvent.addListener(Pa,"dblclick",C);mxEvent.addListener(Ja,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ia[Da],Pa,Ja);ha.appendChild(Pa)}}for(var Ua in ya)ia=
+ya[Ua],0<ia.length&&(Aa=document.createElement("div"),Aa.className="geTempDlgImportCat",Aa.innerText=mxResources.get(Ua,null,Ua),ha.appendChild(Aa),R(ia,ja,oa,null,!0))}function l(ia,ja){ka.innerText="";A();var oa=Math.floor(ka.offsetWidth/150)-1;ja=!ja&&ia.length>oa?oa:ia.length;for(var ya=0;ya<ja;ya++){var Aa=ia[ya];Aa.isCategory=!0;var Fa=document.createElement("div"),Da=mxResources.get(Aa.title);null==Da&&(Da=Aa.title.substring(0,1).toUpperCase()+Aa.title.substring(1));Fa.className="geTempDlgNewDiagramCatItem";
+Fa.setAttribute("title",Da);Da=mxUtils.htmlEntities(Da);15<Da.length&&(Da=Da.substring(0,15)+"&hellip;");null==K&&(u(!0),A(Fa,"geTempDlgNewDiagramCatItemActive",Aa));var va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+"/"+Aa.img;va.appendChild(sa);Fa.appendChild(va);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemLbl";va.innerHTML=Da;Fa.appendChild(va);ka.appendChild(Fa);(function(Ma,
+Qa){mxEvent.addListener(Fa,"click",function(){K!=Qa&&(u(!0),A(Qa,"geTempDlgNewDiagramCatItemActive",Ma))});mxEvent.addListener(Fa,"dblclick",C)})(Aa,Fa)}Fa=document.createElement("div");Fa.className="geTempDlgNewDiagramCatItem";Da=mxResources.get("showAllTemps");Fa.setAttribute("title",Da);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemImg";va.innerText="...";va.style.fontSize="32px";Fa.appendChild(va);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemLbl";
+va.innerText=Da;Fa.appendChild(va);ka.appendChild(Fa);mxEvent.addListener(Fa,"click",function(){function Ma(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Ma,200)}fa=!0;var Qa=S.querySelector(".geTemplatesList");Qa.style.display="block";za.style.width="";Ea.style.display="";Ea.value="";ca=null;Ma()});Y.style.display=ia.length<=oa?"none":""}function q(ia,ja,oa){function ya(Ra,Ua){var Ha=mxResources.get(Ra);null==Ha&&(Ha=Ra.substring(0,1).toUpperCase()+Ra.substring(1));
+Ra=Ha+" ("+Ua.length+")";var Ta=Ha=mxUtils.htmlEntities(Ha);15<Ha.length&&(Ha=Ha.substring(0,15)+"&hellip;");return{lbl:Ha+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Aa(Ra,Ua,Ha,Ta,Sa){mxEvent.addListener(Ha,"click",function(){m!=Ha&&(null!=m?(m.style.fontWeight="normal",m.style.textDecoration="none"):(ta.style.display="none",xa.style.minHeight="100%"),m=Ha,m.style.fontWeight="bold",m.style.textDecoration="underline",za.scrollTop=0,V&&(X=!0),da.innerHTML=Ua,wa.style.display="none",R(Sa?ja[Ra]:
+Ta?La[Ra][Ta]:ia[Ra],Sa?!1:!0))})}var Fa=S.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Fa.appendChild(oa);for(var Da in ja){oa=document.createElement("div");var va=ja[Da];va=ya(Da,va);oa.className="geTemplateCatLink";oa.setAttribute("title",va.fullLbl);oa.innerHTML=va.lbl;Fa.appendChild(oa);Aa(Da,va.lblOnly,oa,
+null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Fa.appendChild(oa)}for(Da in ia){var sa=La[Da],Ma=oa=document.createElement(sa?"ul":"div");va=ia[Da];va=ya(Da,va);if(null!=sa){var Qa=document.createElement("li"),Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",va.fullLbl);
+Va.innerHTML=va.lbl;Ma=Va;Qa.appendChild(Va);var Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var Ia in sa){var Ja=document.createElement("li"),Pa=ya(Ia,sa[Ia]);Ja.setAttribute("title",Pa.fullLbl);Ja.innerHTML=Pa.lbl;Ja.className="geTemplateCatLink";Ja.style.padding="0";Ja.style.margin="0";Aa(Da,Pa.lblOnly,Ja,Ia);Ga.appendChild(Ja)}Qa.appendChild(Ga);oa.className="geTempTree";oa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ha=
+Ra.querySelectorAll("li"),Ta=0;Ta<Ha.length;Ta++)Ha[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ha.length;Sa++)Ha[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ga,Va)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",va.fullLbl),oa.innerHTML=va.lbl;Fa.appendChild(oa);Aa(Da,va.lblOnly,
+Ma)}}function B(){mxUtils.get(d,function(ia){if(!ua){ua=!0;ia=ia.getXml().documentElement.firstChild;for(var ja={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var oa=ia.getAttribute("name"),ya=ia.getElementsByTagName("add"),Aa=[],Fa=0;Fa<ya.length;Fa++)Aa.push(encodeURIComponent(mxUtils.getTextContent(ya[Fa])));null!=oa&&0<Aa.length&&(ja[oa]=Aa.join(";"))}else if(Aa=ia.getAttribute("url"),null!=Aa){ya=ia.getAttribute("section");oa=ia.getAttribute("subsection");
+if(null==ya&&(Fa=Aa.indexOf("/"),ya=Aa.substring(0,Fa),null==oa)){var Da=Aa.indexOf("/",Fa+1);-1<Da&&(oa=Aa.substring(Fa+1,Da))}Fa=Ba[ya];null==Fa&&(aa++,Fa=[],Ba[ya]=Fa);Aa=ia.getAttribute("clibs");null!=ja[Aa]&&(Aa=ja[Aa]);Aa={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:Aa,tags:ia.getAttribute("tags")};Fa.push(Aa);null!=oa&&(Fa=La[ya],null==Fa&&(Fa={},La[ya]=Fa),ya=Fa[oa],null==ya&&(ya=[],
+Fa[oa]=ya),ya.push(Aa))}ia=ia.nextSibling}q(Ba,ma,na)}})}function J(ia){D&&(za.scrollTop=0,ha.innerText="",qa.spin(ha),X=!1,V=!0,da.innerText=mxResources.get("recentDiag"),ca=null,D(la,function(){p(mxResources.get("cannotLoad"));la([])},ia?null:x))}function M(ia){if(""==ia)null!=z&&(z.click(),z=null);else{if(null==TemplatesDialog.tagsList[d]){var ja={};for(Ma in Ba)for(var oa=Ba[Ma],ya=0;ya<oa.length;ya++){var Aa=oa[ya];if(null!=Aa.tags)for(var Fa=Aa.tags.toLowerCase().split(";"),Da=0;Da<Fa.length;Da++)null==
+ja[Fa[Da]]&&(ja[Fa[Da]]=[]),ja[Fa[Da]].push(Aa)}TemplatesDialog.tagsList[d]=ja}var va=ia.toLowerCase().split(" ");ja=TemplatesDialog.tagsList[d];if(0<na&&null==ja.__tagsList__){for(Ma in ma)for(oa=ma[Ma],ya=0;ya<oa.length;ya++)for(Aa=oa[ya],Fa=Aa.title.split(" "),Fa.push(Ma),Da=0;Da<Fa.length;Da++){var sa=Fa[Da].toLowerCase();null==ja[sa]&&(ja[sa]=[]);ja[sa].push(Aa)}ja.__tagsList__=!0}var Ma=[];oa={};for(ya=Fa=0;ya<va.length;ya++)if(0<va[ya].length){sa=ja[va[ya]];var Qa={};Ma=[];if(null!=sa)for(Da=
+0;Da<sa.length;Da++)Aa=sa[Da],0==Fa==(null==oa[Aa.url])&&(Qa[Aa.url]=!0,Ma.push(Aa));oa=Qa;Fa++}0==Ma.length?da.innerText=mxResources.get("noResultsFor",[ia]):R(Ma,!0)}}function E(ia){if(ca!=ia||U!=ba)n(),za.scrollTop=0,ha.innerText="",da.innerText=mxResources.get("searchResults")+' "'+ia+'"',pa=null,fa?M(ia):G&&(ia?(qa.spin(ha),X=!1,V=!0,G(ia,la,function(){p(mxResources.get("searchFailed"));la([])},U?null:x)):J(U)),ca=ia,ba=U}function L(ia){null!=pa&&clearTimeout(pa);13==ia.keyCode?E(Ea.value):pa=
+setTimeout(function(){E(Ea.value)},1E3)}var P='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(G?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(m?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(g?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",V=document.createElement("div");V.innerHTML=T;V.className=
-"geTemplateDlg";this.container=V;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,X=!1,l=null,B=null,L=null,P=null,O=!1,R=!0,S=!1,W=[],aa=null,Y,Z,ba=!1,fa=V.querySelector(".geTempDlgShowAllBtn"),ja=V.querySelector(".geTempDlgDiagramsTiles"),ha=V.querySelector(".geTempDlgDiagramsListTitle"),ra=V.querySelector(".geTempDlgDiagramsListBtns"),ma=V.querySelector(".geTempDlgContent"),Ga=V.querySelector(".geTempDlgDiagramsList"),Ea=V.querySelector(".geTempDlgNewDiagramCat"),
-za=V.querySelector(".geTempDlgNewDiagramCatList"),Pa=V.querySelector(".geTempDlgCreateBtn"),Aa=V.querySelector(".geTempDlgOpenBtn"),Fa=V.querySelector(".geTempDlgSearchBox"),qa=V.querySelector(".geTempDlgErrMsg"),Ba=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(V.querySelector(".geTempDlgBack"),"click",function(){y();ba=!1;V.querySelector(".geTemplatesList").style.display="none";ma.style.width=
-"100%";Ea.style.display="";Ga.style.minHeight="calc(100% - 280px)";Fa.style.display=F?"":"none";Fa.value="";Y=null;H(R)});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){A(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):G(Y))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){A(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
-"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):G(Y))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){A(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,Q(W,!1,S,aa))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){A(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,Q(W,!1,S,aa))});var Ra=!1;
-mxEvent.addListener(fa,"click",function(){O?(Ea.style.height="280px",za.style.height="190px",fa.innerText=mxResources.get("showMore"),n(da)):(Ea.style.height="440px",za.style.height="355px",fa.innerText=mxResources.get("showLess"),n(da,!0));O=!O});var xa=!1,Da=!1,va={},Ka={},la={},da=[],ca=1,na=0;null!=e?e(function(ea,ia){la=ea;na=ia;D()},D):D();mxUtils.get(t,function(ea){if(!Da){Da=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&&
-da.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;n(da)}});var ka=function(ea,ia,oa){ra.style.display="";Ba.stop();U=!1;if(X)X=!1;else if(ia)ja.innerText=ia;else{oa=oa||{};ia=0;for(var ua in oa)ia+=oa[ua].length;0==ea.length&&0==ia?ja.innerText=mxResources.get("noDiagrams"):Q(ea,!1,S,0==ia?null:oa)}};H(R);var pa=null;mxEvent.addListener(Fa,"keyup",N);mxEvent.addListener(Fa,"search",N);mxEvent.addListener(Fa,
-"input",N);mxEvent.addListener(Pa,"click",function(ea){M(!1,!1)});g&&mxEvent.addListener(Aa,"click",function(ea){M(!1,!0)});m&&mxEvent.addListener(V.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){M(!0)});mxEvent.addListener(V.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();q||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("done"));var C="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
-(C=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(C=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"You are now authorized in {1}"));
-k=mxUtils.button(k,d);k.insertBefore(F,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(k);this.container=t},FontDialog=function(b,f,k,d,t){function u(I){this.style.border="";13==I.keyCode&&x.click()}var C=document.createElement("table"),F=document.createElement("tbody");C.style.marginTop="8px";var J=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace=
-"nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","sysfonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-sysfonts");c.appendChild(e);var g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));c.appendChild(g);J.appendChild(c);
-F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(c);var m=document.createElement("input");"s"==d&&m.setAttribute("value",f);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(m);J.appendChild(c);F.appendChild(J);J=document.createElement("tr");
-c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","googlefonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-googlefonts");c.appendChild(p);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
-null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));J.appendChild(c);F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");
-J.appendChild(c);var q=document.createElement("input");"g"==d&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(q);J.appendChild(c);F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
-"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft=
-"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(c);var y=document.createElement("input");"w"==d&&(Editor.enableWebFonts?y.setAttribute("value",f):m.setAttribute("value",f));y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(y);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
-c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");J.appendChild(c);var A=document.createElement("input");A.setAttribute("value",k||"");A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(A);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);this.init=function(){var I=m;"g"==d?I=q:"w"==d&&Editor.enableWebFonts&&(I=y);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-I.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f);
-var x=mxUtils.button(mxResources.get("apply"),function(){if(e.checked){var I=m.value;var M="s"}else if(p.checked){I=q.value;var E=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");M="g"}else z.checked&&(I=y.value,E=A.value,M="w");var Q=E;var n=M,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(C.querySelector(".dlg_fontName_"+n).style.border="1px solid red",Q=!1):"w"!=n||v.test(Q)?Q=!0:(C.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",Q=!1);Q&&(t(I,E,M),b.hideDialog())});x.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",u);mxEvent.addListener(q,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(A,"keypress",u);mxEvent.addListener(m,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(y,"focus",function(){z.setAttribute("checked","checked");z.checked=
-!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(x);b.editor.cancelFirst||c.appendChild(f);J.appendChild(c);F.appendChild(J);C.appendChild(F);this.container=C};
-function AspectDialog(b,f,k,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("pages"));f.appendChild(u);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("layers"));f.appendChild(u);u=document.createElement("div");u.className="geAspectDlgList";
-f.appendChild(u);this.pagesContainer=k;this.layersContainer=u;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});u.className="geBtn";b.editor.cancelFirst&&k.appendChild(u);var C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(C);C.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||k.appendChild(u);C.setAttribute("disabled","disabled");this.okBtn=C;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,f,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var t=new Graph(b);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!1);t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var u=f.getAttribute("background");if(null==u||""==u||u==mxConstants.NONE)u=null!=d?d:"#ffffff";b.style.backgroundColor=u;d=new mxCodec(f.ownerDocument);b=t.getModel();d.decode(f,b);f=b.getChildCount(b.root);
-d=null==k;for(u=0;u<f;u++){var C=b.getChildAt(b.root,u);b.setVisible(C,d||k==C.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};
-AspectDialog.prototype.createPageItem=function(b,f,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var C=0;C<u.length;C++)this.createLayerItem(u[C],b,t,k)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
-AspectDialog.prototype.createLayerItem=function(b,f,k,d){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var t=document.createElement("div");t.setAttribute("data-layer-id",b.id);t.className="geAspectDlgListItem";t.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(t);this.createViewer(t.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=t.className.indexOf("geAspectDlgListItemSelected")?
-(t.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(t.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(t,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var t=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var u=function(){};if(/(\.png)$/i.test(t)){u=1;var C=0;t=b.fileNode;null!=t&&(t.hasAttribute("scale")&&(u=parseFloat(t.getAttribute("scale"))),t.hasAttribute("border")&&(C=parseInt(t.getAttribute("border"))));t=document.createElement("tr");var F=document.createElement("td");
-F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";mxUtils.write(F,mxResources.get("zoom")+":");t.appendChild(F);var J=document.createElement("input");J.setAttribute("value",100*u+"%");J.style.marginLeft="4px";J.style.width="180px";F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(J);t.appendChild(F);k.appendChild(t);t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";
-mxUtils.write(F,mxResources.get("borderWidth")+":");t.appendChild(F);var c=document.createElement("input");c.setAttribute("value",C);c.style.marginLeft="4px";c.style.width="180px";F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(c);t.appendChild(F);k.appendChild(t);this.init=function(){J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};u=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(J.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t)){var e=null!=d?d.isCompressed():Editor.compressXml;t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";mxUtils.write(F,mxResources.get("compressed")+":");t.appendChild(F);var g=document.createElement("input");g.setAttribute("type","checkbox");
-e&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(g);t.appendChild(F);k.appendChild(t);this.init=function(){g.focus()};u=function(){null!=b.fileNode&&e!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";
-F.style.width="120px";mxUtils.write(F,mxResources.get("realtimeCollaboration")+":");t.appendChild(F);var m=document.createElement("input");m.setAttribute("type","checkbox");var p=d.isRealtimeEnabled();if(p="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))m.setAttribute("checked","checked"),m.defaultChecked=!0;prevApply=u;u=function(){prevApply();b.hideDialog();m.checked!=p&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(m.checked,mxUtils.bind(this,
-function(q){b.spinner.stop()}),mxUtils.bind(this,function(q){b.spinner.stop();b.showError(mxResources.get("error"),null!=q&&null!=q.error?q.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){m.focus()};F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(m);F.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));t.appendChild(F);k.appendChild(t)}this.init=null!=this.init?this.init:
-function(){};u=mxUtils.button(mxResources.get("apply"),u);u.className="geBtn gePrimaryBtn";t=document.createElement("tr");F=document.createElement("td");F.colSpan=2;F.style.paddingTop="20px";F.style.whiteSpace="nowrap";F.setAttribute("align","center");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&F.appendChild(C);F.appendChild(u);b.editor.cancelFirst||F.appendChild(C);t.appendChild(F);k.appendChild(t);f.appendChild(k);this.container=
-f},ConnectionPointsDialog=function(b,f){function k(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(K,G){K=new mxCell("",new mxGeometry(K,G,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return g.addCell(K)}function C(K){K=g.getSelectionCells();g.deleteCells(K)}function F(){var K=parseInt(n.value)||0;K=0>K?0:100<K?100:K;
-n.value=K;var G=parseInt(D.value)||0;G=0>G?0:100<G?100:G;D.value=G;var N=parseInt(v.value)||0,T=parseInt(H.value)||0;K=g.getConnectionPoint(q,new mxConnectionConstraint(new mxPoint(K/100,G/100),!1,null,N,T));G=g.getSelectionCell();if(null!=G){N=G.geometry.clone();T=g.view.scale;var V=g.view.translate;N.x=(K.x-3*T)/T-V.x;N.y=(K.y-3*T)/T-V.y;g.model.setGeometry(G,N)}}function J(K){var G=0,N=0,T=m.geometry,V=mxUtils.format((K.geometry.x+3-T.x)/T.width);K=mxUtils.format((K.geometry.y+3-T.y)/T.height);
-0>V?(G=V*T.width,V=0):1<V&&(G=(V-1)*T.width,V=1);0>K?(N=K*T.height,K=0):1<K&&(N=(K-1)*T.height,K=1);return{x:V,y:K,dx:parseInt(G),dy:parseInt(N)}}function c(){if(1==g.getSelectionCount()){var K=g.getSelectionCell();K=J(K);n.value=100*K.x;D.value=100*K.y;v.value=K.dx;H.value=K.dy;Q.style.visibility=""}else Q.style.visibility="hidden"}var e=document.createElement("div");e.style.width="350px";e.style.height="350px";e.style.overflow="hidden";e.style.border="1px solid lightGray";e.style.boxSizing="border-box";
-mxEvent.disableContextMenu(e);d.appendChild(e);var g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;e=f.geometry;var m=new mxCell(f.value,new mxGeometry(0,0,e.width,e.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");m.vertex=!0;g.addCell(m);g.dblClick=function(K,G){if(null!=G&&G!=m)g.setSelectionCell(G);else{G=
-mxUtils.convertPoint(g.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=g.view.scale;var N=g.view.translate;g.setSelectionCell(u((G.x-3*K)/K-N.x,(G.y-3*K)/K-N.y))}};t=new mxKeyHandler(g);t.bindKey(46,C);t.bindKey(8,C);g.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==m)};g.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var p=g.isCellSelectable;g.isCellSelectable=function(K){return K==m?!1:
-p.apply(this,arguments)};g.getLinkForCell=function(){return null};var q=g.view.getState(m);e=g.getAllConnectionConstraints(q);for(var z=0;null!=e&&z<e.length;z++){var y=g.getConnectionPoint(q,e[z]);u(y.x-3,y.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(z,60);y=mxUtils.button("",function(){g.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var A=mxUtils.button("",function(){g.fit(8);g.center()});A.className="geSprite geSprite-fit";A.setAttribute("title",mxResources.get("fit"));A.style.position=
-"relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var x=mxUtils.button("",function(){g.zoomActual();g.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.position="relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,
-60);var I=mxUtils.button("",C);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);e=document.createElement("div");e.appendChild(z);e.appendChild(y);e.appendChild(x);e.appendChild(A);e.appendChild(I);d.appendChild(e);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min",
-"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";e.appendChild(M);var E=document.createElement("select");E.style.position="relative";E.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(z=0;z<y.length;z++)A=y[z],x=document.createElement("option"),mxUtils.write(x,mxResources.get(A)),x.value=A,E.appendChild(x);e.appendChild(E);z=mxUtils.button(mxResources.get("add"),function(){var K=
-parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var G=E.value,N=m.geometry,T=[],V=0;V<K;V++){switch(G){case "left":var U=N.x;var X=N.y+(V+1)*N.height/(K+1);break;case "right":U=N.x+N.width;X=N.y+(V+1)*N.height/(K+1);break;case "top":U=N.x+(V+1)*N.width/(K+1);X=N.y;break;case "bottom":U=N.x+(V+1)*N.width/(K+1),X=N.y+N.height}T.push(u(U-3,X-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";e.appendChild(z);var Q=document.createElement("div");
-Q.style.margin="4px 0px 8px 0px";Q.style.whiteSpace="nowrap";Q.style.height="24px";e=document.createElement("span");mxUtils.write(e,mxResources.get("dx"));Q.appendChild(e);var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";Q.appendChild(n);mxUtils.write(Q,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";
-Q.appendChild(v);mxUtils.write(Q,"pt");e=document.createElement("span");mxUtils.write(e,mxResources.get("dy"));e.style.marginLeft="12px";Q.appendChild(e);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min","0");D.setAttribute("max","100");D.style.width="45px";D.style.margin="0 4px 0 4px";Q.appendChild(D);mxUtils.write(Q,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";Q.appendChild(H);
-mxUtils.write(Q,"pt");d.appendChild(Q);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(n,"change",F);mxEvent.addListener(D,"change",F);mxEvent.addListener(v,"change",F);mxEvent.addListener(H,"change",F);e=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var K=
-g.model.cells,G=[],N=[],T;for(T in K){var V=K[T];V.cp&&N.push(J(V))}N.sort(function(U,X){return U.x!=X.x?U.x-X.x:U.y!=X.y?U.y-X.y:U.dx!=X.dx?U.dx-X.dx:U.dy-X.dy});for(K=0;K<N.length;K++)0<K&&N[K].x==N[K-1].x&&N[K].y==N[K-1].y&&N[K].dx==N[K-1].dx&&N[K].dy==N[K-1].dy||G.push("["+N[K].x+","+N[K].y+",0,"+N[K].dx+","+N[K].dy+"]");b.editor.graph.setCellStyles("points","["+G.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);k();b.hideDialog()});y.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign="right";b.editor.cancelFirst?(A.appendChild(e),A.appendChild(y),A.appendChild(z)):(A.appendChild(y),A.appendChild(z),A.appendChild(e));d.appendChild(A)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
-{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
-graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
-edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
-fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
-edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+(c?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(O?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",S=document.createElement("div");S.innerHTML=P;S.className=
+"geTemplateDlg";this.container=S;d=null!=d?d:TEMPLATE_PATH+"/index.xml";v=null!=v?v:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,X=!1,m=null,z=null,K=null,Q=null,N=!1,U=!0,T=!1,W=[],Z=null,ca,ba,fa=!1,Y=S.querySelector(".geTempDlgShowAllBtn"),ha=S.querySelector(".geTempDlgDiagramsTiles"),da=S.querySelector(".geTempDlgDiagramsListTitle"),wa=S.querySelector(".geTempDlgDiagramsListBtns"),za=S.querySelector(".geTempDlgContent"),xa=S.querySelector(".geTempDlgDiagramsList"),ta=S.querySelector(".geTempDlgNewDiagramCat"),
+ka=S.querySelector(".geTempDlgNewDiagramCatList"),Na=S.querySelector(".geTempDlgCreateBtn"),Ka=S.querySelector(".geTempDlgOpenBtn"),Ea=S.querySelector(".geTempDlgSearchBox"),ra=S.querySelector(".geTempDlgErrMsg"),qa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(S.querySelector(".geTempDlgBack"),"click",function(){n();fa=!1;S.querySelector(".geTemplatesList").style.display="none";za.style.width=
+"100%";ta.style.display="";xa.style.minHeight="calc(100% - 280px)";Ea.style.display=G?"":"none";Ea.value="";ca=null;J(U)});mxEvent.addListener(S.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(U=!0,null==ca?J(U):E(ca))});mxEvent.addListener(S.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(U=!1,null==ca?J(U):E(ca))});mxEvent.addListener(S.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){t(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(T=!0,R(W,!1,T,Z))});mxEvent.addListener(S.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){t(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(T=!1,R(W,!1,T,Z))});
+var Oa=!1;mxEvent.addListener(Y,"click",function(){N?(ta.style.height="280px",ka.style.height="190px",Y.innerText=mxResources.get("showMore"),l(ea)):(ta.style.height="440px",ka.style.height="355px",Y.innerText=mxResources.get("showLess"),l(ea,!0));N=!N});var ua=!1,Ca=!1,Ba={},La={},ma={},ea=[],aa=1,na=0;null!=F?F(function(ia,ja){ma=ia;na=ja;B()},B):B();mxUtils.get(v,function(ia){if(!Ca){Ca=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==typeof ia.getAttribute&&null!=ia.getAttribute("title")&&
+ea.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;l(ea)}});var la=function(ia,ja,oa){wa.style.display="";qa.stop();V=!1;if(X)X=!1;else if(ja)ha.innerText=ja;else{oa=oa||{};ja=0;for(var ya in oa)ja+=oa[ya].length;0==ia.length&&0==ja?ha.innerText=mxResources.get("noDiagrams"):R(ia,!1,T,0==ja?null:oa)}};J(U);var pa=null;mxEvent.addListener(Ea,"keyup",L);mxEvent.addListener(Ea,"search",L);mxEvent.addListener(Ea,
+"input",L);mxEvent.addListener(Na,"click",function(ia){C(!1,!1)});O&&mxEvent.addListener(Ka,"click",function(ia){C(!1,!0)});c&&mxEvent.addListener(S.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){C(!0)});mxEvent.addListener(S.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();g||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,f,k,d){var v=document.createElement("div");v.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));var D="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
+(D=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(D=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(D=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(D=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[D],"You are now authorized in {1}"));
+k=mxUtils.button(k,d);k.insertBefore(G,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";v.appendChild(x);v.appendChild(b);v.appendChild(k);this.container=v},FontDialog=function(b,f,k,d,v){function x(A){this.style.border="";13==A.keyCode&&y.click()}var D=document.createElement("table"),G=document.createElement("tbody");D.style.marginTop="8px";var H=document.createElement("tr");var I=document.createElement("td");I.colSpan=2;I.style.whiteSpace=
+"nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");I.appendChild(F);var O=document.createElement("label");O.setAttribute("for","fontdialog-sysfonts");mxUtils.write(O,mxResources.get("sysFonts",null,"System Fonts"));I.appendChild(O);H.appendChild(I);
+G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var c=document.createElement("input");"s"==d&&c.setAttribute("value",f);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";I=document.createElement("td");I.appendChild(c);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");
+I=document.createElement("td");I.colSpan=2;I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");I.appendChild(e);O=document.createElement("label");O.setAttribute("for","fontdialog-googlefonts");mxUtils.write(O,mxResources.get("googleFonts",
+null,"Google Fonts"));I.appendChild(O);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(O=b.menus.createHelpLink("https://fonts.google.com/"),O.getElementsByTagName("img")[0].setAttribute("valign","middle"),I.appendChild(O));H.appendChild(I);G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");
+H.appendChild(I);var g=document.createElement("input");"g"==d&&g.setAttribute("value",f);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_g";I=document.createElement("td");I.appendChild(g);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value",
+"webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-webfonts");I.appendChild(p);O=document.createElement("label");O.setAttribute("for","fontdialog-webfonts");mxUtils.write(O,mxResources.get("webfonts",null,"Web Fonts"));I.appendChild(O);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft=
+"15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var n=document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",f):c.setAttribute("value",f));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";I=document.createElement("td");I.appendChild(n);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";
+I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontUrl",null,"Font URL")+":");H.appendChild(I);var t=document.createElement("input");t.setAttribute("value",k||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";I=document.createElement("td");I.appendChild(t);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);this.init=function(){var A=c;"g"==d?A=g:"w"==d&&Editor.enableWebFonts&&(A=n);A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+A.select():document.execCommand("selectAll",!1,null)};H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.paddingTop="20px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",I.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();v()});f.className="geBtn";b.editor.cancelFirst&&I.appendChild(f);
+var y=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var A=c.value;var C="s"}else if(e.checked){A=g.value;var u=Editor.GOOGLE_FONTS+encodeURIComponent(A).replace(/%20/g,"+");C="g"}else p.checked&&(A=n.value,u=t.value,C="w");var R=u;var l=C,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==A||0==A.length?(D.querySelector(".dlg_fontName_"+l).style.border="1px solid red",R=!1):"w"!=l||q.test(R)?R=!0:(D.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",R=!1);R&&(v(A,u,C),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",x);mxEvent.addListener(g,"keypress",x);mxEvent.addListener(n,"keypress",x);mxEvent.addListener(t,"keypress",x);mxEvent.addListener(c,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(g,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=
+!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});I.appendChild(y);b.editor.cancelFirst||I.appendChild(f);H.appendChild(I);G.appendChild(H);D.appendChild(G);this.container=D};
+function AspectDialog(b,f,k,d,v){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));f.appendChild(x);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));f.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList";
+f.appendChild(x);this.pagesContainer=k;this.layersContainer=x;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=v&&v()});x.className="geBtn";b.editor.cancelFirst&&k.appendChild(x);var D=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(D);D.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||k.appendChild(x);D.setAttribute("disabled","disabled");this.okBtn=D;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,f,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var v=new Graph(b);v.setTooltips(!1);v.setEnabled(!1);v.setPanning(!1);v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var x=f.getAttribute("background");if(null==x||""==x||x==mxConstants.NONE)x=null!=d?d:"#ffffff";b.style.backgroundColor=x;d=new mxCodec(f.ownerDocument);b=v.getModel();d.decode(f,b);f=b.getChildCount(b.root);
+d=null==k;for(x=0;x<f;x++){var D=b.getChildAt(b.root,x);b.setVisible(D,d||k==D.id)}v.maxFitScale=1;v.fit(0);v.center()}return v};
+AspectDialog.prototype.createPageItem=function(b,f,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var v=this.createViewer(d.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=v.model;x=x.getChildCells(x.getRoot());for(var D=0;D<x.length;D++)this.createLayerItem(x[D],b,v,k)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
+AspectDialog.prototype.createLayerItem=function(b,f,k,d){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var v=document.createElement("div");v.setAttribute("data-layer-id",b.id);v.className="geAspectDlgListItem";v.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(v);this.createViewer(v.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=v.className.indexOf("geAspectDlgListItemSelected")?
+(v.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(v.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(v,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
+var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var v=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var x=function(){};if(/(\.png)$/i.test(v)){x=1;var D=0;v=b.fileNode;null!=v&&(v.hasAttribute("scale")&&(x=parseFloat(v.getAttribute("scale"))),v.hasAttribute("border")&&(D=parseInt(v.getAttribute("border"))));v=document.createElement("tr");var G=document.createElement("td");
+G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("zoom")+":");v.appendChild(G);var H=document.createElement("input");H.setAttribute("value",100*x+"%");H.style.marginLeft="4px";H.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(H);v.appendChild(G);k.appendChild(v);v=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";
+mxUtils.write(G,mxResources.get("borderWidth")+":");v.appendChild(G);var I=document.createElement("input");I.setAttribute("value",D);I.style.marginLeft="4px";I.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(I);v.appendChild(G);k.appendChild(v);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};x=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(H.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(I.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(v)&&!/(\.svg)$/i.test(v)){var F=null!=d?d.isCompressed():Editor.compressXml;v=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("compressed")+":");v.appendChild(G);var O=document.createElement("input");O.setAttribute("type","checkbox");
+F&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(O);v.appendChild(G);k.appendChild(v);this.init=function(){O.focus()};x=function(){null!=b.fileNode&&F!=O.checked&&(b.fileNode.setAttribute("compressed",O.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){v=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";
+G.style.width="120px";mxUtils.write(G,mxResources.get("realtimeCollaboration")+":");v.appendChild(G);var c=document.createElement("input");c.setAttribute("type","checkbox");var e=d.isRealtimeEnabled();if(e="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))c.setAttribute("checked","checked"),c.defaultChecked=!0;prevApply=x;x=function(){prevApply();b.hideDialog();c.checked!=e&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(c.checked,mxUtils.bind(this,
+function(g){b.spinner.stop()}),mxUtils.bind(this,function(g){b.spinner.stop();b.showError(mxResources.get("error"),null!=g&&null!=g.error?g.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){c.focus()};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(c);G.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));v.appendChild(G);k.appendChild(v)}this.init=null!=this.init?this.init:
+function(){};x=mxUtils.button(mxResources.get("apply"),x);x.className="geBtn gePrimaryBtn";v=document.createElement("tr");G=document.createElement("td");G.colSpan=2;G.style.paddingTop="20px";G.style.whiteSpace="nowrap";G.setAttribute("align","center");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&G.appendChild(D);G.appendChild(x);b.editor.cancelFirst||G.appendChild(D);v.appendChild(G);k.appendChild(v);f.appendChild(k);this.container=
+f},ConnectionPointsDialog=function(b,f){function k(){null!=v&&v.destroy()}var d=document.createElement("div");d.style.userSelect="none";var v=null;this.init=function(){function x(M,E){M=new mxCell("",new mxGeometry(M,E,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");M.vertex=!0;M.cp=!0;return O.addCell(M)}function D(M){M=O.getSelectionCells();O.deleteCells(M)}function G(){var M=parseInt(l.value)||0;M=0>M?0:100<M?100:M;
+l.value=M;var E=parseInt(B.value)||0;E=0>E?0:100<E?100:E;B.value=E;var L=parseInt(q.value)||0,P=parseInt(J.value)||0;M=O.getConnectionPoint(g,new mxConnectionConstraint(new mxPoint(M/100,E/100),!1,null,L,P));E=O.getSelectionCell();if(null!=E){L=E.geometry.clone();P=O.view.scale;var S=O.view.translate;L.x=(M.x-3*P)/P-S.x;L.y=(M.y-3*P)/P-S.y;O.model.setGeometry(E,L)}}function H(M){var E=0,L=0,P=c.geometry,S=mxUtils.format((M.geometry.x+3-P.x)/P.width);M=mxUtils.format((M.geometry.y+3-P.y)/P.height);
+0>S?(E=S*P.width,S=0):1<S&&(E=(S-1)*P.width,S=1);0>M?(L=M*P.height,M=0):1<M&&(L=(M-1)*P.height,M=1);return{x:S,y:M,dx:parseInt(E),dy:parseInt(L)}}function I(){if(1==O.getSelectionCount()){var M=O.getSelectionCell();M=H(M);l.value=100*M.x;B.value=100*M.y;q.value=M.dx;J.value=M.dy;R.style.visibility=""}else R.style.visibility="hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.border="1px solid lightGray";F.style.boxSizing="border-box";
+mxEvent.disableContextMenu(F);d.appendChild(F);var O=new Graph(F);O.autoExtend=!1;O.autoScroll=!1;O.setGridEnabled(!1);O.setEnabled(!0);O.setPanning(!0);O.setConnectable(!1);O.setTooltips(!1);O.minFitScale=null;O.maxFitScale=null;O.centerZoom=!0;O.maxFitScale=2;F=f.geometry;var c=new mxCell(f.value,new mxGeometry(0,0,F.width,F.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");c.vertex=!0;O.addCell(c);O.dblClick=function(M,E){if(null!=E&&E!=c)O.setSelectionCell(E);else{E=
+mxUtils.convertPoint(O.container,mxEvent.getClientX(M),mxEvent.getClientY(M));mxEvent.consume(M);M=O.view.scale;var L=O.view.translate;O.setSelectionCell(x((E.x-3*M)/M-L.x,(E.y-3*M)/M-L.y))}};v=new mxKeyHandler(O);v.bindKey(46,D);v.bindKey(8,D);O.getRubberband().isForceRubberbandEvent=function(M){return 0==M.evt.button&&(null==M.getCell()||M.getCell()==c)};O.panningHandler.isForcePanningEvent=function(M){return 2==M.evt.button};var e=O.isCellSelectable;O.isCellSelectable=function(M){return M==c?!1:
+e.apply(this,arguments)};O.getLinkForCell=function(){return null};var g=O.view.getState(c);F=O.getAllConnectionConstraints(g);for(var p=0;null!=F&&p<F.length;p++){var n=O.getConnectionPoint(g,F[p]);x(n.x-3,n.y-3)}O.fit(8);O.center();p=mxUtils.button("",function(){O.zoomIn()});p.className="geSprite geSprite-zoomin";p.setAttribute("title",mxResources.get("zoomIn"));p.style.position="relative";p.style.outline="none";p.style.border="none";p.style.margin="2px";p.style.cursor="pointer";p.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(p,60);n=mxUtils.button("",function(){O.zoomOut()});n.className="geSprite geSprite-zoomout";n.setAttribute("title",mxResources.get("zoomOut"));n.style.position="relative";n.style.outline="none";n.style.border="none";n.style.margin="2px";n.style.cursor="pointer";n.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(n,60);var t=mxUtils.button("",function(){O.fit(8);O.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.position=
+"relative";t.style.outline="none";t.style.border="none";t.style.margin="2px";t.style.cursor="pointer";t.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(t,60);var y=mxUtils.button("",function(){O.zoomActual();O.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,
+60);var A=mxUtils.button("",D);A.className="geSprite geSprite-delete";A.setAttribute("title",mxResources.get("delete"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.float="right";A.style.cursor="pointer";mxUtils.setOpacity(A,10);F=document.createElement("div");F.appendChild(p);F.appendChild(n);F.appendChild(y);F.appendChild(t);F.appendChild(A);d.appendChild(F);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min",
+"1");C.setAttribute("value","1");C.style.width="45px";C.style.position="relative";C.style.top=mxClient.IS_FF?"0px":"-4px";C.style.margin="0 4px 0 4px";F.appendChild(C);var u=document.createElement("select");u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],y=document.createElement("option"),mxUtils.write(y,mxResources.get(t)),y.value=t,u.appendChild(y);F.appendChild(u);p=mxUtils.button(mxResources.get("add"),function(){var M=
+parseInt(C.value);M=1>M?1:100<M?100:M;C.value=M;for(var E=u.value,L=c.geometry,P=[],S=0;S<M;S++){switch(E){case "left":var V=L.x;var X=L.y+(S+1)*L.height/(M+1);break;case "right":V=L.x+L.width;X=L.y+(S+1)*L.height/(M+1);break;case "top":V=L.x+(S+1)*L.width/(M+1);X=L.y;break;case "bottom":V=L.x+(S+1)*L.width/(M+1),X=L.y+L.height}P.push(x(V-3,X-3))}O.setSelectionCells(P)});p.style.position="relative";p.style.marginLeft="8px";p.style.top=mxClient.IS_FF?"0px":"-4px";F.appendChild(p);var R=document.createElement("div");
+R.style.margin="4px 0px 8px 0px";R.style.whiteSpace="nowrap";R.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));R.appendChild(F);var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.setAttribute("max","100");l.style.width="45px";l.style.margin="0 4px 0 4px";R.appendChild(l);mxUtils.write(R,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";
+R.appendChild(q);mxUtils.write(R,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";R.appendChild(F);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";R.appendChild(B);mxUtils.write(R,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";R.appendChild(J);
+mxUtils.write(R,"pt");d.appendChild(R);I();O.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<O.getSelectionCount()?mxUtils.setOpacity(A,60):mxUtils.setOpacity(A,10);I()});O.addListener(mxEvent.CELLS_MOVED,I);mxEvent.addListener(l,"change",G);mxEvent.addListener(B,"change",G);mxEvent.addListener(q,"change",G);mxEvent.addListener(J,"change",G);F=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});F.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var M=
+O.model.cells,E=[],L=[],P;for(P in M){var S=M[P];S.cp&&L.push(H(S))}L.sort(function(V,X){return V.x!=X.x?V.x-X.x:V.y!=X.y?V.y-X.y:V.dx!=X.dx?V.dx-X.dx:V.dy-X.dy});for(M=0;M<L.length;M++)0<M&&L[M].x==L[M-1].x&&L[M].y==L[M-1].y&&L[M].dx==L[M-1].dx&&L[M].dy==L[M-1].dy||E.push("["+L[M].x+","+L[M].y+",0,"+L[M].dx+","+L[M].dy+"]");b.editor.graph.setCellStyles("points","["+E.join(",")+"]",[f]);k();b.hideDialog()});p.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[f]);k();b.hideDialog()});n.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(F),t.appendChild(n),t.appendChild(p)):(t.appendChild(n),t.appendChild(p),t.appendChild(F));d.appendChild(t)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
+fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
+{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
+gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
+gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
+{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -11187,109 +11187,109 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,B){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,
-B){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,B){return"1"==
-mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,z){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,
+z){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==
+mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&
-0==l.edges.length&&B.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},
-isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&
+0==m.edges.length&&z.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},
+isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(l,B){return B.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,B){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(m,z){return z.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,z){return 0<m.vertices.length&&0==m.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,B){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=l&&(B.isSwimlane(l)||0<B.model.getChildCount(l))},
-isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,B){var L=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=L&&(B.isContainer(L)&&"0"!=l.style.collapsible||!B.isContainer(L)&&"1"==l.style.collapsible)},isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length&&!B.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(l,B){B=B.editorUi.editor.graph.model;return 0<l.vertices.length?B.isVertex(B.getParent(l.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,B){l=0<l.vertices.length?B.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&(z.isSwimlane(m)||0<z.model.getChildCount(m))},
+isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,z){var K=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=K&&(z.isContainer(K)&&"0"!=m.style.collapsible||!z.isContainer(K)&&"1"==m.style.collapsible)},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length&&!z.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;return 0<m.vertices.length?z.isVertex(z.getParent(m.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(m,z){m=0<m.vertices.length?z.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,B){var L=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return B.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,B){return 0<l.vertices.length&&
-B.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(l){var B=rough.canvas({getContext:function(){return l}});B.draw=function(L){var P=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<P.length;O++){var R=P[O];switch(R.type){case "path":null!=L.stroke&&this._drawToContext(l,R,L);break;case "fillPath":this._drawToContext(l,R,L);break;case "fillSketch":this.fillSketch(l,R,L)}}};B.fillSketch=function(L,P,O){var R=l.state.strokeColor,S=l.state.strokeWidth,W=l.state.strokeAlpha,aa=l.state.dashed,Y=O.fillWeight;
-0>Y&&(Y=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(Y);l.setDashed(!1);this._drawToContext(L,P,O);l.setDashed(aa);l.setStrokeWidth(S);l.setStrokeColor(R);l.setStrokeAlpha(W)};B._drawToContext=function(L,P,O){L.begin();for(var R=0;R<P.ops.length;R++){var S=P.ops[R],W=S.data;switch(S.op){case "move":L.moveTo(W[0],W[1]);break;case "bcurveTo":L.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":L.lineTo(W[0],W[1])}}L.end();"fillPath"===P.type&&
-O.filled?L.fill():L.stroke()};return B};(function(){function l(R,S,W){this.canvas=R;this.rc=S;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,l.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(R,S){var W=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)W=(W<<5)-W+aa.charCodeAt(Y)<<0}W={strokeWidth:this.canvas.state.strokeWidth,seed:W,preserveVertices:!0};aa=this.rc.getDefaultOptions();W.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;R=null;(W.filled=S)?(W.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):W.fill="";W.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);W.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);W.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);W.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",aa.roughness);W.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);W.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);W.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);W.hachureGap="auto"==S?-1:S;W.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);W.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",S);W.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);W.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=W.fill&&(null!=R||null!=S&&W.fill==S)?"solid":aa.fillStyle);W.fillStyle=S;return W};l.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,R,S),this.lastX=R,this.lastY=S)};l.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(R,S,W,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,
-S,W,aa),this.lastX=W,this.lastY=aa)};l.prototype.curveTo=function(R,S,W,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,W,aa,Y,Z),this.lastX=Y,this.lastY=Z)};l.prototype.arcTo=function(R,S,W,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,W,aa,Y,Z,ba);if(null!=fa)for(var ja=0;ja<fa.length;ja+=6)this.curveTo(fa[ja],fa[ja+1],fa[ja+2],fa[ja+3],fa[ja+4],fa[ja+
-5]);this.lastX=Z;this.lastY=ba}};l.prototype.rect=function(R,S,W,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,W,aa,this.getStyle(!0,!0)))};l.prototype.ellipse=function(R,S,W,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+W/2,S+aa/2,W,aa,this.getStyle(!0,!0)))};l.prototype.roundrect=function(R,S,W,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(R+Y,S),this.lineTo(R+W-Y,S),this.quadTo(R+W,S,R+W,S+Z),this.lineTo(R+W,S+aa-Z),this.quadTo(R+W,S+aa,R+W-Y,S+aa),this.lineTo(R+Y,S+aa),this.quadTo(R,S+aa,R,S+aa-Z),this.lineTo(R,S+Z),this.quadTo(R,S,R+Y,S))};l.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(W){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];R.stroke!=mxConstants.NONE&&null!=R.stroke||
-delete this.nextShape.options.stroke;R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new l(R,Editor.createRoughCanvas(R),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,W,aa,Y){null!=R.handJiggle&&R.handJiggle.passThrough||L.apply(this,arguments)};var P=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,W=!0;null!=this.style&&(W="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==l&&!this.outline){R.save();
-var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=R.setStrokeColor;R.setStrokeColor=function(){};var fa=R.setFillColor;R.setFillColor=function(){};W||null==aa||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;P.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=fa;R.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;R.restore();W&&null!=aa&&(R.addTolerance=function(){})}P.apply(this,arguments);
-R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(R,S,W,aa,Y,Z){null!=R.handJiggle&&R.handJiggle.constructor==l?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?
-l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,B,L){if(null!=l&&"undefined"!==typeof pako){var P=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=P&&0<P.length)for(var R=0;R<P.length;R++)if("mxgraph"==P[R].getAttribute("class")){O.push(P[R]);break}0<O.length&&(P=O[0].getAttribute("data-mxgraph"),null!=P?(O=JSON.parse(P),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
-(P=mxUtils.getTextContent(O[0]),P=Graph.decompress(P,null,L),0<P.length&&(l=mxUtils.parseXml(P),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(P=l.getAttribute("content"),null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&(P=unescape(window.atob?atob(P):Base64.decode(cont,P))),null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P)),null!=P&&0<P.length)l=mxUtils.parseXml(P).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||B||(O=null,"diagram"==l.nodeName?O=l:"mxfile"==
-l.nodeName&&(P=l.getElementsByTagName("diagram"),0<P.length&&(O=P[Math.max(0,Math.min(P.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,L)));null==l||"mxGraphModel"==l.nodeName||B&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,B){var L=mxUtils.trim(mxUtils.getTextContent(l)),P=null;0<L.length?(l=Graph.decompress(L,null,B),null!=l&&0<l.length&&(P=mxUtils.parseXml(l).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(P=mxUtils.createXmlDocument(),
-P.appendChild(P.importNode(l[0],!0)),P=P.documentElement));return P};Editor.getDiagramNodeXml=function(l){var B=mxUtils.getTextContent(l),L=null;0<B.length?L=Graph.decompress(B):null!=l.firstChild&&(L=mxUtils.getXml(l.firstChild));return L};Editor.extractGraphModelFromPdf=function(l){l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var B=l.indexOf("EmbeddedFile");if(-1<B){var L=l.indexOf("stream",B)+9;if(0<l.substring(B,L).indexOf("application#2Fvnd.jgraph.mxfile"))return B=
-l.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(L,B)),{to:"string"})}return null}L=null;B="";for(var P=0,O=0,R=[],S=null;O<l.length;){var W=l.charCodeAt(O);O+=1;10!=W&&(B+=String.fromCharCode(W));W=="/Subject (%3Cmxfile".charCodeAt(P)?P++:P=0;if(19==P){var aa=l.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=l.substring(O,aa);break}}10==W&&("endobj"==B?S=null:"obj"==B.substring(B.length-3,B.length)||"xref"==B||"trailer"==B?(S=[],R[B.split(" ")[0]]=S):null!=S&&S.push(B),
-B="")}null==L&&(L=Editor.extractGraphModelFromXref(R));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(l){var B=l.trailer,L=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=l[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(l=l[B[1]],null!=l&&(l=l.join("\n"),L=l.substring(1,l.length-1))))));return L};Editor.extractParserError=function(l,B){var L=
-null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(L=B||mxResources.get("invalidChars"),B=l[0].getElementsByTagName("div"),0<B.length&&(L=mxUtils.getTextContent(B[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(l,B){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=B))};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;Menus.prototype.defaultFonts=l.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-l.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=l.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=l.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=l.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=l.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-l.debug&&(urlParams.test="1");null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.compressXml=l.compressXml);null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-l.oneDriveInlinePicker);null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.lightColor&&(Editor.lightColor=l.lightColor);null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(l.css));var L=document.getElementsByTagName("script")[0];L.parentNode.insertBefore(B,L)}null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle);
-null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(B=parseFloat(l.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.gridSteps&&(B=parseInt(l.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=l.pageFormat&&(B=parseInt(l.pageFormat.width),L=parseInt(l.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(L)&&0<L?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,L),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-l.emptyLibraryXml);l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);l.sidebarTitleSize&&(B=parseInt(l.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=l.autosaveDelay&&(B=parseInt(l.autosaveDelay),!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors)}};
-Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(l));B.parentNode.insertBefore(L,B);l=l.split("url(");for(L=1;L<l.length;L++){var P=l[L].indexOf(")");P=Editor.trimCssUrl(l[L].substring(0,P));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",P);
-O.setAttribute("as","font");O.setAttribute("crossorigin","");B.parentNode.insertBefore(O,B)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var B=[],L=0;L<l;L++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return B.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var B=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[l],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==l.nodeName){B=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=L&&(P=new mxCodec(L.ownerDocument),P.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=L){var P=new mxCodec(L.ownerDocument);P.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");B=l.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(B=l.getAttribute("extFonts"))try{for(B=B.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<B.length;L++)this.graph.addExtFont(B[L].name,B[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,B){l=null!=l?l:!0;var L=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var P=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=P&&L.setAttribute("backgroundImage",JSON.stringify(P));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
-0<this.graph.extFonts.length&&(P=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",P.join("|")));return L};Editor.prototype.isDataSvg=function(l){try{var B=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var L=mxUtils.parseXml(B).documentElement;return"mxfile"==
-L.nodeName||"mxGraphModel"==L.nodeName}}catch(P){}return!1};Editor.prototype.extractGraphModel=function(l,B,L){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var d=
-Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
-Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=B?B:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
-Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",l);B[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var B="",L=[""],P=0,O=!0,R;l=$jscomp.makeIterator(l);for(R=l.next();!R.done;R=l.next())R=R.value,'"'===R?(O&&R===B&&(L[P]+=R),O=!O):","===R&&O?R=L[++P]="":L[P]+=R,B=R;return L}return[]};Editor.prototype.getProxiedUrl=
-function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var B=/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l);B=/\.png$/i.test(l)||/\.pdf$/i.test(l)||B;var L="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+L+(B?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==
-window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var B=l.convert,L=this;l.convert=function(P){if(null!=
-P){var O="http://"==P.substring(0,7)||"https://"==P.substring(0,8);O&&!navigator.onLine?P=Editor.svgBrokenImage.src:!O||P.substring(0,l.baseUrl.length)==l.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(P)?"chrome-extension://"==P.substring(0,19)||mxClient.IS_CHROMEAPP||(P=B.apply(this,arguments)):P=PROXY_URL+"?url="+encodeURIComponent(P)}return P};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=
-function(l,B){try{var L=!0,P=window.setTimeout(mxUtils.bind(this,function(){L=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(l))mxUtils.get(l,mxUtils.bind(this,function(R){window.clearTimeout(P);L&&B(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(P);L&&B(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(P);if(L)try{var R=document.createElement("canvas"),S=R.getContext("2d");
-R.height=O.height;R.width=O.width;S.drawImage(O,0,0);B(R.toDataURL())}catch(W){B(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(P);L&&B(Editor.svgBrokenImage.src)};O.src=l}}catch(R){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(l,B,L,P){null==P&&(P=this.createImageUrlConverter());var O=0,R=L||{};L=mxUtils.bind(this,function(S,W){S=l.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=P.convert(Y.getAttribute(W));
-if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=R[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(fa){null!=fa&&(R[Z]=fa,Y.setAttribute(W,fa));O--;0==O&&B(l)})):Y.setAttribute(W,ba)}else null!=Z&&Y.setAttribute(W,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&B(l)};Editor.base64Encode=function(l){for(var B="",L=0,P=l.length,O,R,S;L<P;){O=l.charCodeAt(L++)&255;if(L==P){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);B+="==";break}R=l.charCodeAt(L++);if(L==P){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);B+="=";break}S=l.charCodeAt(L++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(R&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return B};Editor.prototype.loadUrl=function(l,B,L,P,O,R,S,W){try{var aa=!S&&(P||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=B){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ba[fa]=String.fromCharCode(Z[fa]);ba=ba.join("")}R=null!=R?R:"data:image/png;base64,";ba=R+Editor.base64Encode(ba)}B(ba)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()},
-Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},W)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(l){var B=null;if(null!=l){var L=l.split("url(");if(0<L.length){B=[L[0]];l=window.location.pathname;var P=null!=l?l.lastIndexOf("/"):-1;0<=P&&(l=l.substring(0,P+1));P=document.getElementsByTagName("base");var O=
-null;null!=P&&0<P.length&&(O=P[0].getAttribute("href"));for(var R=1;R<L.length;R++)if(P=L[R].indexOf(")"),0<P){var S=Editor.trimCssUrl(L[R].substring(0,P));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":l)+S);B.push('url("'+S+'"'+L[R].substring(P))}else B.push(L[R])}else B=[l]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(l,B,L){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+
-encodeURIComponent(B));L(l,B)};Editor.prototype.embedCssFonts=function(l,B){var L=l.split("url("),P=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==P){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}B(aa.join(""))}});if(0<L.length){for(l=1;l<L.length;l++){var R=L[l].indexOf(")"),S=null,W=L[l].indexOf("format(",R);0<W&&(S=Editor.trimCssUrl(L[l].substring(W+
-7,L[l].indexOf(")",W))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;P++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject";
-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;P--;O()}),mxUtils.bind(this,function(fa){P--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[l].substring(0,R)),S)}O()}else B(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=
-B;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(l[B]=Graph.fontMapping[B]);return l};Editor.prototype.embedExtFonts=function(l){var B=this.graph.getCustomFonts();if(0<B.length){var L=[],P=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==P&&this.embedCssFonts(L.join(""),l)}),R=0;R<B.length;R++)mxUtils.bind(this,function(S,W){Graph.isCssFontUrl(W)?
-null==this.cachedGoogleFonts[W]?(P++,this.loadUrl(W,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[W]=aa;L.push(aa+"\n");P--;O()}),mxUtils.bind(this,function(aa){P--;L.push("@import url("+W+");\n");O()}))):L.push(this.cachedGoogleFonts[W]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+W+'")}\n')})(B[R].name,B[R].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var B=document.getElementsByTagName("style"),L=0;L<
-B.length;L++){var P=mxUtils.getTextContent(B[L]);0>P.indexOf("mxPageSelector")&&0<P.indexOf("MathJax")&&l[0].appendChild(B[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var L=l.getElementsByTagName("defs"),P=l.ownerDocument;0==L.length?(L=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=l.firstChild?l.insertBefore(L,l.firstChild):l.appendChild(L)):L=L[0];l=null!=P.createElementNS?
-P.createElementNS(mxConstants.NS_SVG,"style"):P.createElement("style");l.setAttribute("type","text/css");mxUtils.setTextContent(l,B);L.appendChild(l)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,B,L){var P=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(P/l,P/B))};Editor.prototype.exportToCanvas=function(l,B,L,P,O,R,S,W,aa,Y,Z,ba,fa,ja,ha,ra,ma,Ga){try{R=null!=R?R:!0;S=null!=S?S:!0;ba=null!=
-ba?ba:this.graph;fa=null!=fa?fa:0;var Ea=aa?null:ba.background;Ea==mxConstants.NONE&&(Ea=null);null==Ea&&(Ea=P);null==Ea&&0==aa&&(Ea=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,fa,ja,null,S,null,null,null,Y,null,ra,ma,Ga),mxUtils.bind(this,function(za){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){xa.drawImage(Pa,0,0);l(qa,za)},0):(xa.drawImage(Pa,0,0),l(qa,za))},qa=document.createElement("canvas"),
-Ba=parseInt(za.getAttribute("width")),Ra=parseInt(za.getAttribute("height"));W=null!=W?W:1;null!=B&&(W=R?Math.min(1,Math.min(3*B/(4*Ra),B/Ba)):B/Ba);W=this.getMaxCanvasScale(Ba,Ra,W);Ba=Math.ceil(W*Ba);Ra=Math.ceil(W*Ra);qa.setAttribute("width",Ba);qa.setAttribute("height",Ra);var xa=qa.getContext("2d");null!=Ea&&(xa.beginPath(),xa.rect(0,0,Ba,Ra),xa.fillStyle=Ea,xa.fill());1!=W&&xa.scale(W,W);if(ha){var Da=ba.view,va=Da.scale;Da.scale=1;var Ka=btoa(unescape(encodeURIComponent(Da.createSvgGrid(Da.gridColor))));
-Da.scale=va;Ka="data:image/svg+xml;base64,"+Ka;var la=ba.gridSize*Da.gridSteps*W,da=ba.getGraphBounds(),ca=Da.translate.x*va,na=Da.translate.y*va,ka=ca+(da.x-ca)/va-fa,pa=na+(da.y-na)/va-fa,ea=new Image;ea.onload=function(){try{for(var ia=-Math.round(la-mxUtils.mod((ca-ka)*W,la)),oa=-Math.round(la-mxUtils.mod((na-pa)*W,la));ia<Ba;ia+=la)for(var ua=oa;ua<Ra;ua+=la)xa.drawImage(ea,ia/W,ua/W);Fa()}catch(wa){null!=O&&O(wa)}};ea.onerror=function(ia){null!=O&&O(ia)};ea.src=Ka}else Fa()}catch(ia){null!=
-O&&O(ia)}});Pa.onerror=function(Fa){null!=O&&O(Fa)};Y&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(za,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Fa){null!=O&&O(Fa)}});this.embedExtFonts(mxUtils.bind(this,function(Fa){try{null!=Fa&&this.addFontCss(za,Fa),this.loadFonts(Aa)}catch(qa){null!=O&&O(qa)}}))}catch(Fa){null!=O&&O(Fa)}}),L,Z)}catch(za){null!=O&&
-O(za)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var u=t,C=0;8>C;C++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(l,B,L,P){for(var O=0;O<P;O++)l=Editor.crcTable[(l^B.charCodeAt(L+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var B=-1,L=0;L<l.length;L++)B=B>>>8^Editor.crcTable[(B^l.charCodeAt(L))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(l,B,L,P,O){function R(Z,ba){var fa=aa;aa+=ba;return Z.substring(fa,aa)}function S(Z){Z=R(Z,4);return Z.charCodeAt(3)+
-(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function W(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var aa=0;if(R(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(l,4),"IHDR"!=R(l,4))null!=O&&O();else{R(l,17);O=l.substring(0,aa);do{var Y=S(l);if("IDAT"==R(l,4)){O=l.substring(0,aa-8);"pHYs"==B&&"dpi"==L?(L=Math.round(P/.0254),L=W(L)+W(L)+String.fromCharCode(1)):
-L=L+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+P;P=4294967295;P=Editor.updateCRC(P,B,0,4);P=Editor.updateCRC(P,L,0,L.length);O+=W(L.length)+B+L+W(P^4294967295);O+=l.substring(aa-8,l.length);break}O+=l.substring(aa-8,aa-4+Y);R(l,Y);R(l,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(l,B){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,B){var L=null;null!=l.editor.graph.getModel().getParent(B)?L=B.getId():null!=l.currentPage&&(L=l.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var c=
-Format.prototype.init;Format.prototype.init=function(){c.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var e=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?e.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var l=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=l&&l.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(l){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(l){l=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var B=this.editorUi,L=B.editor.graph,P=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var R=new ChangePageSetup(B);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;L.model.execute(R)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
-B.addListener("shadowVisibleChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});Editor.enableShadowOption||(P.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(P,60));l.appendChild(P)}return l};var m=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=m.apply(this,arguments);var B=this.editorUi,L=B.editor.graph;if(L.isEnabled()){var P=B.getCurrentFile();if(null!=P&&P.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(S){B.editor.setAutosave(S);B.editor.autosave&&P.isModified()&&P.fileChanged()},{install:function(S){this.listener=function(){S(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}});l.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return L.mathEnabled},function(S){B.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});O.style.paddingTop="5px";l.appendChild(O);var R=B.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var K=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&
+z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(K){var Q=K.sets||[];K=K.options||this.getDefaultOptions();for(var N=0;N<Q.length;N++){var U=Q[N];switch(U.type){case "path":null!=K.stroke&&this._drawToContext(m,U,K);break;case "fillPath":this._drawToContext(m,U,K);break;case "fillSketch":this.fillSketch(m,U,K)}}};z.fillSketch=function(K,Q,N){var U=m.state.strokeColor,T=m.state.strokeWidth,W=m.state.strokeAlpha,Z=m.state.dashed,ca=N.fillWeight;
+0>ca&&(ca=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(ca);m.setDashed(!1);this._drawToContext(K,Q,N);m.setDashed(Z);m.setStrokeWidth(T);m.setStrokeColor(U);m.setStrokeAlpha(W)};z._drawToContext=function(K,Q,N){K.begin();for(var U=0;U<Q.ops.length;U++){var T=Q.ops[U],W=T.data;switch(T.op){case "move":K.moveTo(W[0],W[1]);break;case "bcurveTo":K.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":K.lineTo(W[0],W[1])}}K.end();"fillPath"===
+Q.type&&N.filled?K.fill():K.stroke()};return z};(function(){function m(U,T,W){this.canvas=U;this.rc=T;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(U,T){var W=1;if(null!=this.shape.state){var Z=this.shape.state.cell.id;if(null!=Z)for(var ca=0;ca<Z.length;ca++)W=(W<<5)-W+Z.charCodeAt(ca)<<0}W={strokeWidth:this.canvas.state.strokeWidth,seed:W,preserveVertices:!0};Z=this.rc.getDefaultOptions();W.stroke=U?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;U=null;(W.filled=T)?(W.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):W.fill="";W.bowing=mxUtils.getValue(this.shape.style,"bowing",Z.bowing);W.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Z.hachureAngle);W.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Z.curveFitting);W.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+Z.roughness);W.simplification=mxUtils.getValue(this.shape.style,"simplification",Z.simplification);W.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Z.disableMultiStroke);W.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Z.disableMultiStrokeFill);T=mxUtils.getValue(this.shape.style,"hachureGap",-1);W.hachureGap="auto"==T?-1:T;W.dashGap=mxUtils.getValue(this.shape.style,"dashGap",T);W.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
+T);W.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",T);T=mxUtils.getValue(this.shape.style,"fillWeight",-1);W.fillWeight="auto"==T?-1:T;T=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==T&&(T=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),T=null!=W.fill&&(null!=U||null!=T&&W.fill==T)?"solid":Z.fillStyle);W.fillStyle=T;return W};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};m.prototype.lineTo=function(U,T){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+U,T),this.lastX=U,this.lastY=T)};m.prototype.moveTo=function(U,T){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,T),this.lastX=U,this.lastY=T,this.firstX=U,this.firstY=T)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(U,T,W,Z){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,T,W,Z),this.lastX=W,this.lastY=Z)};
+m.prototype.curveTo=function(U,T,W,Z,ca,ba){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,T,W,Z,ca,ba),this.lastX=ca,this.lastY=ba)};m.prototype.arcTo=function(U,T,W,Z,ca,ba,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Y=mxUtils.arcToCurves(this.lastX,this.lastY,U,T,W,Z,ca,ba,fa);if(null!=Y)for(var ha=0;ha<Y.length;ha+=6)this.curveTo(Y[ha],Y[ha+1],Y[ha+2],Y[ha+3],Y[ha+4],Y[ha+5]);this.lastX=ba;this.lastY=fa}};m.prototype.rect=
+function(U,T,W,Z){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,T,W,Z,this.getStyle(!0,!0)))};m.prototype.ellipse=function(U,T,W,Z){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+W/2,T+Z/2,W,Z,this.getStyle(!0,!0)))};m.prototype.roundrect=function(U,T,W,Z,ca,ba){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+
+ca,T),this.lineTo(U+W-ca,T),this.quadTo(U+W,T,U+W,T+ba),this.lineTo(U+W,T+Z-ba),this.quadTo(U+W,T+Z,U+W-ca,T+Z),this.lineTo(U+ca,T+Z),this.quadTo(U,T+Z,U,T+Z-ba),this.lineTo(U,T+ba),this.quadTo(U,T,U+ca,T))};m.prototype.drawPath=function(U){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(W){}this.passThrough=!1}else if(null!=this.nextShape){for(var T in U)this.nextShape.options[T]=U[T];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;
+U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new m(U,Editor.createRoughCanvas(U),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):
+this.createRoughCanvas(U)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,T,W,Z,ca){null!=U.handJiggle&&U.handJiggle.passThrough||K.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(U){var T=U.addTolerance,W=!0;null!=this.style&&(W="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==m&&!this.outline){U.save();var Z=this.fill,ca=this.stroke;this.stroke=
+this.fill=null;var ba=this.configurePointerEvents,fa=U.setStrokeColor;U.setStrokeColor=function(){};var Y=U.setFillColor;U.setFillColor=function(){};W||null==Z||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;Q.apply(this,arguments);U.handJiggle.passThrough=!1;U.setFillColor=Y;U.setStrokeColor=fa;this.configurePointerEvents=ba;this.stroke=ca;this.fill=Z;U.restore();W&&null!=Z&&(U.addTolerance=function(){})}Q.apply(this,arguments);U.addTolerance=T};var N=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(U,T,W,Z,ca,ba){null!=U.handJiggle&&U.handJiggle.constructor==m?(U.handJiggle.passThrough=!0,N.apply(this,arguments),U.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),{to:"string"})};
+Editor.extractGraphModel=function(m,z,K){if(null!=m&&"undefined"!==typeof pako){var Q=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=Q&&0<Q.length)for(var U=0;U<Q.length;U++)if("mxgraph"==Q[U].getAttribute("class")){N.push(Q[U]);break}0<N.length&&(Q=N[0].getAttribute("data-mxgraph"),null!=Q?(N=JSON.parse(Q),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(Q=mxUtils.getTextContent(N[0]),Q=Graph.decompress(Q,null,K),0<
+Q.length&&(m=mxUtils.parseXml(Q),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(Q=m.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)m=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(N=null,"diagram"==m.nodeName?N=m:"mxfile"==m.nodeName&&(Q=m.getElementsByTagName("diagram"),0<Q.length&&
+(N=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=N&&(m=Editor.parseDiagramNode(N,K)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z){var K=mxUtils.trim(mxUtils.getTextContent(m)),Q=null;0<K.length?(m=Graph.decompress(K,null,z),null!=m&&0<m.length&&(Q=mxUtils.parseXml(m).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(Q=mxUtils.createXmlDocument(),Q.appendChild(Q.importNode(m[0],!0)),Q=Q.documentElement));
+return Q};Editor.getDiagramNodeXml=function(m){var z=mxUtils.getTextContent(m),K=null;0<z.length?K=Graph.decompress(z):null!=m.firstChild&&(K=mxUtils.getXml(m.firstChild));return K};Editor.extractGraphModelFromPdf=function(m){m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var z=m.indexOf("EmbeddedFile");if(-1<z){var K=m.indexOf("stream",z)+9;if(0<m.substring(z,K).indexOf("application#2Fvnd.jgraph.mxfile"))return z=m.indexOf("endstream",
+K-1),pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(K,z)),{to:"string"})}return null}K=null;z="";for(var Q=0,N=0,U=[],T=null;N<m.length;){var W=m.charCodeAt(N);N+=1;10!=W&&(z+=String.fromCharCode(W));W=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var Z=m.indexOf("%3C%2Fmxfile%3E)",N)+15;N-=9;if(Z>N){K=m.substring(N,Z);break}}10==W&&("endobj"==z?T=null:"obj"==z.substring(z.length-3,z.length)||"xref"==z||"trailer"==z?(T=[],U[z.split(" ")[0]]=T):null!=T&&T.push(z),z="")}null==K&&(K=
+Editor.extractGraphModelFromXref(U));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,K=null;null!=z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),K=m.substring(1,m.length-1))))));return K};Editor.extractParserError=function(m,z){var K=null;m=null!=
+m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(K=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(K=mxUtils.getTextContent(z[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;Menus.prototype.defaultFonts=m.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+m.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=m.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=m.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=m.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=m.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+m.debug&&(urlParams.test="1");null!=m.templateFile&&(EditorUi.templateFile=m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=m.simpleLabels);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+m.oneDriveInlinePicker);null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.lightColor&&(Editor.lightColor=m.lightColor);null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));m.customPresetColors&&(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(m.css));var K=document.getElementsByTagName("script")[0];K.parentNode.insertBefore(z,K)}null!=m.libraries&&(Sidebar.prototype.customEntries=m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);
+null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(z=parseFloat(m.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.gridSteps&&(z=parseInt(m.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=m.pageFormat&&(z=parseInt(m.pageFormat.width),K=parseInt(m.pageFormat.height),!isNaN(z)&&0<z&&!isNaN(K)&&0<K?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,K),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+m.emptyLibraryXml);m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);m.sidebarTitleSize&&(z=parseInt(m.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors)}};
+Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];if(null!=z&&null!=z.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(m));z.parentNode.insertBefore(K,z);m=m.split("url(");for(K=1;K<m.length;K++){var Q=m[K].indexOf(")");Q=Editor.trimCssUrl(m[K].substring(0,Q));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",Q);
+N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var z=[],K=0;K<m;K++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
+Editor.GUID_ALPHABET.length)));return z.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=K&&(Q=new mxCodec(K.ownerDocument),Q.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=K){var Q=new mxCodec(K.ownerDocument);Q.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),K=0;K<z.length;K++)this.graph.addExtFont(z[K].name,z[K].url)}catch(N){console.log("ExtFonts format error: "+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
+};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var K=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=Q&&K.setAttribute("backgroundImage",JSON.stringify(Q));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),K.setAttribute("extFonts",Q.join("|")));return K};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var K=mxUtils.parseXml(z).documentElement;return"mxfile"==
+K.nodeName||"mxGraphModel"==K.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(m,z,K){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var d=
+Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(N){try{MathJax.typesetClear([N]),MathJax.typeset([N]),
+Editor.onMathJaxDone()}catch(U){MathJax.typesetClear([N]),null!=U.retry?U.retry.then(function(){MathJax.typesetPromise([N]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var N=0;N<Editor.mathJaxQueue.length;N++)Editor.doMathJaxRender(Editor.mathJaxQueue[N])}}};
+Editor.MathJaxRender=function(N){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(N):Editor.mathJaxQueue.push(N)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var K=Editor.prototype.init;Editor.prototype.init=function(){K.apply(this,arguments);var N=mxUtils.bind(this,function(U,T){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+N);this.graph.addListener(mxEvent.REFRESH,N)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",m);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z="",K=[""],Q=0,N=!0,U;m=$jscomp.makeIterator(m);for(U=m.next();!U.done;U=m.next())U=U.value,'"'===U?(N&&U===z&&(K[Q]+=U),N=!N):","===U&&N?U=K[++Q]="":K[Q]+=U,z=U;return K}return[]};Editor.prototype.getProxiedUrl=
+function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var K="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+K+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==
+window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,K=this;m.convert=function(Q){if(null!=
+Q){var N="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);N&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!N||Q.substring(0,m.baseUrl.length)==m.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=z.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=
+function(m,z){try{var K=!0,Q=window.setTimeout(mxUtils.bind(this,function(){K=!1;z(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m,mxUtils.bind(this,function(U){window.clearTimeout(Q);K&&z(Editor.createSvgDataUri(U.getText()))}),function(){window.clearTimeout(Q);K&&z(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(Q);if(K)try{var U=document.createElement("canvas"),T=U.getContext("2d");
+U.height=N.height;U.width=N.width;T.drawImage(N,0,0);z(U.toDataURL())}catch(W){z(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(Q);K&&z(Editor.svgBrokenImage.src)};N.src=m}}catch(U){z(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,z,K,Q){null==Q&&(Q=this.createImageUrlConverter());var N=0,U=K||{};K=mxUtils.bind(this,function(T,W){T=m.getElementsByTagName(T);for(var Z=0;Z<T.length;Z++)mxUtils.bind(this,function(ca){try{if(null!=ca){var ba=Q.convert(ca.getAttribute(W));
+if(null!=ba&&"data:"!=ba.substring(0,5)){var fa=U[ba];null==fa?(N++,this.convertImageToDataUri(ba,function(Y){null!=Y&&(U[ba]=Y,ca.setAttribute(W,Y));N--;0==N&&z(m)})):ca.setAttribute(W,fa)}else null!=ba&&ca.setAttribute(W,ba)}}catch(Y){}})(T[Z])});K("image","xlink:href");K("img","src");0==N&&z(m)};Editor.base64Encode=function(m){for(var z="",K=0,Q=m.length,N,U,T;K<Q;){N=m.charCodeAt(K++)&255;if(K==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
+3)<<4);z+="==";break}U=m.charCodeAt(K++);if(K==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(U&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);z+="=";break}T=m.charCodeAt(K++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
+3)<<4|(U&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(T&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T&63)}return z};Editor.prototype.loadUrl=function(m,z,K,Q,N,U,T,W){try{var Z=!T&&(Q||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var ca=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(ba){if(200<=ba.getStatus()&&
+299>=ba.getStatus()){if(null!=z){var fa=ba.getText();if(Z){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ba=mxUtilsBinaryToArray(ba.request.responseBody).toArray();fa=Array(ba.length);for(var Y=0;Y<ba.length;Y++)fa[Y]=String.fromCharCode(ba[Y]);fa=fa.join("")}U=null!=U?U:"data:image/png;base64,";fa=U+Editor.base64Encode(fa)}z(fa)}}else null!=K&&(0==ba.getStatus()?K({message:mxResources.get("accessDenied")},ba):404==ba.getStatus()?K({code:ba.getStatus()},
+ba):K({message:mxResources.get("error")+" "+ba.getStatus()},ba))}),function(ba){null!=K&&K({message:mxResources.get("error")+" "+ba.getStatus()})},Z,this.timeout,function(){N&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:ca})},W)});ca()}catch(ba){null!=K&&K(ba)}};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var K=m.split("url(");if(0<K.length){z=[K[0]];m=window.location.pathname;var Q=null!=m?m.lastIndexOf("/"):-1;0<=Q&&(m=m.substring(0,Q+1));Q=document.getElementsByTagName("base");
+var N=null;null!=Q&&0<Q.length&&(N=Q[0].getAttribute("href"));for(var U=1;U<K.length;U++)if(Q=K[U].indexOf(")"),0<Q){var T=Editor.trimCssUrl(K[U].substring(0,Q));this.graph.isRelativeUrl(T)&&(T=null!=N?N+T:window.location.protocol+"//"+window.location.hostname+("/"==T.charAt(0)?"":m)+T);z.push('url("'+T+'"'+K[U].substring(Q))}else z.push(K[U])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,K){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+
+encodeURIComponent(z));K(m,z)};Editor.prototype.embedCssFonts=function(m,z){var K=m.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==Q){for(var Z=[K[0]],ca=1;ca<K.length;ca++){var ba=K[ca].indexOf(")");Z.push('url("');Z.push(this.cachedFonts[Editor.trimCssUrl(K[ca].substring(0,ba))]);Z.push('"'+K[ca].substring(ba))}z(Z.join(""))}});if(0<K.length){for(m=1;m<K.length;m++){var U=K[m].indexOf(")"),T=null,W=K[m].indexOf("format(",U);0<W&&(T=Editor.trimCssUrl(K[m].substring(W+
+7,K[m].indexOf(")",W))));mxUtils.bind(this,function(Z){if(null==this.cachedFonts[Z]){this.cachedFonts[Z]=Z;Q++;var ca="application/x-font-ttf";if("svg"==T||/(\.svg)($|\?)/i.test(Z))ca="image/svg+xml";else if("otf"==T||"embedded-opentype"==T||/(\.otf)($|\?)/i.test(Z))ca="application/x-font-opentype";else if("woff"==T||/(\.woff)($|\?)/i.test(Z))ca="application/font-woff";else if("woff2"==T||/(\.woff2)($|\?)/i.test(Z))ca="application/font-woff2";else if("eot"==T||/(\.eot)($|\?)/i.test(Z))ca="application/vnd.ms-fontobject";
+else if("sfnt"==T||/(\.sfnt)($|\?)/i.test(Z))ca="application/font-sfnt";this.mapFontUrl(ca,Z,mxUtils.bind(this,function(ba,fa){this.loadUrl(fa,mxUtils.bind(this,function(Y){this.cachedFonts[Z]=Y;Q--;N()}),mxUtils.bind(this,function(Y){Q--;N()}),!0,null,"data:"+ba+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[m].substring(0,U)),T)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=
+z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var K=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(K.join(""),m)}),U=0;U<z.length;U++)mxUtils.bind(this,function(T,W){Graph.isCssFontUrl(W)?
+null==this.cachedGoogleFonts[W]?(Q++,this.loadUrl(W,mxUtils.bind(this,function(Z){this.cachedGoogleFonts[W]=Z;K.push(Z+"\n");Q--;N()}),mxUtils.bind(this,function(Z){Q--;K.push("@import url("+W+");\n");N()}))):K.push(this.cachedGoogleFonts[W]+"\n"):K.push('@font-face {font-family: "'+T+'";src: url("'+W+'")}\n')})(z[U].name,z[U].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),K=0;K<z.length;K++){var Q=
+mxUtils.getTextContent(z[K]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&m[0].appendChild(z[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var K=m.getElementsByTagName("defs"),Q=m.ownerDocument;0==K.length?(K=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=m.firstChild?m.insertBefore(K,m.firstChild):m.appendChild(K)):K=K[0];m=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,
+"style"):Q.createElement("style");m.setAttribute("type","text/css");mxUtils.setTextContent(m,z);K.appendChild(m)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,K){var Q=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(Q/m,Q/z))};Editor.prototype.exportToCanvas=function(m,z,K,Q,N,U,T,W,Z,ca,ba,fa,Y,ha,da,wa,za,xa){try{U=null!=U?U:!0;T=null!=T?T:!0;fa=null!=fa?fa:this.graph;Y=null!=Y?Y:0;var ta=
+Z?null:fa.background;ta==mxConstants.NONE&&(ta=null);null==ta&&(ta=Q);null==ta&&0==Z&&(ta=wa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(fa.getSvg(null,null,Y,ha,null,T,null,null,null,ca,null,wa,za,xa),mxUtils.bind(this,function(ka){try{var Na=new Image;Na.onload=mxUtils.bind(this,function(){try{var Ea=function(){mxClient.IS_SF?window.setTimeout(function(){ua.drawImage(Na,0,0);m(ra,ka)},0):(ua.drawImage(Na,0,0),m(ra,ka))},ra=document.createElement("canvas"),qa=parseInt(ka.getAttribute("width")),
+Oa=parseInt(ka.getAttribute("height"));W=null!=W?W:1;null!=z&&(W=U?Math.min(1,Math.min(3*z/(4*Oa),z/qa)):z/qa);W=this.getMaxCanvasScale(qa,Oa,W);qa=Math.ceil(W*qa);Oa=Math.ceil(W*Oa);ra.setAttribute("width",qa);ra.setAttribute("height",Oa);var ua=ra.getContext("2d");null!=ta&&(ua.beginPath(),ua.rect(0,0,qa,Oa),ua.fillStyle=ta,ua.fill());1!=W&&ua.scale(W,W);if(da){var Ca=fa.view,Ba=Ca.scale;Ca.scale=1;var La=btoa(unescape(encodeURIComponent(Ca.createSvgGrid(Ca.gridColor))));Ca.scale=Ba;La="data:image/svg+xml;base64,"+
+La;var ma=fa.gridSize*Ca.gridSteps*W,ea=fa.getGraphBounds(),aa=Ca.translate.x*Ba,na=Ca.translate.y*Ba,la=aa+(ea.x-aa)/Ba-Y,pa=na+(ea.y-na)/Ba-Y,ia=new Image;ia.onload=function(){try{for(var ja=-Math.round(ma-mxUtils.mod((aa-la)*W,ma)),oa=-Math.round(ma-mxUtils.mod((na-pa)*W,ma));ja<qa;ja+=ma)for(var ya=oa;ya<Oa;ya+=ma)ua.drawImage(ia,ja/W,ya/W);Ea()}catch(Aa){null!=N&&N(Aa)}};ia.onerror=function(ja){null!=N&&N(ja)};ia.src=La}else Ea()}catch(ja){null!=N&&N(ja)}});Na.onerror=function(Ea){null!=N&&N(Ea)};
+ca&&this.graph.addSvgShadow(ka);this.graph.mathEnabled&&this.addMathCss(ka);var Ka=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ka,this.resolvedFontCss),Na.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}catch(Ea){null!=N&&N(Ea)}});this.embedExtFonts(mxUtils.bind(this,function(Ea){try{null!=Ea&&this.addFontCss(ka,Ea),this.loadFonts(Ka)}catch(ra){null!=N&&N(ra)}}))}catch(Ea){null!=N&&N(Ea)}}),K,ba)}catch(ka){null!=N&&N(ka)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var x=
+v,D=0;8>D;D++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[v]=x;Editor.updateCRC=function(m,z,K,Q){for(var N=0;N<Q;N++)m=Editor.crcTable[(m^z.charCodeAt(K+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,K=0;K<m.length;K++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(K))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,K,Q,N){function U(ba,fa){var Y=Z;Z+=fa;return ba.substring(Y,Z)}function T(ba){ba=U(ba,4);return ba.charCodeAt(3)+(ba.charCodeAt(2)<<8)+(ba.charCodeAt(1)<<
+16)+(ba.charCodeAt(0)<<24)}function W(ba){return String.fromCharCode(ba>>24&255,ba>>16&255,ba>>8&255,ba&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var Z=0;if(U(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(U(m,4),"IHDR"!=U(m,4))null!=N&&N();else{U(m,17);N=m.substring(0,Z);do{var ca=T(m);if("IDAT"==U(m,4)){N=m.substring(0,Z-8);"pHYs"==z&&"dpi"==K?(K=Math.round(Q/.0254),K=W(K)+W(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+
+("zTXt"==z?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,z,0,4);Q=Editor.updateCRC(Q,K,0,K.length);N+=W(K.length)+z+K+W(Q^4294967295);N+=m.substring(Z-8,m.length);break}N+=m.substring(Z-8,Z-4+ca);U(m,ca);U(m,4)}while(ca);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){G.apply(this,
+arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var K=null;null!=m.editor.graph.getModel().getParent(z)?K=z.getId():null!=m.currentPage&&(K=m.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var I=Format.prototype.init;
+Format.prototype.init=function(){I.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var m=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=m&&m.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(m){return!1};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(m){m=O.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var z=this.editorUi,K=z.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(N){var U=new ChangePageSetup(z);U.ignoreColor=!0;U.ignoreImage=!0;U.shadowVisible=N;K.model.execute(U)},{install:function(N){this.listener=function(){N(K.shadowVisible)};
+z.addListener("shadowVisibleChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));m.appendChild(Q)}return m};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=c.apply(this,arguments);var z=this.editorUi,K=z.editor.graph;if(K.isEnabled()){var Q=z.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var N=
+this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(T){z.editor.setAutosave(T);z.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(T){this.listener=function(){T(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}});m.appendChild(N)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return K.mathEnabled},function(T){z.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=function(){T(K.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});N.style.paddingTop="5px";m.appendChild(N);var U=z.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");U.style.position="relative";U.style.marginLeft="6px";U.style.top="2px";N.appendChild(U)}return m};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",
@@ -11312,92 +11312,92 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(l,B,L){if(null!=B){var P=function(R){if(null!=R)if(L)for(var S=0;S<R.length;S++)B[R[S].name]=R[S];else for(var W in B){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==W&&R[S].type==B[W].type){aa=!0;break}aa||delete B[W]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),P(O.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{P(JSON.parse(l))}catch(R){}}};var p=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));p.apply(this,arguments);if(Editor.enableCustomProperties){for(var B=
-{},L=l.vertices,P=l.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],B,0==O);for(O=0;O<P.length;O++)this.findCommonProperties(P[O],B,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(B).length&&this.container.appendChild(this.addProperties(this.createPanel(),B,l))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(l,B,L){function P(xa,Da,va,Ka){ba.getModel().beginUpdate();try{var la=[],da=[];if(null!=va.index){for(var ca=[],na=va.parentRow.nextSibling;na&&na.getAttribute("data-pName")==xa;)ca.push(na.getAttribute("data-pValue")),na=na.nextSibling;va.index<ca.length?null!=Ka?ca.splice(Ka,1):ca[va.index]=Da:ca.push(Da);null!=va.size&&ca.length>va.size&&(ca=ca.slice(0,va.size));Da=ca.join(",");null!=va.countProperty&&(ba.setCellStyles(va.countProperty,ca.length,
-ba.getSelectionCells()),la.push(va.countProperty),da.push(ca.length))}ba.setCellStyles(xa,Da,ba.getSelectionCells());la.push(xa);da.push(Da);if(null!=va.dependentProps)for(xa=0;xa<va.dependentProps.length;xa++){var ka=va.dependentPropsDefVal[xa],pa=va.dependentPropsVals[xa];if(pa.length>Da)pa=pa.slice(0,Da);else for(var ea=pa.length;ea<Da;ea++)pa.push(ka);pa=pa.join(",");ba.setCellStyles(va.dependentProps[xa],pa,ba.getSelectionCells());la.push(va.dependentProps[xa]);da.push(pa)}if("function"==typeof va.onChange)va.onChange(ba,
-Da);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",la,"values",da,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(xa,Da,va){var Ka=mxUtils.getOffset(l,!0),la=mxUtils.getOffset(xa,!0);Da.style.position="absolute";Da.style.left=la.x-Ka.x+"px";Da.style.top=la.y-Ka.y+"px";Da.style.width=xa.offsetWidth+"px";Da.style.height=xa.offsetHeight-(va?4:0)+"px";Da.style.zIndex=5}function R(xa,Da,va){var Ka=document.createElement("div");Ka.style.width="32px";Ka.style.height=
-"4px";Ka.style.margin="2px";Ka.style.border="1px solid black";Ka.style.background=Da&&"none"!=Da?Da:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(la){this.editorUi.pickColor(Da,function(da){Ka.style.background="none"==da?"url('"+Dialog.prototype.noColorImage+"')":da;P(xa,da,va)});mxEvent.consume(la)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ka);return btn}function S(xa,Da,va,Ka,la,da,ca){null!=Da&&(Da=Da.split(","),
-fa.push({name:xa,values:Da,type:va,defVal:Ka,countProperty:la,parentRow:da,isDeletable:!0,flipBkg:ca}));btn=mxUtils.button("+",mxUtils.bind(Z,function(na){for(var ka=da,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==xa)ka=ka.nextSibling,pa++;else break;var ea={type:va,parentRow:da,index:pa,isDeletable:!0,defVal:Ka,countProperty:la};pa=Y(xa,"",ea,0==pa%2,ca);P(xa,Ka,ea);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function W(xa,Da,va,Ka,la,da,ca){if(0<la){var na=Array(la);Da=null!=Da?Da.split(","):[];for(var ka=0;ka<la;ka++)na[ka]=null!=Da[ka]?Da[ka]:null!=Ka?Ka:"";fa.push({name:xa,values:na,type:va,defVal:Ka,parentRow:da,flipBkg:ca,size:la})}return document.createElement("div")}function aa(xa,Da,va){var Ka=document.createElement("input");Ka.type="checkbox";Ka.checked="1"==Da;mxEvent.addListener(Ka,"change",function(){P(xa,Ka.checked?"1":"0",va)});return Ka}function Y(xa,
-Da,va,Ka,la){var da=va.dispName,ca=va.type,na=document.createElement("tr");na.className="gePropRow"+(la?"Dark":"")+(Ka?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",xa);na.setAttribute("data-pValue",Da);Ka=!1;null!=va.index&&(na.setAttribute("data-index",va.index),da=(null!=da?da:"")+"["+va.index+"]",Ka=!0);var ka=document.createElement("td");ka.className="gePropRowCell";da=mxResources.get(da,null,da);mxUtils.write(ka,da);ka.setAttribute("title",da);Ka&&(ka.style.textAlign="right");
-na.appendChild(ka);ka=document.createElement("td");ka.className="gePropRowCell";if("color"==ca)ka.appendChild(R(xa,Da,va));else if("bool"==ca||"boolean"==ca)ka.appendChild(aa(xa,Da,va));else if("enum"==ca){var pa=va.enumList;for(la=0;la<pa.length;la++)if(da=pa[la],da.val==Da){mxUtils.write(ka,mxResources.get(da.dispName,null,da.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ka,ea);for(var ia=0;ia<pa.length;ia++){var oa=pa[ia],ua=
-document.createElement("option");ua.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ua,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ua)}ea.value=Da;l.appendChild(ea);mxEvent.addListener(ea,"change",function(){var wa=mxUtils.htmlEntities(ea.value);P(xa,wa,va)});ea.focus();mxEvent.addListener(ea,"blur",function(){l.removeChild(ea)})}))}else"dynamicArr"==ca?ka.appendChild(S(xa,Da,va.subType,va.subDefVal,va.countProperty,na,la)):"staticArr"==ca?ka.appendChild(W(xa,Da,va.subType,va.subDefVal,
-va.size,na,la)):"readOnly"==ca?(la=document.createElement("input"),la.setAttribute("readonly",""),la.value=Da,la.style.width="96px",la.style.borderWidth="0px",ka.appendChild(la)):(ka.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Da)),mxEvent.addListener(ka,"click",mxUtils.bind(Z,function(){function ea(){var oa=ia.value;oa=0==oa.length&&"string"!=ca?0:oa;va.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",ca="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=va.min&&oa<
-va.min?oa=va.min:null!=va.max&&oa>va.max&&(oa=va.max);oa=encodeURIComponent(("int"==ca?parseInt(oa):oa)+"");P(xa,oa,va)}var ia=document.createElement("input");O(ka,ia,!0);ia.value=decodeURIComponent(Da);ia.className="gePropEditor";"int"!=ca&&"float"!=ca||va.allowAuto||(ia.type="number",ia.step="int"==ca?"1":"any",null!=va.min&&(ia.min=parseFloat(va.min)),null!=va.max&&(ia.max=parseFloat(va.max)));l.appendChild(ia);mxEvent.addListener(ia,"keypress",function(oa){13==oa.keyCode&&ea()});ia.focus();mxEvent.addListener(ia,
-"blur",function(){ea()})})));va.isDeletable&&(la=mxUtils.button("-",mxUtils.bind(Z,function(ea){P(xa,"",va,va.index);mxEvent.consume(ea)})),la.style.height="16px",la.style.width="25px",la.style.float="right",la.className="geColorBtn",ka.appendChild(la));na.appendChild(ka);return na}var Z=this,ba=this.editorUi.editor.graph,fa=[];l.style.position="relative";l.style.padding="0";var ja=document.createElement("table");ja.className="geProperties";ja.style.whiteSpace="nowrap";ja.style.width="100%";var ha=
-document.createElement("tr");ha.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var ma=document.createElement("img");ma.src=Sidebar.prototype.expandedImage;ma.style.verticalAlign="middle";ra.appendChild(ma);mxUtils.write(ra,mxResources.get("property"));ha.style.cursor="pointer";var Ga=function(){var xa=ja.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ma.src=Sidebar.prototype.collapsedImage;var Da="none";for(var va=l.childNodes.length-
-1;0<=va;va--)try{var Ka=l.childNodes[va],la=Ka.nodeName.toUpperCase();"INPUT"!=la&&"SELECT"!=la||l.removeChild(Ka)}catch(da){}}else ma.src=Sidebar.prototype.expandedImage,Da="";for(va=0;va<xa.length;va++)xa[va].style.display=Da};mxEvent.addListener(ha,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ga()});ha.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");ha.appendChild(ra);ja.appendChild(ha);var Ea=
-!1,za=!1;ha=null;1==L.vertices.length&&0==L.edges.length?ha=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ha=L.edges[0].id);null!=ha&&ja.appendChild(Y("id",mxUtils.htmlEntities(ha),{dispName:"ID",type:"readOnly"},!0,!1));for(var Pa in B)if(ha=B[Pa],"function"!=typeof ha.isVisible||ha.isVisible(L,this)){var Aa=null!=L.style[Pa]?mxUtils.htmlEntities(L.style[Pa]+""):null!=ha.getDefaultValue?ha.getDefaultValue(L,this):ha.defVal;if("separator"==ha.type)za=!za;else{if("staticArr"==ha.type)ha.size=
-parseInt(L.style[ha.sizeProperty]||B[ha.sizeProperty].defVal)||0;else if(null!=ha.dependentProps){var Fa=ha.dependentProps,qa=[],Ba=[];for(ra=0;ra<Fa.length;ra++){var Ra=L.style[Fa[ra]];Ba.push(B[Fa[ra]].subDefVal);qa.push(null!=Ra?Ra.split(","):[])}ha.dependentPropsDefVal=Ba;ha.dependentPropsVals=qa}ja.appendChild(Y(Pa,Aa,ha,Ea,za));Ea=!Ea}}for(ra=0;ra<fa.length;ra++)for(ha=fa[ra],B=ha.parentRow,L=0;L<ha.values.length;L++)Pa=Y(ha.name,ha.values[L],{type:ha.type,parentRow:ha.parentRow,isDeletable:ha.isDeletable,
-index:L,defVal:ha.defVal,countProperty:ha.countProperty,size:ha.size},0==L%2,ha.flipBkg),B.parentNode.insertBefore(Pa,B.nextSibling),B=Pa;l.appendChild(ja);Ga();return l};StyleFormatPanel.prototype.addStyles=function(l){function B(ha){mxEvent.addListener(ha,"mouseenter",function(){ha.style.opacity="1"});mxEvent.addListener(ha,"mouseleave",function(){ha.style.opacity="0.5"})}var L=this.editorUi,P=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
-O.style.paddingRight="20px";l.style.paddingLeft="16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(O);var R="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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
-document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ha){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ha)}))})(aa);W.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ha){null!=W[ha]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&
-(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ha,ba(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ha){var ra=mxUtils.bind(this,function(Ga){var Ea=mxUtils.button("",mxUtils.bind(this,function(Aa){P.getModel().beginUpdate();try{for(var Fa=L.getSelectionState().cells,qa=0;qa<Fa.length;qa++){for(var Ba=P.getModel().getStyle(Fa[qa]),Ra=0;Ra<R.length;Ra++)Ba=mxUtils.removeStylename(Ba,
-R[Ra]);var xa=P.getModel().isVertex(Fa[qa])?P.defaultVertexStyle:P.defaultEdgeStyle;null!=Ga?(mxEvent.isShiftDown(Aa)||(Ba=""==Ga.fill?mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,Ga.fill||mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,null)),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,Ga.gradient||mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!P.getModel().isVertex(Fa[qa])||
-(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,Ga.font||mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Aa)||(Ba=""==Ga.stroke?mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,Ga.stroke||mxUtils.getValue(xa,mxConstants.STYLE_STROKECOLOR,null)))):(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(xa,
-mxConstants.STYLE_STROKECOLOR,"#000000")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),P.getModel().isVertex(Fa[qa])&&(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null))));P.getModel().setStyle(Fa[qa],Ba)}}finally{P.getModel().endUpdate()}}));Ea.className="geStyleButton";Ea.style.width="36px";Ea.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ea.style.margin="0px 6px 6px 0px";
-if(null!=Ga){var za="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ga.border&&(za=Ga.border);null!=Ga.gradient?mxClient.IS_IE&&10>document.documentMode?Ea.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ga.fill+"', EndColorStr='"+Ga.gradient+"', GradientType=0)":Ea.style.backgroundImage="linear-gradient("+Ga.fill+" 0px,"+Ga.gradient+" 100%)":Ga.fill==mxConstants.NONE?Ea.style.background="url('"+Dialog.prototype.noColorImage+"')":Ea.style.backgroundColor=""==Ga.fill?
-mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ga.fill||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ea.style.border=Ga.stroke==mxConstants.NONE?za+" transparent":""==Ga.stroke?za+" "+mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):za+" "+(Ga.stroke||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ga.title&&Ea.setAttribute("title",Ga.title)}else{za=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Pa=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ea.style.backgroundColor=za;Ea.style.border="1px solid "+Pa}Ea.style.borderRadius="0";O.appendChild(Ea)});O.innerText="";for(var ma=0;ma<ha.length;ma++)0<ma&&0==mxUtils.mod(ma,4)&&mxUtils.br(O),ra(ha[ma])});null==this.format.currentScheme?
-Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ja=document.createElement("div");ja.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(l.appendChild(fa),l.appendChild(ja));mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));B(fa);B(ja);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(S);return l};StyleFormatPanel.prototype.addEditOps=function(l){var B=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,P=null;1==B.cells.length&&(P=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),P.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),P.style.width="210px",P.style.marginBottom="2px",l.appendChild(P));L=1==B.cells.length?L.view.getState(B.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(B=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),B.setAttribute("title",
-mxResources.get("editShape")),B.style.marginBottom="2px",null==P?B.style.width="210px":(P.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),l.appendChild(B)):B.image&&0<B.cells.length&&(B=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),B.setAttribute("title",mxResources.get("editImage")),B.style.marginBottom="2px",null==P?B.style.width="210px":(P.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),
-l.appendChild(B));return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.createFontElement=function(l,
-B){var L=Graph.fontMapping[B];null==L&&Graph.isCssFontUrl(B)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",B)):(null==L&&(L='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+B+'");\n}'),l=document.createElement("style"),mxUtils.write(l,L));return l};Graph.addFont=function(l,B,L){if(null!=l&&0<l.length&&null!=B&&0<B.length){var P=l.toLowerCase();if("helvetica"!=P&&"arial"!=l&&"sans-serif"!=
-P){var O=Graph.customFontElements[P];null!=O&&O.url!=B&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=B,"http:"==B.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(B)),O={name:l,url:B,elt:Graph.createFontElement(l,O)},Graph.customFontElements[P]=O,Graph.recentCustomFonts[P]=O,B=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=B&&B.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
-return l};Graph.getFontUrl=function(l,B){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(B=l.url);return B};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var B=0;B<l.length;B++){var L=l[B].getAttribute("data-font-src");if(null!=L){var P="FONT"==l[B].nodeName?l[B].getAttribute("face"):l[B].style.fontFamily;null!=P&&Graph.addFont(P,L)}}};Graph.processFontStyle=function(l){if(null!=l){var B=mxUtils.getValue(l,"fontSource",null);if(null!=B){var L=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,
-null);null!=L&&Graph.addFont(L,decodeURIComponent(B))}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function l(O){B=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){B=null});this.isMouseInsertPoint=function(){return null!=B};var L=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):L.apply(this,arguments)};var P=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom=
-R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return P.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,B){return Graph.processFontStyle(y.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,B,L,P,O,R,S,W,aa,Y,Z){A.apply(this,arguments);Graph.processFontAttributes(Z)};
-var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,B,L){function P(){for(var ha=S.getSelectionCells(),ra=[],ma=0;ma<ha.length;ma++)S.isCellVisible(ha[ma])&&ra.push(ha[ma]);S.setSelectionCells(ra)}function O(ha){S.setHiddenTags(ha?[]:W.slice());P();S.refresh()}function R(ha,ra){Y.innerText="";if(0<ha.length){var ma=document.createElement("table");
-ma.setAttribute("cellpadding","2");ma.style.boxSizing="border-box";ma.style.tableLayout="fixed";ma.style.width="100%";var Ga=document.createElement("tbody");if(null!=ha&&0<ha.length)for(var Ea=0;Ea<ha.length;Ea++)(function(za){var Pa=0>mxUtils.indexOf(S.hiddenTags,za),Aa=document.createElement("tr"),Fa=document.createElement("td");Fa.style.align="center";Fa.style.width="16px";var qa=document.createElement("img");qa.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);qa.setAttribute("title",
-mxResources.get(Pa?"hideIt":"show",[za]));mxUtils.setOpacity(qa,Pa?75:25);qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(B||Editor.isDarkMode())qa.style.filter="invert(100%)";Fa.appendChild(qa);mxEvent.addListener(qa,"click",function(Ra){mxEvent.isShiftDown(Ra)?O(0<=mxUtils.indexOf(S.hiddenTags,za)):(S.toggleHiddenTag(za),P(),S.refresh());mxEvent.consume(Ra)});Aa.appendChild(Fa);Fa=document.createElement("td");Fa.style.overflow="hidden";Fa.style.whiteSpace="nowrap";
-Fa.style.textOverflow="ellipsis";Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.setAttribute("title",za);a=document.createElement("a");mxUtils.write(a,za);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Fa.appendChild(a);mxEvent.addListener(Fa,"click",function(Ra){if(mxEvent.isShiftDown(Ra)){O(!0);var xa=S.getCellsForTags([za],null,null,!0);S.isEnabled()?S.setSelectionCells(xa):S.highlightCells(xa)}else if(Pa&&0<S.hiddenTags.length)O(!0);else{xa=
-W.slice();var Da=mxUtils.indexOf(xa,za);xa.splice(Da,1);S.setHiddenTags(xa);P();S.refresh()}mxEvent.consume(Ra)});Aa.appendChild(Fa);if(S.isEnabled()){Fa=document.createElement("td");Fa.style.verticalAlign="middle";Fa.style.textAlign="center";Fa.style.width="18px";if(null==ra){Fa.style.align="center";Fa.style.width="16px";qa=document.createElement("img");qa.setAttribute("src",Editor.crossImage);qa.setAttribute("title",mxResources.get("removeIt",[za]));mxUtils.setOpacity(qa,Pa?75:25);qa.style.verticalAlign=
-"middle";qa.style.cursor="pointer";qa.style.width="16px";if(B||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(Ra){var xa=mxUtils.indexOf(W,za);0<=xa&&W.splice(xa,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[za]);S.refresh();mxEvent.consume(Ra)});Fa.appendChild(qa)}else{var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.margin="0px";Ba.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,za);Ba.checked=Ba.defaultChecked;
-Ba.style.background="transparent";Ba.setAttribute("title",mxResources.get(Ba.defaultChecked?"removeIt":"add",[za]));mxEvent.addListener(Ba,"change",function(Ra){Ba.checked?S.addTagsForCells(S.getSelectionCells(),[za]):S.removeTagsForCells(S.getSelectionCells(),[za]);mxEvent.consume(Ra)});Fa.appendChild(Ba)}Aa.appendChild(Fa)}Ga.appendChild(Aa)})(ha[Ea]);ma.appendChild(Ga);Y.appendChild(ma)}}var S=this,W=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow=
-"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ha){S.setHiddenTags([]);mxEvent.isShiftDown(ha)||
-(W=S.hiddenTags.slice());P();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(W,function(ha){W=ha;fa()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){W=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ha,ra){if(l()){ha=S.getAllTags();for(ra=0;ra<ha.length;ra++)0>mxUtils.indexOf(W,
-ha[ra])&&W.push(ha[ra]);W.sort();S.isSelectionEmpty()?R(W):R(W,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,fa);S.model.addListener(mxEvent.CHANGE,fa);S.addListener(mxEvent.REFRESH,fa);var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.whiteSpace="nowrap";ja.style.position="absolute";ja.style.overflow="hidden";ja.style.bottom="0px";ja.style.height="42px";ja.style.right="10px";ja.style.left="10px";S.isEnabled()&&(ja.appendChild(Z),
-ja.appendChild(ba),aa.appendChild(ja));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var B in Graph.customFontElements){var L=Graph.customFontElements[B];l.push({name:L.name,url:L.url})}return l};Graph.prototype.setFont=function(l,B){Graph.addFont(l,B);document.execCommand("fontname",!1,l);if(null!=B){var L=this.cellEditor.textarea.getElementsByTagName("font");B=Graph.getFontUrl(l,B);for(var P=0;P<L.length;P++)L[P].getAttribute("face")==
-l&&L[P].getAttribute("data-font-src")!=B&&L[P].setAttribute("data-font-src",B)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var B in l)this.globalVars[B]=
-l[B]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var B=M.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[l]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,B,L,P,O,R,S,W,aa,Y,Z,ba,fa,ja){var ha=null,ra=null,ma=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ha=this.stylesheet,ra=this.shapeForegroundColor,ma=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ga=E.apply(this,arguments),Ea=this.getCustomFonts();if(Z&&0<Ea.length){var za=Ga.ownerDocument,Pa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?Pa.setAttributeNS("type","text/css"):Pa.setAttribute("type","text/css");for(var Aa="",Fa="",qa=0;qa<Ea.length;qa++){var Ba=Ea[qa].name,Ra=Ea[qa].url;Graph.isCssFontUrl(Ra)?
-Aa+="@import url("+Ra+");\n":Fa+='@font-face {\nfont-family: "'+Ba+'";\nsrc: url("'+Ra+'");\n}\n'}Pa.appendChild(za.createTextNode(Aa+Fa));Ga.getElementsByTagName("defs")[0].appendChild(Pa)}this.mathEnabled&&(document.body.appendChild(Ga),Editor.MathJaxRender(Ga),Ga.parentNode.removeChild(Ga));null!=ha&&(this.shapeBackgroundColor=ma,this.shapeForegroundColor=ra,this.stylesheet=ha,this.refresh());return Ga};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){Q.apply(this,
-arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var n=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){n.apply(this,arguments);this.enumerationState=0};var v=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return v.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var B="1"==mxUtils.getValue(l.style,"enumerate",0);B&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):B||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);B=l.secondLabel;if(null!=B){var L=l.view.scale,P=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*L,l.y+4*L,0,0):mxRectangle.fromPoint(l.view.getPoint(l));B.bounds.equals(l)&&B.value==P&&B.scale==L||(B.bounds=l,B.value=P,B.scale=
-L,B.redraw())}};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var l=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;",l.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,l.ownerSVGElement))}};var H=Graph.prototype.refresh;Graph.prototype.refresh=function(){H.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var K=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){K.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=
-l.actions&&this.executeCustomActions(l.actions))};Graph.prototype.executeCustomActions=function(l,B){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,P=0,O=0,R=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<P&&P--;0==P&&aa()}),aa=mxUtils.bind(this,function(){if(O<l.length){var Y=this.stoppingCustomActions,Z=l[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,W,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,W,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(R(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));fa=[];null!=Z.select&&this.isEnabled()&&(fa=this.getCellsForAction(Z.select),this.setSelectionCells(fa));null!=Z.highlight&&(fa=this.getCellsForAction(Z.highlight),this.highlightCells(fa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ja=this.getAllTags(),ha=0;ha<ja.length;ha++)0>mxUtils.indexOf(Z.tags.visible,ja[ha])&&0>mxUtils.indexOf(fa,ja[ha])&&fa.push(ja[ha]);this.setHiddenTags(fa);this.refresh()}0<ba.length&&(P++,this.executeAnimations(ba,W,Y?1:Z.steps,Y?0:Z.delay));
-0==P?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=B&&B()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,B){var L=this.getLinkForCell(B);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(l,L));if(this.isHtmlLabel(B)){var P=document.createElement("div");P.innerHTML=this.sanitizeHtml(this.getLabel(B));for(var O=P.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"==
-L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(l,L)),R=!0);R&&this.labelChanged(B,P.innerHTML)}};Graph.prototype.updateCustomLink=function(l,B){if("data:action/json,"==B.substring(0,17))try{var L=JSON.parse(B.substring(17));null!=L.actions&&(this.updateCustomLinkActions(l,L.actions),B="data:action/json,"+JSON.stringify(L))}catch(P){}return B};Graph.prototype.updateCustomLinkActions=function(l,B){for(var L=0;L<B.length;L++){var P=B[L],O;for(O in P)this.updateCustomLinkAction(l,
-P[O],"cells"),this.updateCustomLinkAction(l,P[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,B,L){if(null!=B&&null!=B[L]){for(var P=[],O=0;O<B[L].length;O++)if("*"==B[L][O])P.push(B[L][O]);else{var R=l[B[L][O]];null!=R?""!=R&&P.push(R):P.push(B[L][O])}B[L]=P}};Graph.prototype.getCellsForAction=function(l,B){B=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,B));if(null!=l.excludeCells){for(var L=[],P=0;P<B.length;P++)0>l.excludeCells.indexOf(B[P].id)&&L.push(B[P]);
-B=L}return B};Graph.prototype.getCellsById=function(l){var B=[];if(null!=l)for(var L=0;L<l.length;L++)if("*"==l[L]){var P=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(R){return R!=P},P))}else{var O=this.model.getCell(l[L]);null!=O&&B.push(O)}return B};var G=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return G.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(l){var B=mxUtils.indexOf(this.hiddenTags,l);0>B?this.hiddenTags.push(l):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var B=0;B<l.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,l[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,B,L,
-P){var O=[];if(null!=l){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},W=0;W<l.length;W++)0<l[W].length&&(S[l[W]]=!0,R++);for(W=0;W<B.length;W++)if(L&&this.model.getParent(B[W])==this.model.root||this.model.isVertex(B[W])||this.model.isEdge(B[W])){var aa=this.getTagsForCell(B[W]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=l.length)){for(var Z=Y=0;Z<aa.length&&Y<R;Z++)null!=S[aa[Z]]&&Y++;Y=Y==R}Y&&(1!=P||this.isCellVisible(B[W]))&&O.push(B[W])}}return O};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var B=null,L=[],P=0;P<l.length;P++){var O=this.getTagsForCell(l[P]);L=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==B||null!=B[O[S]])R[O[S]]=!0,L.push(O[S]);B=R}else return[]}return L};Graph.prototype.getTagsForCells=function(l){for(var B=[],L={},P=0;P<l.length;P++){var O=this.getTagsForCell(l[P]);if(0<O.length){O=O.split(" ");for(var R=
-0;R<O.length;R++)null==L[O[R]]&&(L[O[R]]=!0,B.push(O[R]))}}return B};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){for(var P=this.getTagsForCell(l[L]),O=P.split(" "),R=!1,S=0;S<B.length;S++){var W=mxUtils.trim(B[S]);""!=W&&0>mxUtils.indexOf(O,W)&&(P=0<P.length?P+" "+W:W,R=!0)}R&&this.setAttributeForCell(l[L],"tags",P)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){var P=this.getTagsForCell(l[L]);if(0<P.length){for(var O=P.split(" "),R=!1,S=0;S<B.length;S++){var W=mxUtils.indexOf(O,B[S]);0<=W&&(O.splice(W,1),R=!0)}R&&this.setAttributeForCell(l[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var B=0;B<l.length;B++)this.model.setVisible(l[B],!this.model.isVisible(l[B]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(l,B){this.model.beginUpdate();try{for(var L=0;L<l.length;L++)this.model.setVisible(l[L],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,B,L,P){for(var O=0;O<l.length;O++)this.highlightCell(l[O],B,L,P)};Graph.prototype.highlightCell=function(l,B,L,P,O){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;l=this.view.getState(l);var R=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,
-1)+O),R=new mxCellHighlight(this,B,O,!1),null!=P&&(R.opacity=P),R.highlight(l),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},L));return R};Graph.prototype.addSvgShadow=function(l,B,L,P){L=null!=L?L:!1;P=null!=P?P:!0;var O=l.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
-this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
-"offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=l.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=S[0];O.appendChild(R);L||(B=null!=B?B:l.getElementsByTagName("g")[0],
-null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&P&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),B=l.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,l.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(l,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=
-null!=B?B:!0,(this.shadowVisible=l)?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 l=this.model.getChildCount(this.model.root),B=0;do var L=this.model.getChildAt(this.model.root,B);while(B++<l&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};
+function(m,z,K){if(null!=z){var Q=function(U){if(null!=U)if(K)for(var T=0;T<U.length;T++)z[U[T].name]=U[T];else for(var W in z){var Z=!1;for(T=0;T<U.length;T++)if(U[T].name==W&&U[T].type==z[W].type){Z=!0;break}Z||delete z[W]}},N=this.editorUi.editor.graph.view.getState(m);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),Q(N.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{Q(JSON.parse(m))}catch(U){}}};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);if(Editor.enableCustomProperties){for(var z=
+{},K=m.vertices,Q=m.edges,N=0;N<K.length;N++)this.findCommonProperties(K[N],z,0==N);for(N=0;N<Q.length;N++)this.findCommonProperties(Q[N],z,0==K.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){this.addActions(m,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(m,z,K){function Q(ua,Ca,Ba,La){fa.getModel().beginUpdate();try{var ma=[],ea=[];if(null!=Ba.index){for(var aa=[],na=Ba.parentRow.nextSibling;na&&na.getAttribute("data-pName")==ua;)aa.push(na.getAttribute("data-pValue")),na=na.nextSibling;Ba.index<aa.length?null!=La?aa.splice(La,1):aa[Ba.index]=Ca:aa.push(Ca);null!=Ba.size&&aa.length>Ba.size&&(aa=aa.slice(0,Ba.size));Ca=aa.join(",");null!=Ba.countProperty&&(fa.setCellStyles(Ba.countProperty,aa.length,
+fa.getSelectionCells()),ma.push(Ba.countProperty),ea.push(aa.length))}fa.setCellStyles(ua,Ca,fa.getSelectionCells());ma.push(ua);ea.push(Ca);if(null!=Ba.dependentProps)for(ua=0;ua<Ba.dependentProps.length;ua++){var la=Ba.dependentPropsDefVal[ua],pa=Ba.dependentPropsVals[ua];if(pa.length>Ca)pa=pa.slice(0,Ca);else for(var ia=pa.length;ia<Ca;ia++)pa.push(la);pa=pa.join(",");fa.setCellStyles(Ba.dependentProps[ua],pa,fa.getSelectionCells());ma.push(Ba.dependentProps[ua]);ea.push(pa)}if("function"==typeof Ba.onChange)Ba.onChange(fa,
+Ca);ba.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ea,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(ua,Ca,Ba){var La=mxUtils.getOffset(m,!0),ma=mxUtils.getOffset(ua,!0);Ca.style.position="absolute";Ca.style.left=ma.x-La.x+"px";Ca.style.top=ma.y-La.y+"px";Ca.style.width=ua.offsetWidth+"px";Ca.style.height=ua.offsetHeight-(Ba?4:0)+"px";Ca.style.zIndex=5}function U(ua,Ca,Ba){var La=document.createElement("div");La.style.width="32px";La.style.height=
+"4px";La.style.margin="2px";La.style.border="1px solid black";La.style.background=Ca&&"none"!=Ca?Ca:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ba,function(ma){this.editorUi.pickColor(Ca,function(ea){La.style.background="none"==ea?"url('"+Dialog.prototype.noColorImage+"')":ea;Q(ua,ea,Ba)});mxEvent.consume(ma)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(La);return btn}function T(ua,Ca,Ba,La,ma,ea,aa){null!=Ca&&(Ca=Ca.split(","),
+Y.push({name:ua,values:Ca,type:Ba,defVal:La,countProperty:ma,parentRow:ea,isDeletable:!0,flipBkg:aa}));btn=mxUtils.button("+",mxUtils.bind(ba,function(na){for(var la=ea,pa=0;null!=la.nextSibling;)if(la.nextSibling.getAttribute("data-pName")==ua)la=la.nextSibling,pa++;else break;var ia={type:Ba,parentRow:ea,index:pa,isDeletable:!0,defVal:La,countProperty:ma};pa=ca(ua,"",ia,0==pa%2,aa);Q(ua,La,ia);la.parentNode.insertBefore(pa,la.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function W(ua,Ca,Ba,La,ma,ea,aa){if(0<ma){var na=Array(ma);Ca=null!=Ca?Ca.split(","):[];for(var la=0;la<ma;la++)na[la]=null!=Ca[la]?Ca[la]:null!=La?La:"";Y.push({name:ua,values:na,type:Ba,defVal:La,parentRow:ea,flipBkg:aa,size:ma})}return document.createElement("div")}function Z(ua,Ca,Ba){var La=document.createElement("input");La.type="checkbox";La.checked="1"==Ca;mxEvent.addListener(La,"change",function(){Q(ua,La.checked?"1":"0",Ba)});return La}function ca(ua,
+Ca,Ba,La,ma){var ea=Ba.dispName,aa=Ba.type,na=document.createElement("tr");na.className="gePropRow"+(ma?"Dark":"")+(La?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",ua);na.setAttribute("data-pValue",Ca);La=!1;null!=Ba.index&&(na.setAttribute("data-index",Ba.index),ea=(null!=ea?ea:"")+"["+Ba.index+"]",La=!0);var la=document.createElement("td");la.className="gePropRowCell";ea=mxResources.get(ea,null,ea);mxUtils.write(la,ea);la.setAttribute("title",ea);La&&(la.style.textAlign="right");
+na.appendChild(la);la=document.createElement("td");la.className="gePropRowCell";if("color"==aa)la.appendChild(U(ua,Ca,Ba));else if("bool"==aa||"boolean"==aa)la.appendChild(Z(ua,Ca,Ba));else if("enum"==aa){var pa=Ba.enumList;for(ma=0;ma<pa.length;ma++)if(ea=pa[ma],ea.val==Ca){mxUtils.write(la,mxResources.get(ea.dispName,null,ea.dispName));break}mxEvent.addListener(la,"click",mxUtils.bind(ba,function(){var ia=document.createElement("select");N(la,ia);for(var ja=0;ja<pa.length;ja++){var oa=pa[ja],ya=
+document.createElement("option");ya.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ya,mxResources.get(oa.dispName,null,oa.dispName));ia.appendChild(ya)}ia.value=Ca;m.appendChild(ia);mxEvent.addListener(ia,"change",function(){var Aa=mxUtils.htmlEntities(ia.value);Q(ua,Aa,Ba)});ia.focus();mxEvent.addListener(ia,"blur",function(){m.removeChild(ia)})}))}else"dynamicArr"==aa?la.appendChild(T(ua,Ca,Ba.subType,Ba.subDefVal,Ba.countProperty,na,ma)):"staticArr"==aa?la.appendChild(W(ua,Ca,Ba.subType,Ba.subDefVal,
+Ba.size,na,ma)):"readOnly"==aa?(ma=document.createElement("input"),ma.setAttribute("readonly",""),ma.value=Ca,ma.style.width="96px",ma.style.borderWidth="0px",la.appendChild(ma)):(la.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ca)),mxEvent.addListener(la,"click",mxUtils.bind(ba,function(){function ia(){var oa=ja.value;oa=0==oa.length&&"string"!=aa?0:oa;Ba.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",aa="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=Ba.min&&oa<
+Ba.min?oa=Ba.min:null!=Ba.max&&oa>Ba.max&&(oa=Ba.max);oa=encodeURIComponent(("int"==aa?parseInt(oa):oa)+"");Q(ua,oa,Ba)}var ja=document.createElement("input");N(la,ja,!0);ja.value=decodeURIComponent(Ca);ja.className="gePropEditor";"int"!=aa&&"float"!=aa||Ba.allowAuto||(ja.type="number",ja.step="int"==aa?"1":"any",null!=Ba.min&&(ja.min=parseFloat(Ba.min)),null!=Ba.max&&(ja.max=parseFloat(Ba.max)));m.appendChild(ja);mxEvent.addListener(ja,"keypress",function(oa){13==oa.keyCode&&ia()});ja.focus();mxEvent.addListener(ja,
+"blur",function(){ia()})})));Ba.isDeletable&&(ma=mxUtils.button("-",mxUtils.bind(ba,function(ia){Q(ua,"",Ba,Ba.index);mxEvent.consume(ia)})),ma.style.height="16px",ma.style.width="25px",ma.style.float="right",ma.className="geColorBtn",la.appendChild(ma));na.appendChild(la);return na}var ba=this,fa=this.editorUi.editor.graph,Y=[];m.style.position="relative";m.style.padding="0";var ha=document.createElement("table");ha.className="geProperties";ha.style.whiteSpace="nowrap";ha.style.width="100%";var da=
+document.createElement("tr");da.className="gePropHeader";var wa=document.createElement("th");wa.className="gePropHeaderCell";var za=document.createElement("img");za.src=Sidebar.prototype.expandedImage;za.style.verticalAlign="middle";wa.appendChild(za);mxUtils.write(wa,mxResources.get("property"));da.style.cursor="pointer";var xa=function(){var ua=ha.querySelectorAll(".gePropNonHeaderRow");if(ba.editorUi.propertiesCollapsed){za.src=Sidebar.prototype.collapsedImage;var Ca="none";for(var Ba=m.childNodes.length-
+1;0<=Ba;Ba--)try{var La=m.childNodes[Ba],ma=La.nodeName.toUpperCase();"INPUT"!=ma&&"SELECT"!=ma||m.removeChild(La)}catch(ea){}}else za.src=Sidebar.prototype.expandedImage,Ca="";for(Ba=0;Ba<ua.length;Ba++)ua[Ba].style.display=Ca};mxEvent.addListener(da,"click",function(){ba.editorUi.propertiesCollapsed=!ba.editorUi.propertiesCollapsed;xa()});da.appendChild(wa);wa=document.createElement("th");wa.className="gePropHeaderCell";wa.innerHTML=mxResources.get("value");da.appendChild(wa);ha.appendChild(da);
+var ta=!1,ka=!1;da=null;1==K.vertices.length&&0==K.edges.length?da=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(da=K.edges[0].id);null!=da&&ha.appendChild(ca("id",mxUtils.htmlEntities(da),{dispName:"ID",type:"readOnly"},!0,!1));for(var Na in z)if(da=z[Na],"function"!=typeof da.isVisible||da.isVisible(K,this)){var Ka=null!=K.style[Na]?mxUtils.htmlEntities(K.style[Na]+""):null!=da.getDefaultValue?da.getDefaultValue(K,this):da.defVal;if("separator"==da.type)ka=!ka;else{if("staticArr"==
+da.type)da.size=parseInt(K.style[da.sizeProperty]||z[da.sizeProperty].defVal)||0;else if(null!=da.dependentProps){var Ea=da.dependentProps,ra=[],qa=[];for(wa=0;wa<Ea.length;wa++){var Oa=K.style[Ea[wa]];qa.push(z[Ea[wa]].subDefVal);ra.push(null!=Oa?Oa.split(","):[])}da.dependentPropsDefVal=qa;da.dependentPropsVals=ra}ha.appendChild(ca(Na,Ka,da,ta,ka));ta=!ta}}for(wa=0;wa<Y.length;wa++)for(da=Y[wa],z=da.parentRow,K=0;K<da.values.length;K++)Na=ca(da.name,da.values[K],{type:da.type,parentRow:da.parentRow,
+isDeletable:da.isDeletable,index:K,defVal:da.defVal,countProperty:da.countProperty,size:da.size},0==K%2,da.flipBkg),z.parentNode.insertBefore(Na,z.nextSibling),z=Na;m.appendChild(ha);xa();return m};StyleFormatPanel.prototype.addStyles=function(m){function z(da){mxEvent.addListener(da,"mouseenter",function(){da.style.opacity="1"});mxEvent.addListener(da,"mouseleave",function(){da.style.opacity="0.5"})}var K=this.editorUi,Q=K.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";
+N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var U="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(" "),T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var W=[],Z=0;Z<this.defaultColorSchemes.length;Z++){var ca=
+document.createElement("div");ca.style.display="inline-block";ca.style.width="6px";ca.style.height="6px";ca.style.marginLeft="4px";ca.style.marginRight="3px";ca.style.borderRadius="3px";ca.style.cursor="pointer";ca.style.background="transparent";ca.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(da){mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){ba(da)}))})(Z);W.push(ca);T.appendChild(ca)}var ba=mxUtils.bind(this,function(da){null!=W[da]&&(null!=this.format.currentScheme&&
+null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=da,fa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(da){var wa=mxUtils.bind(this,function(xa){var ta=mxUtils.button("",mxUtils.bind(this,function(Ka){Q.getModel().beginUpdate();try{for(var Ea=K.getSelectionState().cells,ra=0;ra<Ea.length;ra++){for(var qa=Q.getModel().getStyle(Ea[ra]),
+Oa=0;Oa<U.length;Oa++)qa=mxUtils.removeStylename(qa,U[Oa]);var ua=Q.getModel().isVertex(Ea[ra])?Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=xa?(mxEvent.isShiftDown(Ka)||(qa=""==xa.fill?mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,xa.fill||mxUtils.getValue(ua,mxConstants.STYLE_FILLCOLOR,null)),qa=mxUtils.setStyle(qa,mxConstants.STYLE_GRADIENTCOLOR,xa.gradient||mxUtils.getValue(ua,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ka)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(Ka)||!Q.getModel().isVertex(Ea[ra])||(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FONTCOLOR,xa.font||mxUtils.getValue(ua,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ka)||(qa=""==xa.stroke?mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,xa.stroke||mxUtils.getValue(ua,mxConstants.STYLE_STROKECOLOR,null)))):(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ua,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),qa=mxUtils.setStyle(qa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ua,mxConstants.STYLE_STROKECOLOR,"#000000")),qa=mxUtils.setStyle(qa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ua,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(Ea[ra])&&(qa=mxUtils.setStyle(qa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ua,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(Ea[ra],qa)}}finally{Q.getModel().endUpdate()}}));ta.className="geStyleButton";ta.style.width="36px";
+ta.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ta.style.margin="0px 6px 6px 0px";if(null!=xa){var ka="1"==urlParams.sketch?"2px solid":"1px solid";null!=xa.border&&(ka=xa.border);null!=xa.gradient?mxClient.IS_IE&&10>document.documentMode?ta.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+xa.fill+"', EndColorStr='"+xa.gradient+"', GradientType=0)":ta.style.backgroundImage="linear-gradient("+xa.fill+" 0px,"+xa.gradient+" 100%)":xa.fill==mxConstants.NONE?
+ta.style.background="url('"+Dialog.prototype.noColorImage+"')":ta.style.backgroundColor=""==xa.fill?mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):xa.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");ta.style.border=xa.stroke==mxConstants.NONE?ka+" transparent":""==xa.stroke?ka+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?
+"#ffffff":Editor.darkColor):ka+" "+(xa.stroke||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=xa.title&&ta.setAttribute("title",xa.title)}else{ka=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Na=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ta.style.backgroundColor=ka;ta.style.border="1px solid "+Na}ta.style.borderRadius="0";N.appendChild(ta)});N.innerText=
+"";for(var za=0;za<da.length;za++)0<za&&0==mxUtils.mod(za,4)&&mxUtils.br(N),wa(da[za])});null==this.format.currentScheme?ba(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ba(this.format.currentScheme);Z=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ha));mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ha);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(T);return m};StyleFormatPanel.prototype.addEditOps=function(m){var z=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,Q=null;1==z.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(N){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",m.appendChild(Q));K=1==z.cells.length?K.view.getState(z.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(z=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(N){this.editorUi.actions.get("editShape").funct()})),z.setAttribute("title",
+mxResources.get("editShape")),z.style.marginBottom="2px",null==Q?z.style.width="210px":(Q.style.width="104px",z.style.width="104px",z.style.marginLeft="2px"),m.appendChild(z)):z.image&&0<z.cells.length&&(z=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(N){this.editorUi.actions.get("image").funct()})),z.setAttribute("title",mxResources.get("editImage")),z.style.marginBottom="2px",null==Q?z.style.width="210px":(Q.style.width="104px",z.style.width="104px",z.style.marginLeft="2px"),
+m.appendChild(z));return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.createFontElement=function(m,
+z){var K=Graph.fontMapping[z];null==K&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",z)):(null==K&&(K='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,K));return m};Graph.addFont=function(m,z,K){if(null!=m&&0<m.length&&null!=z&&0<z.length){var Q=m.toLowerCase();if("helvetica"!=Q&&"arial"!=m&&"sans-serif"!=
+Q){var N=Graph.customFontElements[Q];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:m,url:z,elt:Graph.createFontElement(m,N)},Graph.customFontElements[Q]=N,Graph.recentCustomFonts[Q]=N,z=document.getElementsByTagName("head")[0],null!=K&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=K,N.elt.onerror=K):K()),null!=z&&z.appendChild(N.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
+return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var K=m[z].getAttribute("data-font-src");if(null!=K){var Q="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=Q&&Graph.addFont(Q,K)}}};Graph.processFontStyle=function(m){if(null!=m){var z=mxUtils.getValue(m,"fontSource",null);if(null!=z){var K=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,
+null);null!=K&&Graph.addFont(K,decodeURIComponent(z))}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var p=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}p.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=z};var K=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):K.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var U=this.graph.getCellStyle(N);if(null!=U&&"rack"==U.childLayout){var T=new mxStackLayout(this.graph,!1);T.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;T.marginLeft=U.marginLeft||0;T.marginRight=U.marginRight||0;T.marginTop=U.marginTop||0;T.marginBottom=
+U.marginBottom||0;T.allowGaps=U.allowGaps||0;T.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");T.resizeParent=!1;T.fill=!0;return T}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var n=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(n.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,K,Q,N,U,T,W,Z,ca,ba){t.apply(this,arguments);Graph.processFontAttributes(ba)};
+var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,K){function Q(){for(var da=T.getSelectionCells(),wa=[],za=0;za<da.length;za++)T.isCellVisible(da[za])&&wa.push(da[za]);T.setSelectionCells(wa)}function N(da){T.setHiddenTags(da?[]:W.slice());Q();T.refresh()}function U(da,wa){ca.innerText="";if(0<da.length){var za=document.createElement("table");
+za.setAttribute("cellpadding","2");za.style.boxSizing="border-box";za.style.tableLayout="fixed";za.style.width="100%";var xa=document.createElement("tbody");if(null!=da&&0<da.length)for(var ta=0;ta<da.length;ta++)(function(ka){var Na=0>mxUtils.indexOf(T.hiddenTags,ka),Ka=document.createElement("tr"),Ea=document.createElement("td");Ea.style.align="center";Ea.style.width="16px";var ra=document.createElement("img");ra.setAttribute("src",Na?Editor.visibleImage:Editor.hiddenImage);ra.setAttribute("title",
+mxResources.get(Na?"hideIt":"show",[ka]));mxUtils.setOpacity(ra,Na?75:25);ra.style.verticalAlign="middle";ra.style.cursor="pointer";ra.style.width="16px";if(z||Editor.isDarkMode())ra.style.filter="invert(100%)";Ea.appendChild(ra);mxEvent.addListener(ra,"click",function(Oa){mxEvent.isShiftDown(Oa)?N(0<=mxUtils.indexOf(T.hiddenTags,ka)):(T.toggleHiddenTag(ka),Q(),T.refresh());mxEvent.consume(Oa)});Ka.appendChild(Ea);Ea=document.createElement("td");Ea.style.overflow="hidden";Ea.style.whiteSpace="nowrap";
+Ea.style.textOverflow="ellipsis";Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.setAttribute("title",ka);a=document.createElement("a");mxUtils.write(a,ka);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Na?100:40);Ea.appendChild(a);mxEvent.addListener(Ea,"click",function(Oa){if(mxEvent.isShiftDown(Oa)){N(!0);var ua=T.getCellsForTags([ka],null,null,!0);T.isEnabled()?T.setSelectionCells(ua):T.highlightCells(ua)}else if(Na&&0<T.hiddenTags.length)N(!0);else{ua=
+W.slice();var Ca=mxUtils.indexOf(ua,ka);ua.splice(Ca,1);T.setHiddenTags(ua);Q();T.refresh()}mxEvent.consume(Oa)});Ka.appendChild(Ea);if(T.isEnabled()){Ea=document.createElement("td");Ea.style.verticalAlign="middle";Ea.style.textAlign="center";Ea.style.width="18px";if(null==wa){Ea.style.align="center";Ea.style.width="16px";ra=document.createElement("img");ra.setAttribute("src",Editor.crossImage);ra.setAttribute("title",mxResources.get("removeIt",[ka]));mxUtils.setOpacity(ra,Na?75:25);ra.style.verticalAlign=
+"middle";ra.style.cursor="pointer";ra.style.width="16px";if(z||Editor.isDarkMode())ra.style.filter="invert(100%)";mxEvent.addListener(ra,"click",function(Oa){var ua=mxUtils.indexOf(W,ka);0<=ua&&W.splice(ua,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ka]);T.refresh();mxEvent.consume(Oa)});Ea.appendChild(ra)}else{var qa=document.createElement("input");qa.setAttribute("type","checkbox");qa.style.margin="0px";qa.defaultChecked=null!=wa&&0<=mxUtils.indexOf(wa,ka);qa.checked=qa.defaultChecked;
+qa.style.background="transparent";qa.setAttribute("title",mxResources.get(qa.defaultChecked?"removeIt":"add",[ka]));mxEvent.addListener(qa,"change",function(Oa){qa.checked?T.addTagsForCells(T.getSelectionCells(),[ka]):T.removeTagsForCells(T.getSelectionCells(),[ka]);mxEvent.consume(Oa)});Ea.appendChild(qa)}Ka.appendChild(Ea)}xa.appendChild(Ka)})(da[ta]);za.appendChild(xa);ca.appendChild(za)}}var T=this,W=T.hiddenTags.slice(),Z=document.createElement("div");Z.style.userSelect="none";Z.style.overflow=
+"hidden";Z.style.padding="10px";Z.style.height="100%";var ca=document.createElement("div");ca.style.boxSizing="border-box";ca.style.borderRadius="4px";ca.style.userSelect="none";ca.style.overflow="auto";ca.style.position="absolute";ca.style.left="10px";ca.style.right="10px";ca.style.top="10px";ca.style.border=T.isEnabled()?"1px solid #808080":"none";ca.style.bottom=T.isEnabled()?"48px":"10px";Z.appendChild(ca);var ba=mxUtils.button(mxResources.get("reset"),function(da){T.setHiddenTags([]);mxEvent.isShiftDown(da)||
+(W=T.hiddenTags.slice());Q();T.refresh()});ba.setAttribute("title",mxResources.get("reset"));ba.className="geBtn";ba.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(W,function(da){W=da;Y()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";T.addListener(mxEvent.ROOT,function(){W=T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(da,wa){if(m()){da=T.getAllTags();for(wa=0;wa<da.length;wa++)0>mxUtils.indexOf(W,
+da[wa])&&W.push(da[wa]);W.sort();T.isSelectionEmpty()?U(W):U(W,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.whiteSpace="nowrap";ha.style.position="absolute";ha.style.overflow="hidden";ha.style.bottom="0px";ha.style.height="42px";ha.style.right="10px";ha.style.left="10px";T.isEnabled()&&(ha.appendChild(ba),
+ha.appendChild(fa),Z.appendChild(ha));return{div:Z,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var K=Graph.customFontElements[z];m.push({name:K.name,url:K.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);document.execCommand("fontname",!1,m);if(null!=z){var K=this.cellEditor.textarea.getElementsByTagName("font");z=Graph.getFontUrl(m,z);for(var Q=0;Q<K.length;Q++)K[Q].getAttribute("face")==
+m&&K[Q].getAttribute("data-font-src")!=z&&K[Q].setAttribute("data-font-src",z)}};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=
+m[z]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=C.apply(this,arguments);null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var u=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,K,Q,N,U,T,W,Z,ca,ba,fa,Y,ha){var da=null,wa=null,za=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(da=this.stylesheet,wa=this.shapeForegroundColor,za=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var xa=u.apply(this,arguments),ta=this.getCustomFonts();if(ba&&0<ta.length){var ka=xa.ownerDocument,Na=null!=ka.createElementNS?ka.createElementNS(mxConstants.NS_SVG,"style"):ka.createElement("style");null!=ka.setAttributeNS?Na.setAttributeNS("type","text/css"):Na.setAttribute("type","text/css");for(var Ka="",Ea="",ra=0;ra<ta.length;ra++){var qa=ta[ra].name,Oa=ta[ra].url;Graph.isCssFontUrl(Oa)?
+Ka+="@import url("+Oa+");\n":Ea+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+Oa+'");\n}\n'}Na.appendChild(ka.createTextNode(Ka+Ea));xa.getElementsByTagName("defs")[0].appendChild(Na)}this.mathEnabled&&(document.body.appendChild(xa),Editor.MathJaxRender(xa),xa.parentNode.removeChild(xa));null!=da&&(this.shapeBackgroundColor=za,this.shapeForegroundColor=wa,this.stylesheet=da,this.refresh());return xa};var R=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){R.apply(this,
+arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var l=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){l.apply(this,arguments);this.enumerationState=0};var q=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return q.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var K=m.view.scale,Q=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*K,m.y+4*K,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==Q&&z.scale==K||(z.bounds=m,z.value=Q,z.scale=
+K,z.redraw())}};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){B.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var m=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;",m.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,m.ownerSVGElement))}};var J=Graph.prototype.refresh;Graph.prototype.refresh=function(){J.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=
+m.actions&&this.executeCustomActions(m.actions))};Graph.prototype.executeCustomActions=function(m,z){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var K=!1,Q=0,N=0,U=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){K&&(K=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&Z()}),Z=mxUtils.bind(this,function(){if(N<m.length){var ca=this.stoppingCustomActions,ba=m[N++],fa=[];if(null!=ba.open)if(T(),this.isCustomLink(ba.open)){if(!this.customLinkClicked(ba.open))return}else this.openLink(ba.open);null==ba.wait||ca||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=ba.wait?parseInt(ba.wait):1E3),T());null!=ba.opacity&&null!=ba.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ba.opacity,!0)),ba.opacity.value);null!=ba.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeIn,!0)),0,1,W,ca?0:ba.fadeIn.delay));null!=ba.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeOut,!0)),1,0,W,ca?0:ba.fadeOut.delay));null!=ba.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeIn,
+!0),!0)));null!=ba.wipeOut&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeOut,!0),!1)));null!=ba.toggle&&(U(),this.toggleCells(this.getCellsForAction(ba.toggle,!0)));if(null!=ba.show){U();var Y=this.getCellsForAction(ba.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Y),1);this.setCellsVisible(Y,!0)}null!=ba.hide&&(U(),Y=this.getCellsForAction(ba.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Y),0),this.setCellsVisible(Y,!1));null!=ba.toggleStyle&&null!=ba.toggleStyle.key&&
+(U(),this.toggleCellStyles(ba.toggleStyle.key,null!=ba.toggleStyle.defaultValue?ba.toggleStyle.defaultValue:"0",this.getCellsForAction(ba.toggleStyle,!0)));null!=ba.style&&null!=ba.style.key&&(U(),this.setCellStyles(ba.style.key,ba.style.value,this.getCellsForAction(ba.style,!0)));Y=[];null!=ba.select&&this.isEnabled()&&(Y=this.getCellsForAction(ba.select),this.setSelectionCells(Y));null!=ba.highlight&&(Y=this.getCellsForAction(ba.highlight),this.highlightCells(Y,ba.highlight.color,ba.highlight.duration,
+ba.highlight.opacity));null!=ba.scroll&&(Y=this.getCellsForAction(ba.scroll));null!=ba.viewbox&&this.fitWindow(ba.viewbox,ba.viewbox.border);0<Y.length&&this.scrollCellToVisible(Y[0]);if(null!=ba.tags){Y=[];null!=ba.tags.hidden&&(Y=Y.concat(ba.tags.hidden));if(null!=ba.tags.visible)for(var ha=this.getAllTags(),da=0;da<ha.length;da++)0>mxUtils.indexOf(ba.tags.visible,ha[da])&&0>mxUtils.indexOf(Y,ha[da])&&Y.push(ha[da]);this.setHiddenTags(Y);this.refresh()}0<fa.length&&(Q++,this.executeAnimations(fa,
+W,ca?1:ba.steps,ca?0:ba.delay));0==Q?Z():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=z&&z()});Z()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var K=this.getLinkForCell(z);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,K));if(this.isHtmlLabel(z)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(z));for(var N=Q.getElementsByTagName("a"),U=!1,T=0;T<N.length;T++)K=N[T].getAttribute("href"),
+null!=K&&"data:action/json,"==K.substring(0,17)&&(N[T].setAttribute("href",this.updateCustomLink(m,K)),U=!0);U&&this.labelChanged(z,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var K=JSON.parse(z.substring(17));null!=K.actions&&(this.updateCustomLinkActions(m,K.actions),z="data:action/json,"+JSON.stringify(K))}catch(Q){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var K=0;K<z.length;K++){var Q=z[K],N;for(N in Q)this.updateCustomLinkAction(m,
+Q[N],"cells"),this.updateCustomLinkAction(m,Q[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,K){if(null!=z&&null!=z[K]){for(var Q=[],N=0;N<z[K].length;N++)if("*"==z[K][N])Q.push(z[K][N]);else{var U=m[z[K][N]];null!=U?""!=U&&Q.push(U):Q.push(z[K][N])}z[K]=Q}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var K=[],Q=0;Q<z.length;Q++)0>m.excludeCells.indexOf(z[Q].id)&&K.push(z[Q]);
+z=K}return z};Graph.prototype.getCellsById=function(m){var z=[];if(null!=m)for(var K=0;K<m.length;K++)if("*"==m[K]){var Q=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(U){return U!=Q},Q))}else{var N=this.model.getCell(m[K]);null!=N&&z.push(N)}return z};var E=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return E.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,K,
+Q){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var U=0,T={},W=0;W<m.length;W++)0<m[W].length&&(T[m[W]]=!0,U++);for(W=0;W<z.length;W++)if(K&&this.model.getParent(z[W])==this.model.root||this.model.isVertex(z[W])||this.model.isEdge(z[W])){var Z=this.getTagsForCell(z[W]),ca=!1;if(0<Z.length&&(Z=Z.split(" "),Z.length>=m.length)){for(var ba=ca=0;ba<Z.length&&ca<U;ba++)null!=T[Z[ba]]&&ca++;ca=ca==U}ca&&(1!=Q||this.isCellVisible(z[W]))&&N.push(z[W])}}return N};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,K=[],Q=0;Q<m.length;Q++){var N=this.getTagsForCell(m[Q]);K=[];if(0<N.length){N=N.split(" ");for(var U={},T=0;T<N.length;T++)if(null==z||null!=z[N[T]])U[N[T]]=!0,K.push(N[T]);z=U}else return[]}return K};Graph.prototype.getTagsForCells=function(m){for(var z=[],K={},Q=0;Q<m.length;Q++){var N=this.getTagsForCell(m[Q]);if(0<N.length){N=N.split(" ");for(var U=
+0;U<N.length;U++)null==K[N[U]]&&(K[N[U]]=!0,z.push(N[U]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var K=0;K<m.length;K++){for(var Q=this.getTagsForCell(m[K]),N=Q.split(" "),U=!1,T=0;T<z.length;T++){var W=mxUtils.trim(z[T]);""!=W&&0>mxUtils.indexOf(N,W)&&(Q=0<Q.length?Q+" "+W:W,U=!0)}U&&this.setAttributeForCell(m[K],"tags",Q)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var K=0;K<m.length;K++){var Q=this.getTagsForCell(m[K]);if(0<Q.length){for(var N=Q.split(" "),U=!1,T=0;T<z.length;T++){var W=mxUtils.indexOf(N,z[T]);0<=W&&(N.splice(W,1),U=!0)}U&&this.setAttributeForCell(m[K],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var K=0;K<m.length;K++)this.model.setVisible(m[K],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,K,Q){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,K,Q)};Graph.prototype.highlightCell=function(m,z,K,Q,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;m=this.view.getState(m);var U=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,
+1)+N),U=new mxCellHighlight(this,z,N,!1),null!=Q&&(U.opacity=Q),U.highlight(m),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},1200)},K));return U};Graph.prototype.addSvgShadow=function(m,z,K,Q){K=null!=K?K:!1;Q=null!=Q?Q:!0;var N=m.ownerDocument,U=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");U.setAttribute("id",
+this.shadowId);var T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");T.setAttribute("in","SourceAlpha");T.setAttribute("stdDeviation",this.svgShadowBlur);T.setAttribute("result","blur");U.appendChild(T);T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");T.setAttribute("in","blur");T.setAttribute("dx",this.svgShadowSize);T.setAttribute("dy",this.svgShadowSize);T.setAttribute("result",
+"offsetBlur");U.appendChild(T);T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");T.setAttribute("flood-color",this.svgShadowColor);T.setAttribute("flood-opacity",this.svgShadowOpacity);T.setAttribute("result","offsetColor");U.appendChild(T);T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");T.setAttribute("in","offsetColor");T.setAttribute("in2","offsetBlur");T.setAttribute("operator","in");
+T.setAttribute("result","offsetBlur");U.appendChild(T);T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");T.setAttribute("in","SourceGraphic");T.setAttribute("in2","offsetBlur");U.appendChild(T);T=m.getElementsByTagName("defs");0==T.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=T[0];N.appendChild(U);K||(z=null!=z?z:m.getElementsByTagName("g")[0],
+null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&Q&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=
+null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),z=0;do var K=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};
mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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=
@@ -11409,353 +11409,356 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
-[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(l){var B=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?B="mxgraph.er":"sysML"==l.substring(0,5)&&(B="mxgraph.sysml"));return B};var N=mxMarker.createMarker;mxMarker.createMarker=function(l,B,L,P,O,R,S,W,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return N.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,
-B,L,P,O,R){"1"==mxUtils.getValue(B.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,arguments)};PrintDialog.prototype.create=function(l,B){function L(){fa.value=Math.max(1,Math.min(W,Math.max(parseInt(fa.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(W,Math.min(parseInt(fa.value),parseInt(ba.value))))}function P(da){function ca(Ia,Na,Oa){var Ma=Ia.useCssTransforms,Sa=Ia.currentTranslate,Ua=Ia.currentScale,Ja=
-Ia.view.translate,Ta=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Va=Ia.getGraphBounds(),Wa=0,$a=0,Xa=Ka.get(),ab=1/Ia.pageScale,Za=Ga.checked;if(Za){ab=parseInt(Da.value);var gb=parseInt(va.value);ab=Math.min(Xa.height*gb/(Va.height/Ia.view.scale),Xa.width*ab/(Va.width/Ia.view.scale))}else ab=parseInt(ma.value)/(100*Ia.pageScale),isNaN(ab)&&(na=1/Ia.pageScale,ma.value="100 %");
-Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ia.pageVisible?(Va=Ia.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Na){Na=PrintDialog.createPrintPreview(Ia,ab,Xa,0,Wa,$a,Za);Na.pageSelector=!1;Na.mathEnabled=!1;ja.checked&&(Na.isCellVisible=function(Ya){return Ia.isCellSelected(Ya)});Wa=l.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var hb=Na.writeHead;Na.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
-(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=l.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(l.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ia.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
-(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Na.renderPage;Na.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
-Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Na.open(null,null,Oa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ia.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Na.backgroundColor=Xa;Na.autoOrigin=Za;Na.appendGraph(Ia,
-ab,Wa,$a,Oa,!0);Oa=Ia.getCustomFonts();if(null!=Na.wnd)for(Wa=0;Wa<Oa.length;Wa++)$a=Oa[Wa].name,Za=Oa[Wa].url,Graph.isCssFontUrl(Za)?Na.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Na.wnd.document.writeln('<style type="text/css">'),Na.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Na.wnd.document.writeln("</style>"))}Ma&&(Ia.useCssTransforms=Ma,
-Ia.currentTranslate=Sa,Ia.currentScale=Ua,Ia.view.translate=Ja,Ia.view.scale=Ta);return Na}var na=parseInt(la.value)/100;isNaN(na)&&(na=1,la.value="100 %");na*=.75;var ka=null,pa=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ka=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,oa=fa.value,ua=!Y.checked,wa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,
-Y.checked,ia,oa,Ga.checked,Da.value,va.value,parseInt(ma.value)/100,parseInt(la.value)/100,Ka.get());else{ua&&(ua=ja.checked||ia==aa&&oa==aa);if(!ua&&null!=l.pages&&l.pages.length){var Ca=0;ua=l.pages.length-1;Y.checked||(Ca=parseInt(ia)-1,ua=parseInt(oa)-1);for(var ya=Ca;ya<=ua;ya++){var ta=l.pages[ya];ia=ta==l.currentPage?O:null;if(null==ia){ia=l.createTemporaryGraph(O.stylesheet);ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ca=!1;var sa=null,
-Ha=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(oa=ta.viewState.pageVisible,Ca=ta.viewState.mathEnabled,sa=ta.viewState.background,Ha=ta.viewState.backgroundImage,ia.extFonts=ta.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=l.createImageForPageLink(Ha.originalSrc,ta));ia.background=sa;ia.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,Ha.height,Ha.x,Ha.y):null;ia.pageVisible=oa;ia.mathEnabled=Ca;var La=ia.getGraphBounds;ia.getGraphBounds=function(){var Ia=
-La.apply(this,arguments),Na=this.backgroundImage;if(null!=Na&&null!=Na.width&&null!=Na.height){var Oa=this.view.translate,Ma=this.view.scale;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Oa.x+Na.x)*Ma,(Oa.y+Na.y)*Ma,Na.width*Ma,Na.height*Ma))}return Ia};var Qa=ia.getGlobalVariable;ia.getGlobalVariable=function(Ia){return"page"==Ia?ta.getName():"pagenumber"==Ia?ya+1:"pagecount"==Ia?null!=l.pages?l.pages.length:1:Qa.apply(this,arguments)};document.body.appendChild(ia.container);l.updatePageRoot(ta);
-ia.model.setRoot(ta.root)}wa=ca(ia,wa,ya!=ua);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else wa=ca(O);null==wa?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(wa.mathEnabled&&(ua=wa.wnd.document,da&&(wa.wnd.IMMEDIATE_PRINT=!0),ua.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),wa.closeDocument(),!wa.mathEnabled&&da&&PrintDialog.printPreview(wa));null!=ka&&(O.shapeForegroundColor=pa,O.shapeBackgroundColor=ea,O.stylesheet=
-ka,O.refresh())}}var O=l.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,B||mxResources.get("print"));R.appendChild(S);var W=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
-"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);B=document.createElement("span");mxUtils.write(B,mxResources.get("printAllPages"));S.appendChild(B);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);B=document.createElement("span");mxUtils.write(B,mxResources.get("pages")+":");S.appendChild(B);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type",
-"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));S.appendChild(B);var fa=ba.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(fa,"change",L);if(null!=l.pages&&(W=l.pages.length,null!=l.currentPage))for(B=0;B<l.pages.length;B++)if(l.currentPage==l.pages[B]){aa=
-B+1;ba.value=aa;fa.value=aa;break}ba.setAttribute("max",W);fa.setAttribute("max",W);l.isPagesEnabled()?1<W&&(R.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ja=document.createElement("input");ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.style.marginRight="8px";O.isSelectionEmpty()&&ja.setAttribute("disabled","disabled");var ha=document.createElement("div");ha.style.marginBottom="10px";1==W?(ja.setAttribute("type","checkbox"),ja.style.marginBottom="12px",ha.appendChild(ja)):
-(ja.setAttribute("name","pages-printdialog"),ja.style.marginBottom="8px",S.appendChild(ja));B=document.createElement("span");mxUtils.write(B,mxResources.get("selectionOnly"));ja.parentNode.appendChild(B);1==W&&mxUtils.br(ja.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");ha.appendChild(ra);B=document.createElement("span");mxUtils.write(B,mxResources.get("adjustTo"));
-ha.appendChild(B);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="50px";ha.appendChild(ma);mxEvent.addListener(ma,"focus",function(){ra.checked=!0});R.appendChild(ha);S=S.cloneNode(!1);var Ga=ra.cloneNode(!0);Ga.setAttribute("value","fit");ra.setAttribute("checked","checked");B=document.createElement("div");B.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";B.appendChild(Ga);S.appendChild(B);ha=
-document.createElement("table");ha.style.display="inline-block";var Ea=document.createElement("tbody"),za=document.createElement("tr"),Pa=za.cloneNode(!0),Aa=document.createElement("td"),Fa=Aa.cloneNode(!0),qa=Aa.cloneNode(!0),Ba=Aa.cloneNode(!0),Ra=Aa.cloneNode(!0),xa=Aa.cloneNode(!0);Aa.style.textAlign="right";Ba.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("min",
-"1");Da.setAttribute("type","number");Da.style.width="40px";Fa.appendChild(Da);B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));qa.appendChild(B);mxUtils.write(Ba,mxResources.get("fitToBy"));var va=Da.cloneNode(!0);Ra.appendChild(va);mxEvent.addListener(Da,"focus",function(){Ga.checked=!0});mxEvent.addListener(va,"focus",function(){Ga.checked=!0});B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsDown"));xa.appendChild(B);za.appendChild(Aa);
-za.appendChild(Fa);za.appendChild(qa);Pa.appendChild(Ba);Pa.appendChild(Ra);Pa.appendChild(xa);Ea.appendChild(za);Ea.appendChild(Pa);ha.appendChild(Ea);S.appendChild(ha);R.appendChild(S);S=document.createElement("div");B=document.createElement("div");B.style.fontWeight="bold";B.style.marginBottom="12px";mxUtils.write(B,mxResources.get("paperSize"));S.appendChild(B);B=document.createElement("div");B.style.marginBottom="12px";var Ka=PageSetupDialog.addPageFormatPanel(B,"printdialog",l.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(B);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageScale"));S.appendChild(B);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="60px";S.appendChild(la);R.appendChild(S);B=document.createElement("div");B.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});S.className="geBtn";l.editor.cancelFirst&&
-B.appendChild(S);l.isOffline()||(ha=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ha.className="geBtn",B.appendChild(ha));PrintDialog.previewEnabled&&(ha=mxUtils.button(mxResources.get("preview"),function(){l.hideDialog();P(!1)}),ha.className="geBtn",B.appendChild(ha));ha=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){l.hideDialog();P(!0)});ha.className="geBtn gePrimaryBtn";B.appendChild(ha);l.editor.cancelFirst||
-B.appendChild(S);R.appendChild(B);this.container=R};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else V.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 U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(B){}};X.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(l){}Editor.prototype.useCanvasForExport=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var L=mxMarker.createMarker;mxMarker.createMarker=function(m,z,K,Q,N,U,T,W,Z,ca){if(null!=K&&null==mxMarker.markers[K]){var ba=this.getPackageForType(K);null!=ba&&mxStencilRegistry.getStencil(ba)}return L.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
+function(m,z,K,Q,N,U){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(m,z){function K(){Y.value=Math.max(1,Math.min(W,Math.max(parseInt(Y.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(W,Math.min(parseInt(Y.value),parseInt(fa.value))))}function Q(ea){function aa(Ga,Ia,Ja){var Pa=Ga.useCssTransforms,Ra=Ga.currentTranslate,Ua=Ga.currentScale,
+Ha=Ga.view.translate,Ta=Ga.view.scale;Ga.useCssTransforms&&(Ga.useCssTransforms=!1,Ga.currentTranslate=new mxPoint(0,0),Ga.currentScale=1,Ga.view.translate=new mxPoint(0,0),Ga.view.scale=1);var Sa=Ga.getGraphBounds(),Wa=0,$a=0,Xa=La.get(),ab=1/Ga.pageScale,Za=xa.checked;if(Za){ab=parseInt(Ca.value);var gb=parseInt(Ba.value);ab=Math.min(Xa.height*gb/(Sa.height/Ga.view.scale),Xa.width*ab/(Sa.width/Ga.view.scale))}else ab=parseInt(za.value)/(100*Ga.pageScale),isNaN(ab)&&(na=1/Ga.pageScale,za.value="100 %");
+Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ga.pageVisible?(Sa=Ga.getPageLayout(),Wa-=Sa.x*Xa.width,$a-=Sa.y*Xa.height):Za=!0;if(null==Ia){Ia=PrintDialog.createPrintPreview(Ga,ab,Xa,0,Wa,$a,Za);Ia.pageSelector=!1;Ia.mathEnabled=!1;ha.checked&&(Ia.isCellVisible=function(Ya){return Ga.isCellSelected(Ya)});Wa=m.getCurrentFile();null!=Wa&&(Ia.title=Wa.getTitle());var hb=Ia.writeHead;Ia.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
+(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=m.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(m.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ga.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
+(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Ia.renderPage;Ia.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=N.shapeForegroundColor;Za=N.shapeBackgroundColor;
+Xa=N.enableFlowAnimation;N.enableFlowAnimation=!1;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Wa=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());Ia.open(null,null,Ja,!0);N.enableFlowAnimation=Xa;null!=Wa&&(N.shapeForegroundColor=$a,N.shapeBackgroundColor=Za,N.stylesheet=Wa,N.refresh())}else{Xa=Ga.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Ia.backgroundColor=Xa;Ia.autoOrigin=Za;Ia.appendGraph(Ga,
+ab,Wa,$a,Ja,!0);Ja=Ga.getCustomFonts();if(null!=Ia.wnd)for(Wa=0;Wa<Ja.length;Wa++)$a=Ja[Wa].name,Za=Ja[Wa].url,Graph.isCssFontUrl(Za)?Ia.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Ia.wnd.document.writeln('<style type="text/css">'),Ia.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Ia.wnd.document.writeln("</style>"))}Pa&&(Ga.useCssTransforms=Pa,
+Ga.currentTranslate=Ra,Ga.currentScale=Ua,Ga.view.translate=Ha,Ga.view.scale=Ta);return Ia}var na=parseInt(ma.value)/100;isNaN(na)&&(na=1,ma.value="100 %");na*=.75;var la=null,pa=N.shapeForegroundColor,ia=N.shapeBackgroundColor;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(la=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());var ja=fa.value,oa=Y.value,ya=!ca.checked,Aa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(m,
+ca.checked,ja,oa,xa.checked,Ca.value,Ba.value,parseInt(za.value)/100,parseInt(ma.value)/100,La.get());else{ya&&(ya=ha.checked||ja==Z&&oa==Z);if(!ya&&null!=m.pages&&m.pages.length){var Fa=0;ya=m.pages.length-1;ca.checked||(Fa=parseInt(ja)-1,ya=parseInt(oa)-1);for(var Da=Fa;Da<=ya;Da++){var va=m.pages[Da];ja=va==m.currentPage?N:null;if(null==ja){ja=m.createTemporaryGraph(N.stylesheet);ja.shapeForegroundColor=N.shapeForegroundColor;ja.shapeBackgroundColor=N.shapeBackgroundColor;oa=!0;Fa=!1;var sa=null,
+Ma=null;null==va.viewState&&null==va.root&&m.updatePageRoot(va);null!=va.viewState&&(oa=va.viewState.pageVisible,Fa=va.viewState.mathEnabled,sa=va.viewState.background,Ma=va.viewState.backgroundImage,ja.extFonts=va.viewState.extFonts);null!=Ma&&null!=Ma.originalSrc&&(Ma=m.createImageForPageLink(Ma.originalSrc,va));ja.background=sa;ja.backgroundImage=null!=Ma?new mxImage(Ma.src,Ma.width,Ma.height,Ma.x,Ma.y):null;ja.pageVisible=oa;ja.mathEnabled=Fa;var Qa=ja.getGraphBounds;ja.getGraphBounds=function(){var Ga=
+Qa.apply(this,arguments),Ia=this.backgroundImage;if(null!=Ia&&null!=Ia.width&&null!=Ia.height){var Ja=this.view.translate,Pa=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Ja.x+Ia.x)*Pa,(Ja.y+Ia.y)*Pa,Ia.width*Pa,Ia.height*Pa))}return Ga};var Va=ja.getGlobalVariable;ja.getGlobalVariable=function(Ga){return"page"==Ga?va.getName():"pagenumber"==Ga?Da+1:"pagecount"==Ga?null!=m.pages?m.pages.length:1:Va.apply(this,arguments)};document.body.appendChild(ja.container);m.updatePageRoot(va);
+ja.model.setRoot(va.root)}Aa=aa(ja,Aa,Da!=ya);ja!=N&&ja.container.parentNode.removeChild(ja.container)}}else Aa=aa(N);null==Aa?m.handleError({message:mxResources.get("errorUpdatingPreview")}):(Aa.mathEnabled&&(ya=Aa.wnd.document,ea&&(Aa.wnd.IMMEDIATE_PRINT=!0),ya.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Aa.closeDocument(),!Aa.mathEnabled&&ea&&PrintDialog.printPreview(Aa));null!=la&&(N.shapeForegroundColor=pa,N.shapeBackgroundColor=ia,N.stylesheet=
+la,N.refresh())}}var N=m.editor.graph,U=document.createElement("div"),T=document.createElement("h3");T.style.width="100%";T.style.textAlign="center";T.style.marginTop="0px";mxUtils.write(T,z||mxResources.get("print"));U.appendChild(T);var W=1,Z=1;T=document.createElement("div");T.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ca=document.createElement("input");ca.style.cssText="margin-right:8px;margin-bottom:8px;";ca.setAttribute("value","all");ca.setAttribute("type",
+"radio");ca.setAttribute("name","pages-printdialog");T.appendChild(ca);z=document.createElement("span");mxUtils.write(z,mxResources.get("printAllPages"));T.appendChild(z);mxUtils.br(T);var ba=ca.cloneNode(!0);ca.setAttribute("checked","checked");ba.setAttribute("value","range");T.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");T.appendChild(z);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type",
+"number");fa.setAttribute("min","1");fa.style.width="50px";T.appendChild(fa);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));T.appendChild(z);var Y=fa.cloneNode(!0);T.appendChild(Y);mxEvent.addListener(fa,"focus",function(){ba.checked=!0});mxEvent.addListener(Y,"focus",function(){ba.checked=!0});mxEvent.addListener(fa,"change",K);mxEvent.addListener(Y,"change",K);if(null!=m.pages&&(W=m.pages.length,null!=m.currentPage))for(z=0;z<m.pages.length;z++)if(m.currentPage==m.pages[z]){Z=
+z+1;fa.value=Z;Y.value=Z;break}fa.setAttribute("max",W);Y.setAttribute("max",W);m.isPagesEnabled()?1<W&&(U.appendChild(T),ba.checked=!0):ba.checked=!0;mxUtils.br(T);var ha=document.createElement("input");ha.setAttribute("value","all");ha.setAttribute("type","radio");ha.style.marginRight="8px";N.isSelectionEmpty()&&ha.setAttribute("disabled","disabled");var da=document.createElement("div");da.style.marginBottom="10px";1==W?(ha.setAttribute("type","checkbox"),ha.style.marginBottom="12px",da.appendChild(ha)):
+(ha.setAttribute("name","pages-printdialog"),ha.style.marginBottom="8px",T.appendChild(ha));z=document.createElement("span");mxUtils.write(z,mxResources.get("selectionOnly"));ha.parentNode.appendChild(z);1==W&&mxUtils.br(ha.parentNode);var wa=document.createElement("input");wa.style.marginRight="8px";wa.setAttribute("value","adjust");wa.setAttribute("type","radio");wa.setAttribute("name","printZoom");da.appendChild(wa);z=document.createElement("span");mxUtils.write(z,mxResources.get("adjustTo"));
+da.appendChild(z);var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","100 %");za.style.width="50px";da.appendChild(za);mxEvent.addListener(za,"focus",function(){wa.checked=!0});U.appendChild(da);T=T.cloneNode(!1);var xa=wa.cloneNode(!0);xa.setAttribute("value","fit");wa.setAttribute("checked","checked");z=document.createElement("div");z.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";z.appendChild(xa);T.appendChild(z);da=
+document.createElement("table");da.style.display="inline-block";var ta=document.createElement("tbody"),ka=document.createElement("tr"),Na=ka.cloneNode(!0),Ka=document.createElement("td"),Ea=Ka.cloneNode(!0),ra=Ka.cloneNode(!0),qa=Ka.cloneNode(!0),Oa=Ka.cloneNode(!0),ua=Ka.cloneNode(!0);Ka.style.textAlign="right";qa.style.textAlign="right";mxUtils.write(Ka,mxResources.get("fitTo"));var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","1");Ca.setAttribute("min",
+"1");Ca.setAttribute("type","number");Ca.style.width="40px";Ea.appendChild(Ca);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));ra.appendChild(z);mxUtils.write(qa,mxResources.get("fitToBy"));var Ba=Ca.cloneNode(!0);Oa.appendChild(Ba);mxEvent.addListener(Ca,"focus",function(){xa.checked=!0});mxEvent.addListener(Ba,"focus",function(){xa.checked=!0});z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ua.appendChild(z);ka.appendChild(Ka);
+ka.appendChild(Ea);ka.appendChild(ra);Na.appendChild(qa);Na.appendChild(Oa);Na.appendChild(ua);ta.appendChild(ka);ta.appendChild(Na);da.appendChild(ta);T.appendChild(da);U.appendChild(T);T=document.createElement("div");z=document.createElement("div");z.style.fontWeight="bold";z.style.marginBottom="12px";mxUtils.write(z,mxResources.get("paperSize"));T.appendChild(z);z=document.createElement("div");z.style.marginBottom="12px";var La=PageSetupDialog.addPageFormatPanel(z,"printdialog",m.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);T.appendChild(z);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageScale"));T.appendChild(z);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="60px";T.appendChild(ma);U.appendChild(T);z=document.createElement("div");z.style.cssText="text-align:right;margin:48px 0 0 0;";T=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});T.className="geBtn";m.editor.cancelFirst&&
+z.appendChild(T);m.isOffline()||(da=mxUtils.button(mxResources.get("help"),function(){N.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),da.className="geBtn",z.appendChild(da));PrintDialog.previewEnabled&&(da=mxUtils.button(mxResources.get("preview"),function(){m.hideDialog();Q(!1)}),da.className="geBtn",z.appendChild(da));da=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){m.hideDialog();Q(!0)});da.className="geBtn gePrimaryBtn";z.appendChild(da);m.editor.cancelFirst||
+z.appendChild(T);U.appendChild(z);this.container=U};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else S.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),X=new Image;X.onload=function(){try{V.getContext("2d").drawImage(X,0,0);var m=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};X.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(m){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,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(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,m,p,q,z){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var y=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(c);(new Image).src=y+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(A){}try{z||null==window.console||console.error(q,c,e,g,m,p)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,p,n,t,y){t=null!=t?t:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var A=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(c);(new Image).src=A+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=p?":colno:"+
+encodeURIComponent(p):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(C){}try{y||null==window.console||console.error(t,c,e,g,p,n)}catch(C){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var p=
-e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.length}catch(q){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{e=document.createElement("canvas");e.width=e.height=1;var m=e.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var n=
+e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=n&&6<n.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{e=document.createElement("canvas");e.width=e.height=1;var p=e.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==p.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var m=null==c||null==e;g=null!=g?g:24;var p=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,A){var x=!1;this.active||(q.call(this,y),this.active=!0,null!=A&&(m&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),x=document.createElement("div"),
-x.style.position="absolute",x.style.whiteSpace="nowrap",x.style.background="#4B4243",x.style.color="white",x.style.fontFamily=Editor.defaultHtmlFont,x.style.fontSize="9pt",x.style.padding="6px",x.style.paddingLeft="10px",x.style.paddingRight="10px",x.style.zIndex=2E9,x.style.left=Math.max(0,c)+"px",x.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(x.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(x.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),x.innerHTML=A,y.appendChild(x),p.status=x),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(y,A)}));this.stop();return I}),x=!0);return x};var z=p.stop;p.stop=function(){z.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
-return p};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(c,e,g){var p=null==c||null==e;g=null!=g?g:24;var n=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=n.spin;n.spin=function(A,C){var u=!1;this.active||(t.call(this,A),this.active=!0,null!=C&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),u=document.createElement("div"),
+u.style.position="absolute",u.style.whiteSpace="nowrap",u.style.background="#4B4243",u.style.color="white",u.style.fontFamily=Editor.defaultHtmlFont,u.style.fontSize="9pt",u.style.padding="6px",u.style.paddingLeft="10px",u.style.paddingRight="10px",u.style.zIndex=2E9,u.style.left=Math.max(0,c)+"px",u.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(u.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),u.innerHTML=C,A.appendChild(u),n.status=u),this.pause=mxUtils.bind(this,function(){var R=function(){};this.active&&(R=mxUtils.bind(this,function(){this.spin(A,C)}));this.stop();return R}),u=!0);return u};var y=n.stop;n.stop=function(){y.call(this);this.active=!1;null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status);n.status=null};n.pause=function(){return function(){}};
+return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,m=this.editor.graph,p=this;e.getFunction=function(q){if(m.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var z=p.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<z&&p.movePage(z,z-1)};if(38==q.keyCode)return function(){0<z&&p.movePage(z,0)};if(39==q.keyCode)return function(){z<p.pages.length-1&&p.movePage(z,
-z+1)};if(40==q.keyCode)return function(){z<p.pages.length-1&&p.movePage(z,p.pages.length-1)}}else if(mxEvent.isControlDown(q)||mxClient.IS_MAC&&mxEvent.isMetaDown(q)){if(37==q.keyCode)return function(){0<z&&p.selectNextPage(!1)};if(38==q.keyCode)return function(){0<z&&p.selectPage(p.pages[0])};if(39==q.keyCode)return function(){z<p.pages.length-1&&p.selectNextPage(!0)};if(40==q.keyCode)return function(){z<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=q.keyCode&&90>=q.keyCode)||
-m.isSelectionEmpty()||mxEvent.isAltDown(q)||mxEvent.isShiftDown(q)||mxEvent.isControlDown(q)||mxClient.IS_MAC&&mxEvent.isMetaDown(q)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>g&&(e=c.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var p=mxUtils.parseXml(c),q=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=q?mxUtils.getXml(q):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
-c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var p=m.length-1;0<=p;p--){var q=this.updatePageRoot(new DiagramPage(m[p]));null==q.getName()&&
-q.setName(mxResources.get("pageWithNumber",[p+1]));e.model.execute(new ChangePage(this,q,0==p?q:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(p=0;p<g.length;p++)e.model.execute(new ChangePage(this,g[p],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,m,p,q,z,y,A,x,I){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;A=null!=A?A:!0;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var E="_blank";else M=E=m;if(null==c)return"";var Q=c;if("mxfile"!=Q.nodeName.toLowerCase()){if(I){var n=c.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());
-n.appendChild(c)}else{n=Graph.zapGremlins(mxUtils.getXml(c));Q=Graph.compress(n);if(Graph.decompress(Q)!=n)return n;n=c.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,Q)}Q=c.ownerDocument.createElement("mxfile");Q.appendChild(n)}x?(Q=Q.cloneNode(!0),Q.removeAttribute("modified"),Q.removeAttribute("host"),Q.removeAttribute("agent"),Q.removeAttribute("etag"),Q.removeAttribute("userAgent"),Q.removeAttribute("version"),Q.removeAttribute("editor"),Q.removeAttribute("type")):
-(Q.removeAttribute("userAgent"),Q.removeAttribute("version"),Q.removeAttribute("editor"),Q.removeAttribute("pages"),Q.removeAttribute("type"),mxClient.IS_CHROMEAPP?Q.setAttribute("host","Chrome"):EditorUi.isElectronApp?Q.setAttribute("host","Electron"):Q.setAttribute("host",window.location.hostname),Q.setAttribute("modified",(new Date).toISOString()),Q.setAttribute("agent",navigator.appVersion),Q.setAttribute("version",EditorUi.VERSION),Q.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
-null!=c&&Q.setAttribute("type",c),1<Q.getElementsByTagName("diagram").length&&null!=this.pages&&Q.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(Q):mxUtils.getXml(Q);if(!q&&!p&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(Q),e,null!=g?g.getTitle():null,E,M);else if(q||!p&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),I=this.getEmbeddedSvg(I,e,m,null,y,A,M);return I};EditorUi.prototype.getXmlFileData=
-function(c,e,g,m){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var p=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(A){var x=A.getElementsByTagName("mxGraphModel");x=0<x.length?x[0]:null;null==x&&g?(x=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<x.length&&(x=Graph.decompress(x),null!=x&&0<x.length&&A.appendChild(mxUtils.parseXml(x).documentElement))):null==x||g?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,
-Graph.compressNode(x)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var q=this.pages[e],z=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,m);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z,
-Graph.compressNode(y));delete q.needsUpdate}else m&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),
-y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,m),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(y))));c(z)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],m=0;m<c.length;m++){var p=c.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?g.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(p)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(q){c[EditorUi.DIFF_INSERT][e].data=
-q.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var p=c[EditorUi.DIFF_UPDATE][m];null!=p.name&&(p.name=this.anonymizeString(p.name));null!=p.cells&&(e=mxUtils.bind(this,function(q){var z=p.cells[q];if(null!=z){for(var y in z)null!=z[y].value&&(z[y].value="["+z[y].value.length+"]"),null!=z[y].xmlValue&&(z[y].xmlValue="["+z[y].xmlValue.length+"]"),null!=z[y].style&&(z[y].style="["+z[y].style.length+"]"),mxUtils.isEmptyObject(z[y])&&delete z[y];mxUtils.isEmptyObject(z)&&
-delete p.cells[q]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
+EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,p=this.editor.graph,n=this;e.getFunction=function(t){if(p.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var y=n.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<y&&n.movePage(y,y-1)};if(38==t.keyCode)return function(){0<y&&n.movePage(y,0)};if(39==t.keyCode)return function(){y<n.pages.length-1&&n.movePage(y,
+y+1)};if(40==t.keyCode)return function(){y<n.pages.length-1&&n.movePage(y,n.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<y&&n.selectNextPage(!1)};if(38==t.keyCode)return function(){0<y&&n.selectPage(n.pages[0])};if(39==t.keyCode)return function(){y<n.pages.length-1&&n.selectNextPage(!0)};if(40==t.keyCode)return function(){y<n.pages.length-1&&n.selectPage(n.pages[n.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
+p.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var p=c.lastIndexOf("&lt;/mxfile&gt;");p>g&&(e=c.substring(g,p+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var n=mxUtils.parseXml(c),t=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=t?mxUtils.getXml(t):""}}catch(y){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
+c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,p=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<p.length||1==p.length&&p[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var n=p.length-1;0<=n;n--){var t=this.updatePageRoot(new DiagramPage(p[n]));null==t.getName()&&
+t.setName(mxResources.get("pageWithNumber",[n+1]));e.model.execute(new ChangePage(this,t,0==n?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(n=0;n<g.length;n++)e.model.execute(new ChangePage(this,g[n],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,p,n,t,y,A,C,u,R){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;var l=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var q="_blank";else l=q=p;if(null==c)return"";var B=c;if("mxfile"!=B.nodeName.toLowerCase()){if(R){var J=c.ownerDocument.createElement("diagram");J.setAttribute("id",Editor.guid());
+J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));B=Graph.compress(J);if(Graph.decompress(B)!=J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,B)}B=c.ownerDocument.createElement("mxfile");B.appendChild(J)}u?(B=B.cloneNode(!0),B.removeAttribute("modified"),B.removeAttribute("host"),B.removeAttribute("agent"),B.removeAttribute("etag"),B.removeAttribute("userAgent"),B.removeAttribute("version"),B.removeAttribute("editor"),B.removeAttribute("type")):
+(B.removeAttribute("userAgent"),B.removeAttribute("version"),B.removeAttribute("editor"),B.removeAttribute("pages"),B.removeAttribute("type"),mxClient.IS_CHROMEAPP?B.setAttribute("host","Chrome"):EditorUi.isElectronApp?B.setAttribute("host","Electron"):B.setAttribute("host",window.location.hostname),B.setAttribute("modified",(new Date).toISOString()),B.setAttribute("agent",navigator.appVersion),B.setAttribute("version",EditorUi.VERSION),B.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
+null!=c&&B.setAttribute("type",c),1<B.getElementsByTagName("diagram").length&&null!=this.pages&&B.setAttribute("pages",this.pages.length));R=R?mxUtils.getPrettyXml(B):mxUtils.getXml(B);if(!t&&!n&&(y||null!=g&&/(\.html)$/i.test(g.getTitle())))R=this.getHtml2(mxUtils.getXml(B),e,null!=g?g.getTitle():null,q,l);else if(t||!n&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(p=null),R=this.getEmbeddedSvg(R,e,p,null,A,C,l);return R};EditorUi.prototype.getXmlFileData=
+function(c,e,g,p){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var u=C.getElementsByTagName("mxGraphModel");u=0<u.length?u[0]:null;null==u&&g?(u=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<u.length&&(u=Graph.decompress(u),null!=u&&0<u.length&&C.appendChild(mxUtils.parseXml(u).documentElement))):null==u||g?C=C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,
+Graph.compressNode(u)));n.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(n)),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],y=t.node;if(t!=this.currentPage)if(t.needsUpdate){var A=new mxCodec(mxUtils.createXmlDocument());A=A.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,A,null,p);EditorUi.removeChildNodes(y);mxUtils.setTextContent(y,
+Graph.compressNode(A));delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(A=new mxCodec(mxUtils.createXmlDocument()),
+A=A.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,A,null,p),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(A))));c(y)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?g.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(n)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(t){c[EditorUi.DIFF_INSERT][e].data=
+t.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var p in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][p];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(t){var y=n.cells[t];if(null!=y){for(var A in y)null!=y[A].value&&(y[A].value="["+y[A].value.length+"]"),null!=y[A].xmlValue&&(y[A].xmlValue="["+y[A].xmlValue.length+"]"),null!=y[A].style&&(y[A].style="["+y[A].style.length+"]"),mxUtils.isEmptyObject(y[A])&&delete y[A];mxUtils.isEmptyObject(y)&&
+delete n.cells[t]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][p]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=
e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
-this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,m,p,q,z,y,A,x,I){p=null!=p?p:!0;q=null!=q?q:!1;var M=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var E=
-null!=M.themes&&"darkTheme"==M.defaultThemeName;x=!1;if(E||null!=this.pages&&this.currentPage!=this.pages[0]){var Q=M.getGlobalVariable;M=this.createTemporaryGraph(E?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var n=this.pages[0];this.currentPage==n?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&null!=n.viewState&&M.setBackgroundImage(n.viewState.backgroundImage);M.getGlobalVariable=
-function(v){return"page"==v?n.getName():"pagenumber"==v?1:Q.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(n.root)}}z=null!=z?z:this.getXmlFileData(p,q,x,I);A=null!=A?A:this.getCurrentFile();c=this.createFileData(z,M,A,window.location.href,c,e,g,m,p,y,x);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return c};EditorUi.prototype.getHtml=function(c,e,g,m,p,q){q=null!=q?q:!0;var z=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=
-q?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var A=e.view.scale;q=Math.floor(z.x/A-e.view.translate.x);A=Math.floor(z.y/A-e.view.translate.y);z=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(y=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",q);c.setAttribute("y0",A)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",
-m));null!=p&&(p=p.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
-p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+y+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,m,p){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\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(c))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+
-e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var m=0;m<c.length;m++)null==c[m].getAttribute("id")&&c[m].setAttribute("id",m),e=new DiagramPage(c[m]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
-[m+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");e={};for(m=0;m<p.length;m++)e[p[m]]=!0;var q=this.editor.graph.getModel(),z=q.getChildren(q.root);for(m=0;m<z.length;m++){var y=z[m];q.setVisible(y,e[y.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
-/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,m,p,q,z,y,A,x,I,M){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var E=this.getBaseFilename("remoteSvg"==c?
-!1:!p),Q=E+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var n=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,p,null,null,null,e);this.saveData(Q,c,n,"text/xml")}else if("html"==c)n=this.getHtml2(this.getFileData(!0),this.editor.graph,E),this.saveData(Q,c,n,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)Q=E+".png";else if("jpeg"==c)Q=E+".jpg";else if("remoteSvg"==c){Q=E+".svg";c="svg";var v=parseInt(A);
-"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<v){var D=this.editor.graph,H=D.getGraphBounds();var K=Math.ceil(H.width*y/D.view.scale+2*v);var G=Math.ceil(H.height*y/D.view.scale+2*v)}}this.saveRequest(Q,c,mxUtils.bind(this,function(X,l){try{var B=this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var L=this.createDownloadRequest(X,c,m,l,z,p,y,A,x,I,M,K,G);this.editor.graph.pageVisible=B;return L}catch(P){this.handleError(P)}}))}else{var N=null,T=mxUtils.bind(this,
-function(X){X.length<=MAX_REQUEST_SIZE?this.saveData(Q,"svg",X,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});if("svg"==c){var V=this.editor.graph.background;if(z||V==mxConstants.NONE)V=null;var U=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(X){this.spinner.stop();T(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(X))})))}else Q=E+".svg",N=this.getFileData(!1,!0,null,mxUtils.bind(this,function(X){this.spinner.stop();T(X)}),m)}}catch(X){this.handleError(X)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,m,p,q,z,y,A,x,I,M,E){var Q=this.editor.graph,n=Q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==q?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var v="",D="";if(n.width*n.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-x=x?"1":"0";"pdf"==e&&(null!=I?D="&from="+I.from+"&to="+I.to:0==q&&(D="&allPages=1"));"xmlpng"==e&&(x="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){v="&from="+q;break}q=Q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:Q.getExportVariables()};A&&(p.grid={size:Q.gridSize,steps:Q.view.gridSteps,color:Q.view.gridColor});Graph.translateDiagram&&
-(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+v+D+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+m+"&embedXml="+x+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=z?"&scale="+z:"")+(null!=y?"&border="+y:"")+(M&&isFinite(M)?"&w="+M:"")+(E&&isFinite(E)?"&h="+E:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var m=
-window.location.hash,p=mxUtils.bind(this,function(z){var y=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<y.length&&(y+="\n"),y+=z);z=new LocalFile(this,"csv"!=c.format&&0<y.length?y:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return m};this.fileLoaded(z);"csv"==c.format&&this.importCsv(y,mxUtils.bind(this,function(E){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var A=
-null!=c.interval?parseInt(c.interval):6E4,x=null,I=mxUtils.bind(this,function(){var E=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){E===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),M()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(x);
-x=window.setTimeout(I,A)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();I()}));M();I()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var q=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(q,mxUtils.bind(this,function(z){p(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(G){var N=new mxCellOverlay(G.image||p.warningImage,G.tooltip,G.align,G.valign,G.offset);N.addListener(mxEvent.CLICK,function(T,
-V){m.alert(G.tooltip)});return N}var g=null,m=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var y=q.getCell(c.getAttribute("id"));if(null!=y){try{var A=c.getAttribute("value");if(null!=A){var x=mxUtils.parseXml(A).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))q.setValue(y,x);else for(var I=
-x.attributes,M=0;M<I.length;M++)p.setAttributeForCell(y,I[M].nodeName,0<I[M].nodeValue.length?I[M].nodeValue:null)}}catch(G){null!=window.console&&console.log("Error in value for "+y.id+": "+G)}try{var E=c.getAttribute("style");null!=E&&p.model.setStyle(y,E)}catch(G){null!=window.console&&console.log("Error in style for "+y.id+": "+G)}try{var Q=c.getAttribute("icon");if(null!=Q){var n=0<Q.length?JSON.parse(Q):null;null!=n&&n.append||p.removeCellOverlays(y);null!=n&&p.addCellOverlay(y,e(n))}}catch(G){null!=
-window.console&&console.log("Error in icon for "+y.id+": "+G)}try{var v=c.getAttribute("geometry");if(null!=v){v=JSON.parse(v);var D=p.getCellGeometry(y);if(null!=D){D=D.clone();for(key in v){var H=parseFloat(v[key]);"dx"==key?D.x+=H:"dy"==key?D.y+=H:"dw"==key?D.width+=H:"dh"==key?D.height+=H:D[key]=parseFloat(v[key])}p.model.setGeometry(y,D)}}}catch(G){null!=window.console&&console.log("Error in icon for "+y.id+": "+G)}}}else if("model"==c.nodeName){for(var K=c.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
-K.nextSibling;null!=K&&(new mxCodec(c.firstChild)).decode(K,q)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,
-z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=g.lastIndexOf(".");0<=m&&(c=g.substring(m),g=g.substring(0,m));if(e){e=g;var p=new Date;g=p.getFullYear();m=p.getMonth()+1;var q=p.getDate(),z=p.getHours(),y=p.getMinutes();p=p.getSeconds();g=e+(" "+(g+"-"+m+"-"+q+"-"+z+"-"+y+"-"+p))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=
-this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&
+this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,p,n,t,y,A,C,u,R){n=null!=n?n:!0;t=null!=t?t:!1;var l=this.editor.graph;if(e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var q=
+null!=l.themes&&"darkTheme"==l.defaultThemeName;u=!1;if(q||null!=this.pages&&this.currentPage!=this.pages[0]){var B=l.getGlobalVariable;l=this.createTemporaryGraph(q?l.getDefaultStylesheet():l.getStylesheet());l.setBackgroundImage=this.editor.graph.setBackgroundImage;l.background=this.editor.graph.background;var J=this.pages[0];this.currentPage==J?l.setBackgroundImage(this.editor.graph.backgroundImage):null!=J.viewState&&null!=J.viewState&&l.setBackgroundImage(J.viewState.backgroundImage);l.getGlobalVariable=
+function(M){return"page"==M?J.getName():"pagenumber"==M?1:B.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(J.root)}}y=null!=y?y:this.getXmlFileData(n,t,u,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(y,l,C,window.location.href,c,e,g,p,n,A,u);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return c};EditorUi.prototype.getHtml=function(c,e,g,p,n,t){t=null!=t?t:!0;var y=null,A=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){y=
+t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(y.x/C-e.view.translate.x);C=Math.floor(y.y/C-e.view.translate.y);y=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(A=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",t);c.setAttribute("y0",C)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=p&&c.setAttribute("edit",
+p));null!=n&&(n=n.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";p=Graph.compress(c);Graph.decompress(p)!=c&&(p=encodeURIComponent(c));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+
+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+p+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+A+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+
+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
+[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var p=0;p<c.length;p++)null==c[p].getAttribute("id")&&c[p].setAttribute("id",p),e=new DiagramPage(c[p]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
+[p+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var n=urlParams["layer-ids"].split(" ");e={};for(p=0;p<n.length;p++)e[n[p]]=!0;var t=this.editor.graph.getModel(),y=t.getChildren(t.root);for(p=0;p<y.length;p++){var A=y[p];t.setVisible(A,e[A.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
+/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,p,n,t,y,A,C,u,R,l){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var q=this.getBaseFilename("remoteSvg"==c?
+!1:!n),B=q+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;if("xml"==c){var J=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,J,"text/xml")}else if("html"==c)J=this.getHtml2(this.getFileData(!0),this.editor.graph,q),this.saveData(B,c,J,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)B=q+".png";else if("jpeg"==c)B=q+".jpg";else if("remoteSvg"==c){B=q+".svg";c="svg";var M=parseInt(C);
+"string"===typeof A&&0<A.indexOf("%")&&(A=parseInt(A)/100);if(0<M){var E=this.editor.graph,L=E.getGraphBounds();var P=Math.ceil(L.width*A/E.view.scale+2*M);var S=Math.ceil(L.height*A/E.view.scale+2*M)}}this.saveRequest(B,c,mxUtils.bind(this,function(K,Q){try{var N=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var U=this.createDownloadRequest(K,c,p,Q,y,n,A,C,u,R,l,P,S);this.editor.graph.pageVisible=N;return U}catch(T){this.handleError(T)}}))}else{var V=null,X=mxUtils.bind(this,
+function(K){K.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",K,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==c){var m=this.editor.graph.background;if(y||m==mxConstants.NONE)m=null;var z=this.editor.graph.getSvg(m,null,null,null,null,p);g&&this.editor.graph.addSvgShadow(z);this.editor.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(K){this.spinner.stop();X(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(K))})))}else B=q+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(K){this.spinner.stop();X(K)}),p)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,p,n,t,y,A,C,u,R,l,q){var B=this.editor.graph,J=B.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var M="",E="";if(J.width*J.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+u=u?"1":"0";"pdf"==e&&(null!=R?E="&from="+R.from+"&to="+R.to:0==t&&(E="&allPages=1"));"xmlpng"==e&&(u="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){M="&from="+t;break}t=B.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:B.getExportVariables()};C&&(n.grid={size:B.gridSize,steps:B.view.gridSteps,color:B.view.gridColor});Graph.translateDiagram&&
+(n.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+M+E+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+p+"&embedXml="+u+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(null!=y?"&scale="+y:"")+(null!=A?"&border="+A:"")+(l&&isFinite(l)?"&w="+l:"")+(q&&isFinite(q)?"&h="+q:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var p=
+window.location.hash,n=mxUtils.bind(this,function(y){var A=null!=c.data?c.data:"";null!=y&&0<y.length&&(0<A.length&&(A+="\n"),A+=y);y=new LocalFile(this,"csv"!=c.format&&0<A.length?A:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return p};this.fileLoaded(y);"csv"==c.format&&this.importCsv(A,mxUtils.bind(this,function(q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=
+null!=c.interval?parseInt(c.interval):6E4,u=null,R=mxUtils.bind(this,function(){var q=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(B){q===this.currentPage&&(200<=B.getStatus()&&300>=B.getStatus()?(this.updateDiagram(B.getText()),l()):this.handleError({message:mxResources.get("error")+" "+B.getStatus()}))}),mxUtils.bind(this,function(B){this.handleError(B)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(u);
+u=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();R()}));l();R()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(y){n(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(S){var V=new mxCellOverlay(S.image||n.warningImage,S.tooltip,S.align,S.valign,S.offset);V.addListener(mxEvent.CLICK,function(X,
+m){p.alert(S.tooltip)});return V}var g=null,p=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var y=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var A=t.getCell(c.getAttribute("id"));if(null!=A){try{var C=c.getAttribute("value");if(null!=C){var u=mxUtils.parseXml(C).documentElement;if(null!=u)if("1"==u.getAttribute("replace-value"))t.setValue(A,u);else for(var R=
+u.attributes,l=0;l<R.length;l++)n.setAttributeForCell(A,R[l].nodeName,0<R[l].nodeValue.length?R[l].nodeValue:null)}}catch(S){null!=window.console&&console.log("Error in value for "+A.id+": "+S)}try{var q=c.getAttribute("style");null!=q&&n.model.setStyle(A,q)}catch(S){null!=window.console&&console.log("Error in style for "+A.id+": "+S)}try{var B=c.getAttribute("icon");if(null!=B){var J=0<B.length?JSON.parse(B):null;null!=J&&J.append||n.removeCellOverlays(A);null!=J&&n.addCellOverlay(A,e(J))}}catch(S){null!=
+window.console&&console.log("Error in icon for "+A.id+": "+S)}try{var M=c.getAttribute("geometry");if(null!=M){M=JSON.parse(M);var E=n.getCellGeometry(A);if(null!=E){E=E.clone();for(key in M){var L=parseFloat(M[key]);"dx"==key?E.x+=L:"dy"==key?E.y+=L:"dw"==key?E.width+=L:"dh"==key?E.height+=L:E[key]=parseFloat(M[key])}n.model.setGeometry(A,E)}}}catch(S){null!=window.console&&console.log("Error in icon for "+A.id+": "+S)}}}else if("model"==c.nodeName){for(var P=c.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=
+P.nextSibling;null!=P&&(new mxCodec(c.firstChild)).decode(P,t)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(y=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
+y)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=g.lastIndexOf(".");0<=p&&(c=g.substring(p),g=g.substring(0,p));if(e){e=g;var n=new Date;g=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),y=n.getHours(),A=n.getMinutes();n=n.getSeconds();g=e+(" "+(g+"-"+p+"-"+t+"-"+y+"-"+A+"-"+n))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=
+this.fileLoadedError=null;this.setCurrentFile(null);var p=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var n=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&
(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();
delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
-this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=c.getMode()){var q="1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
-action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=
-z;if(null!=c)try{c.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(y){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||p():p()});e?c():this.handleError(z,mxResources.get("errorLoadingFile"),c,!0,null,null,
-!0)}else p();return m};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,m=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var q=0;q<c.length;q++){this.updatePageRoot(c[q]);var z=c[q].node.cloneNode(!1);z.removeAttribute("name");m.root=c[q].root;var y=p.encode(m);this.editor.graph.saveViewState(c[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");z.appendChild(y);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,
-e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(A,x,I,M){return!M||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=x&&"y"!=x&&"width"!=x&&"height"!=x?M&&"mxCell"==A.nodeName&&"previous"==x?null:I:Math.round(I)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,
-e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var q=c.attributes[p].name,z=null!=e?e(c,q,c.attributes[p].value,!0):c.attributes[p].value;null!=z&&(m^=this.hashValue(q,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)m=(m<<5)-m+this.hashValue(c.childNodes[p],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<
-0;m^=e}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,m,p,q,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+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"));p=!0;if(!this.isOffline()&&null!=c.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
+action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=
+y;if(null!=c)try{c.close()}catch(A){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(A){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||n():n()});e?c():this.handleError(y,mxResources.get("errorLoadingFile"),c,!0,null,null,
+!0)}else n();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,p=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var y=c[t].node.cloneNode(!1);y.removeAttribute("name");p.root=c[t].root;var A=n.encode(p);this.editor.graph.saveViewState(c[t].viewState,A,!0);A.removeAttribute("pageWidth");A.removeAttribute("pageHeight");y.appendChild(A);null!=e&&(e.eltCount+=y.getElementsByTagName("*").length,
+e.nodeCount+=y.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(y,function(C,u,R,l){return!l||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=u&&"y"!=u&&"width"!=u&&"height"!=u?l&&"mxCell"==C.nodeName&&"previous"==u?null:R:Math.round(R)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,
+e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var n=0;n<c.attributes.length;n++){var t=c.attributes[n].name,y=null!=e?e(c,t,c.attributes[n].value,!0):c.attributes[n].value;null!=y&&(p^=this.hashValue(t,e,g)+this.hashValue(y,e,g))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)p=(p<<5)-p+this.hashValue(c.childNodes[n],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(n=0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<
+0;p^=e}return p};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,p,n,t,y){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var m=g.previousSibling;e.insertBefore(g,c);e.insertBefore(m,g)};EditorUi.prototype.loadLibrary=
-function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,m,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
-(this.scratchpad=c);var p=this.sidebar.palettes[c.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var q=null,z=mxUtils.bind(this,function(K,G){0==K.length&&c.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),G.appendChild(q)):this.addLibraryEntries(K,G)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,
-g.lastIndexOf("."))));var y=this.sidebar.addPalette(c.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(K){z(e,K)}));this.repositionLibrary(p);var A=y.parentNode.previousSibling;m=A.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&A.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var x=document.createElement("div");x.style.position="absolute";x.style.right="0px";x.style.top="0px";x.style.padding="8px";x.style.backgroundColor="inherit";A.style.position="relative";var I=
-document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var M=null;if(".scratchpad"!=c.title||this.closableScratchpad)x.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var G=
-mxUtils.bind(this,function(){this.closeLibrary(c)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G();mxEvent.consume(K)}}));if(c.isEditable()){var E=this.editor.graph,Q=null,n=mxUtils.bind(this,function(K){this.showLibraryDialog(c.getTitle(),y,e,c,c.getMode());mxEvent.consume(K)}),v=mxUtils.bind(this,function(K){c.setModified(!0);c.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=I.cloneNode(!1),
-Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",x.insertBefore(Q,x.firstChild),A.style.paddingRight=18*x.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&(Q.parentNode.removeChild(Q),A.style.paddingRight=18*x.childNodes.length+"px")})):null==M&&(M=I.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",
-mxResources.get("save")),x.insertBefore(M,x.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(G){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==M||c.isModified()||(A.style.paddingRight=18*x.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(G)})),A.style.paddingRight=18*x.childNodes.length+"px")}),D=mxUtils.bind(this,function(K,G,N,T){K=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(K)));for(var V=
-0;V<K.length;V++){var U=E.getCellGeometry(K[V]);null!=U&&U.translate(-G.x,-G.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(K,G.width,G.height,T||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:G.width,h:G.height};null!=T&&(K.title=T);e.push(K);v(N);null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),q=null)}),H=mxUtils.bind(this,function(K){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(K),E.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var G=E.getSelectionCells(),N=E.view.getBounds(G),T=E.view.scale;N.x/=T;N.y/=T;N.width/=T;N.height/=T;N.x-=E.view.translate.x;N.y-=E.view.translate.y;D(G,N)}mxEvent.consume(K)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility=
-"hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,H(K),mxEvent.consume(K))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.graphHandler.first&&
-(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(K){y.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(K){y.style.cursor="";y.style.backgroundColor=
-"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(G,N,T,V,U,X,l,B,L){if(null!=G&&"image/"==N.substring(0,6))G="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(G),G=[new mxCell("",new mxGeometry(0,0,U,X),G)],G[0].vertex=!0,D(G,new mxRectangle(0,0,U,X),K,mxEvent.isAltDown(K)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<e.length&&
-(q.parentNode.removeChild(q),q=null);else{var P=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var W=JSON.parse(mxUtils.getTextContent(R.documentElement));z(W,y);e=e.concat(W);v(K);this.spinner.stop();P=!0}catch(ba){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(W=0;W<aa.length;W++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(aa[W])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);D(Y,new mxRectangle(0,0,Z.width,Z.height),K)}P=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}P||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),q=null)});null!=L&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(L,function(R){O(R,
-"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,l)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(G,N)}}));
-K.stopPropagation();K.preventDefault()})),mxEvent.addListener(y,"dragleave",function(K){y.style.cursor="";y.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));x.insertBefore(I,x.firstChild);mxEvent.addListener(I,"click",n);mxEvent.addListener(y,"dblclick",function(K){mxEvent.getSource(K)==y&&n(K)});m=I.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",
-mxResources.get("add"));x.insertBefore(m,x.firstChild);mxEvent.addListener(m,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),x.insertBefore(m,x.firstChild))}A.appendChild(x);
-A.style.paddingRight=18*x.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var m=c[g],p=m.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(q+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(q+"image="+p,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(p=this.stringToCells(Graph.decompress(m.xml)),0<p.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(p,
-m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var p=g.previousSibling;e.insertBefore(g,c);e.insertBefore(p,g)};EditorUi.prototype.loadLibrary=
+function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var p=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,p,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,p){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
+(this.scratchpad=c);var n=this.sidebar.palettes[c.getHash()];n=null!=n?n[n.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var t=null,y=mxUtils.bind(this,function(P,S){0==P.length&&c.isEditable()?(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),S.appendChild(t)):this.addLibraryEntries(P,S)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,
+g.lastIndexOf("."))));var A=this.sidebar.addPalette(c.getHash(),g,null!=p?p:!0,mxUtils.bind(this,function(P){y(e,P)}));this.repositionLibrary(n);var C=A.parentNode.previousSibling;p=C.getAttribute("title");null!=p&&0<p.length&&".scratchpad"!=c.title&&C.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+p);var u=document.createElement("div");u.style.position="absolute";u.style.right="0px";u.style.top="0px";u.style.padding="8px";u.style.backgroundColor="inherit";C.style.position="relative";var R=
+document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var l=null;if(".scratchpad"!=c.title||this.closableScratchpad)u.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,function(P){if(!mxEvent.isConsumed(P)){var S=
+mxUtils.bind(this,function(){this.closeLibrary(c)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,S,mxResources.get("cancel"),mxResources.get("discardChanges")):S();mxEvent.consume(P)}}));if(c.isEditable()){var q=this.editor.graph,B=null,J=mxUtils.bind(this,function(P){this.showLibraryDialog(c.getTitle(),A,e,c,c.getMode());mxEvent.consume(P)}),M=mxUtils.bind(this,function(P){c.setModified(!0);c.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=R.cloneNode(!1),
+B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",u.insertBefore(B,u.firstChild),C.style.paddingRight=18*u.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),C.style.paddingRight=18*u.childNodes.length+"px")})):null==l&&(l=R.cloneNode(!1),l.setAttribute("src",Editor.saveImage),l.setAttribute("title",
+mxResources.get("save")),u.insertBefore(l,u.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(S){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==l||c.isModified()||(C.style.paddingRight=18*u.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(S)})),C.style.paddingRight=18*u.childNodes.length+"px")}),E=mxUtils.bind(this,function(P,S,V,X){P=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(P)));for(var m=
+0;m<P.length;m++){var z=q.getCellGeometry(P[m]);null!=z&&z.translate(-S.x,-S.y)}A.appendChild(this.sidebar.createVertexTemplateFromCells(P,S.width,S.height,X||"",!0,null,!1));P={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(P))),w:S.width,h:S.height};null!=X&&(P.title=X);e.push(P);M(V);null!=t&&null!=t.parentNode&&0<e.length&&(t.parentNode.removeChild(t),t=null)}),L=mxUtils.bind(this,function(P){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(P),q.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var S=q.getSelectionCells(),V=q.view.getBounds(S),X=q.view.scale;V.x/=X;V.y/=X;V.width/=X;V.height/=X;V.x-=q.view.translate.x;V.y-=q.view.translate.y;E(S,V)}mxEvent.consume(P)});mxEvent.addGestureListeners(A,function(){},mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.first&&(q.graphHandler.suspend(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
+"hidden"),A.style.backgroundColor="#f1f3f4",A.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,mxEvent.consume(P))}),mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(A.style.backgroundColor="",A.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,L(P),mxEvent.consume(P))}));mxEvent.addListener(A,"mouseleave",mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.graphHandler.first&&
+(q.graphHandler.resume(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),A.style.backgroundColor="",A.style.cursor="",q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(P){A.style.backgroundColor="#f1f3f4";P.dataTransfer.dropEffect="copy";A.style.cursor="copy";this.sidebar.hideTooltip();P.stopPropagation();P.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(P){A.style.cursor="";A.style.backgroundColor=
+"";0<P.dataTransfer.files.length&&this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(S,V,X,m,z,K,Q,N,U){if(null!=S&&"image/"==V.substring(0,6))S="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(S),S=[new mxCell("",new mxGeometry(0,0,z,K),S)],S[0].vertex=!0,E(S,new mxRectangle(0,0,z,K),P,mxEvent.isAltDown(P)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<e.length&&
+(t.parentNode.removeChild(t),t=null);else{var T=!1,W=mxUtils.bind(this,function(Z,ca){null!=Z&&"application/pdf"==ca&&(ca=Editor.extractGraphModelFromPdf(Z),null!=ca&&0<ca.length&&(Z=ca));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var ba=JSON.parse(mxUtils.getTextContent(Z.documentElement));y(ba,A);e=e.concat(ba);M(P);this.spinner.stop();T=!0}catch(da){}else if("mxfile"==Z.documentElement.nodeName)try{var fa=Z.documentElement.getElementsByTagName("diagram");for(ba=
+0;ba<fa.length;ba++){var Y=this.stringToCells(Editor.getDiagramNodeXml(fa[ba])),ha=this.editor.graph.getBoundingBoxFromGeometry(Y);E(Y,new mxRectangle(0,0,ha.width,ha.height),P)}T=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}T||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<e.length&&(t.parentNode.removeChild(t),t=null)});null!=U&&null!=Q&&(/(\.v(dx|sdx?))($|\?)/i.test(Q)||/(\.vs(x|sx?))($|\?)/i.test(Q))?
+this.importVisio(U,function(Z){W(Z,"text/xml")},null,Q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(S,Q)&&null!=U?this.isExternalDataComms()?this.parseFile(U,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?W(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+W(S,V)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(A,"dragleave",function(P){A.style.cursor="";A.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));u.insertBefore(R,u.firstChild);mxEvent.addListener(R,"click",J);mxEvent.addListener(A,"dblclick",function(P){mxEvent.getSource(P)==A&&J(P)});p=R.cloneNode(!1);p.setAttribute("src",Editor.plusImage);p.setAttribute("title",
+mxResources.get("add"));u.insertBefore(p,u.firstChild);mxEvent.addListener(p,"click",L);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(p=document.createElement("span"),p.setAttribute("title",mxResources.get("help")),p.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(p,"?"),mxEvent.addGestureListeners(p,mxUtils.bind(this,function(P){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(P)})),u.insertBefore(p,u.firstChild))}C.appendChild(u);
+C.style.paddingRight=18*u.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var p=c[g],n=p.data;if(null!=n){n=this.convertDataUri(n);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==p.aspect&&(t+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(t+"image="+n,p.w,p.h,"",p.title||"",!1,null,!0))}else null!=p.xml&&(n=this.stringToCells(Graph.decompress(p.xml)),0<n.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(n,
+p.w,p.h,p.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
-"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
-typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,m,p,q,z){c=new ImageDialog(this,c,e,g,m,p,q,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,m,p){c=new LibraryDialog(this,c,e,g,m,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);
-this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=
-e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,m,p,q,z){var y=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(Q){}if(null!=A||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var x=mxResources.get("ok"),I=null;e=null!=e?e:mxResources.get("error");if(null!=A){null!=
-A.retry&&(x=mxResources.get("cancel"),I=function(){y();A.retry()});if(404==A.code||404==A.status||403==A.code){z=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=p?null:null!=q?q: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!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==A.code||404==A.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(e,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(c,e,g,m,p)}),
-I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){H.innerText="";for(var K=0;K<n.length;K++){var G=document.createElement("option");mxUtils.write(G,n[K].displayName);G.value=K;H.appendChild(G);G=document.createElement("option");G.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(G,"<"+n[K].email+">");G.setAttribute("disabled","disabled");H.appendChild(G)}G=document.createElement("option");mxUtils.write(G,mxResources.get("addAccount"));G.value=n.length;H.appendChild(G)}var n=this.drive.getUsersList(),
-v=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");v.appendChild(D);var H=document.createElement("select");H.style.width="200px";Q();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var K=H.value,G=n.length!=K;G&&this.drive.setUser(n[K]);this.drive.authorize(G,mxUtils.bind(this,function(){G||(n=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(N){this.handleError(N)}),!0)}));v.appendChild(H);
-v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=A.message?z=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?z=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?
-z=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(z=mxUtils.htmlEntities(A)))}var E=q=null;null!=A&&null!=A.helpLink?(q=mxResources.get("help"),E=mxUtils.bind(this,function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),E=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,z,x,g,I,null,null,q,E,null,null,null,m?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,m,p,q){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&
-e()},function(){z();null!=g&&g()},m,p,null,null,null,null,y);this.showDialog(c.container,340,46+y,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,m){var p=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var q=document.createElement("div");q.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";p=document.createElement("img");p.setAttribute("src",IMAGE_PATH+"/logo.png");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(p);
-p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";q.appendChild(p);mxUtils.write(q,e);document.body.appendChild(q);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!m){e.appendChild(z);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));e.appendChild(y);q.style.paddingBottom="30px";q.appendChild(e)}var A=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,z.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);A()}));var x=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){var M=mxEvent.getSource(I);M!=z&&M!=y?(null!=g&&g(),A(),mxEvent.consume(I)):x()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(x,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,m){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,
-"tEXt","mxfile",encodeURIComponent(e))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,m,p){var q="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=e?".drawio":"")+"."+q;c=this.createImageDataUri(c,e,g,p);this.saveData(m,q,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,m,p,q){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||
-/(\.html)$/i.test(e)||(e=e+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,
-g,m);else{var z=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):!1)?!1:q}if(q||this.isOffline()){z.href=URL.createObjectURL(m?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
-2E4),z.click(),z.parentNode.removeChild(z)}catch(A){}}else this.createEchoRequest(c,e,g,m,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,m,p,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,m=Math.ceil(g/1024),p=Array(m),
-q=0;q<m;++q){for(var z=1024*q,y=Math.min(z+1024,g),A=Array(y-z),x=0;z<y;++x,++z)A[x]=c[z].charCodeAt(0);p[q]=new Uint8Array(A)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,m,p,q,z,y){q=null!=q?q:!1;z=null!=z?z:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var A=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(x,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,
-g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var M=new EmbedDialog(this,c);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var E=window.open("about:blank");null==E?mxUtils.popup(c,!0):(E.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),E.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,x,g,m,null,y):null!=x&&0<x.length&&this.pickFolder(I,mxUtils.bind(this,function(Q){try{this.exportFile(c,x,g,m,I,Q)}catch(n){this.handleError(n)}}))}catch(Q){this.handleError(Q)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,z,null,1<p,A,c,g,m);q=this.isServices(p)?p>A?390:280:160;this.showDialog(e.container,420,q,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),m.document.write('<html><img style="max-width:100%;" src="data:'+
-e+";base64,"+c+'"/></html>')):m.document.write("<html>"+c+"</html>"):m.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),m.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var e=c(mxUtils.bind(this,function(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();e.style.display=0<m.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",
-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,
-function(m){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);else{this.exportDialog=document.createElement("div");var q=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=q.zIndex;var z=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});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(y){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight=
-"140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",A);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,m,p){this.isLocalFileSave()?this.saveLocalFile(g,c,m,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(q,z){return this.createEchoRequest(g,q,m,p,e,z)}),g,p,m)};EditorUi.prototype.saveRequest=function(c,e,g,m,p,q,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;
-var y=this.getServiceCount(!1);isLocalStorage&&y++;var A=4>=y?2:6<y?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(x,I){if("_blank"==I||null!=x&&0<x.length){var M=g("_blank"==I?null:x,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=M&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?M.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(E){q=null!=q?q:"pdf"==e?"application/pdf":"image/"+e;if(null!=m)try{this.exportFile(m,x,q,!0,I,E)}catch(Q){this.handleError(Q)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),x,q,!0,I,E)}catch(Q){this.handleError(Q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Q){this.spinner.stop();this.handleError(Q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<y,A,m,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(c.container,
-420,y,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,m,p,q){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,m,p,q,z,y,A,x,I,M,E,Q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var n=this.editor.graph.isSelectionEmpty();g=null!=g?g:n;var v=e?null:this.editor.graph.background;v==mxConstants.NONE&&
-(v=null);null==v&&0==e&&(v=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var D=this.editor.graph.getSvg(v,c,z,y,null,g,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!E,I,M);m&&this.editor.graph.addSvgShadow(D);var H=this.getBaseFilename()+(p?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(N)}))});var K=mxUtils.bind(this,function(N){this.spinner.stop();p&&N.setAttribute("content",this.getFileData(!0,null,null,null,g,A,null,null,null,!1));Q(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var G=mxUtils.bind(this,function(N){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,K,this.thumbImageCache)):
-K(N)});E?this.embedFonts(D,G):(this.editor.addFontCss(D),G(D))}catch(N){this.handleError(N)}};EditorUi.prototype.addRadiobox=function(c,e,g,m,p,q,z){return this.addCheckbox(c,g,m,p,q,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,m,p,q,z,y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();A.id=z;null!=y&&A.setAttribute("name",y);g&&(A.setAttribute("checked","checked"),
-A.defaultChecked=!0);m&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),p||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),p="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");
-q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");q.appendChild(m);c.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var z=new FilenameDialog(this,
-p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};
-EditorUi.prototype.addLinkSection=function(c,e){function g(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(y)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");
-m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));
-m.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(e));c.appendChild(m);mxUtils.write(c,mxResources.get("borderColor")+":");var q="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(A){q=A;g()});mxEvent.consume(y)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height=
-"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return q},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,m,p,q,z){z=null!=z?z:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!=
-e&&e!=mxConstants.NONE&&z.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&z.push("edit="+encodeURIComponent(p)),q&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,e,g,m,p,q,z,y,A,x){A=this.createUrlParameters(c,e,g,m,p,q,A);c=this.getCurrentFile();e=!0;null!=z?g="#U"+encodeURIComponent(z):
-(c=this.getCurrentFile(),y||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));x&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,m,p,q,z,y,A,x,I,M){this.getBasenames();var E={};""!=p&&p!=mxConstants.NONE&&(E.highlight=p);"auto"!==m&&(E.target=m);x||(E.lightbox=!1);E.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(E.zoom=g/100);g=[];z&&(g.push("pages"),E.resize=!0,null!=this.pages&&null!=this.currentPage&&(E.page=mxUtils.indexOf(this.pages,
-this.currentPage)));e&&(g.push("zoom"),E.resize=!0);y&&g.push("layers");A&&g.push("tags");0<g.length&&(x&&g.push("lightbox"),E.toolbar=g.join(" "));null!=I&&0<I.length&&(E.edit=I);null!=c?E.url=c:E.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(E))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";M(e,'<script type="text/javascript" src="'+
-(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");z.appendChild(q);var A=document.createElement("span");
-mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(A);mxUtils.br(z);z.appendChild(y);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));z.appendChild(A);var x=this.getCurrentFile();null==g&&null!=x&&x.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),z.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(x.getId())})));q.setAttribute("checked","checked");null==g&&y.setAttribute("disabled","disabled");p.appendChild(z);var I=this.addLinkSection(p),M=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");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%";p.appendChild(E);var Q=this.addCheckbox(p,mxResources.get("fit"),!0);
-z=null!=this.pages&&1<this.pages.length;var n=n=this.addCheckbox(p,mxResources.get("allPages"),z,!z),v=this.addCheckbox(p,mxResources.get("layers"),!0),D=this.addCheckbox(p,mxResources.get("tags"),!0),H=this.addCheckbox(p,mxResources.get("lightbox"),!0),K=null;z=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(p,H);var G=K.getEditInput();G.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled");
-G.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){m(y.checked?g:null,M.checked,E.value,I.getTarget(),I.getColor(),Q.checked,n.checked,v.checked,D.checked,H.checked,null!=K?K.getLink():null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,m,p,q,z,y){var A=document.createElement("div");A.style.whiteSpace=
-"nowrap";var x=document.createElement("h3");mxUtils.write(x,c||mxResources.get("link"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(x);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||e)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";x=document.createElement("div");x.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"));x.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));M.style.marginTop="12px";M.className="geBtn";x.appendChild(M);A.appendChild(x);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));x.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(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var E=null,Q=null;if(null!=g||null!=m)c+=30,mxUtils.write(A,mxResources.get("width")+":"),E=document.createElement("input"),
-E.setAttribute("type","text"),E.style.marginRight="16px",E.style.width="50px",E.style.marginLeft="6px",E.style.marginRight="16px",E.style.marginBottom="10px",E.value="100%",A.appendChild(E),mxUtils.write(A,mxResources.get("height")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginBottom="10px",Q.value=m+"px",A.appendChild(Q),mxUtils.br(A);var n=this.addLinkSection(A,q);g=null!=this.pages&&1<this.pages.length;var v=null;
-if(null==I||I.constructor!=window.DriveFile||e)v=this.addCheckbox(A,mxResources.get("allPages"),g,!g);var D=this.addCheckbox(A,mxResources.get("lightbox"),!0,null,null,!q),H=this.addEditButton(A,D),K=H.getEditInput();q&&(K.style.marginLeft=D.style.marginLeft,D.style.display="none",c-=20);var G=this.addCheckbox(A,mxResources.get("layers"),!0);G.style.marginLeft=K.style.marginLeft;G.style.marginTop="8px";var N=this.addCheckbox(A,mxResources.get("tags"),!0);N.style.marginLeft=K.style.marginLeft;N.style.marginBottom=
-"16px";N.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(G.removeAttribute("disabled"),K.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,A,mxUtils.bind(this,function(){p(n.getTarget(),n.getColor(),null==v?!0:v.checked,D.checked,H.getLink(),G.checked,null!=E?E.value:null,
-null!=Q?Q.value:null,N.checked)}),null,mxResources.get("create"),z,y);this.showDialog(e.container,340,300+c,!0,!0);null!=E?(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,m,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(p?"10":"4")+"px";q.appendChild(z);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=
-this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var x=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=m?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var M=m?null:this.addCheckbox(q,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var E=
-parseInt(y.value)/100||1,Q=parseInt(A.value)||0;g(!x.checked,null!=I?I.checked:!1,null!=M?M.checked:!1,E,Q)}),null,c,e);this.showDialog(c.container,300,(p?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,m,p,q,z,y,A){z=null!=z?z:Editor.defaultIncludeDiagram;var x=document.createElement("div");x.style.whiteSpace="nowrap";var I=this.editor.graph,M="jpeg"==y?220:300,E=document.createElement("h3");mxUtils.write(E,c);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-x.appendChild(E);mxUtils.write(x,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%";x.appendChild(Q);mxUtils.write(x,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||
-"0";x.appendChild(n);mxUtils.br(x);var v=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var K={};for(E=0;E<c.length;E++)if(!I.isSelectionEmpty()||"selectionOnly"!=
-c[E]){var G=document.createElement("option");mxUtils.write(G,mxResources.get(c[E]));G.setAttribute("value",c[E]);H.appendChild(G);K[c[E]]=G}A?(mxUtils.write(x,mxResources.get("size")+":"),x.appendChild(H),mxUtils.br(x),M+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(v.checked=!0)})):q&&(x.appendChild(D),mxUtils.write(x,mxResources.get("crop")),mxUtils.br(x),M+=30,mxEvent.addListener(v,"change",function(){v.checked?D.removeAttribute("disabled"):D.setAttribute("disabled",
-"disabled")}));I.isSelectionEmpty()?A&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",M-=30):(H.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(v,"change",function(){H.value=v.checked?"selectionOnly":"diagram"}));var N=this.addCheckbox(x,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(x,mxResources.get("dark"),!0),M+=26);var V=this.addCheckbox(x,
-mxResources.get("shadow"),I.shadowVisible),U=null;if("png"==y||"jpeg"==y)U=this.addCheckbox(x,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var X=this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),z,null,null,"jpeg"!=y);X.style.marginBottom="16px";var l=document.createElement("input");l.style.marginBottom="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||l.setAttribute("disabled","disabled");var B=
-document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.style.marginBottom="16px";B.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));B.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));B.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||B.appendChild(q);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){"lblToSvg"==B.value?(l.checked=!0,l.setAttribute("disabled","disabled"),K.page.style.display="none","page"==H.value&&(H.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),P.style.display="inline-block",L.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),V.removeAttribute("disabled"),
-K.page.style.display="",P.style.display="none",L.style.display="")}));e&&(x.appendChild(l),mxUtils.write(x,mxResources.get("embedImages")),mxUtils.br(x),mxUtils.write(x,mxResources.get("txtSettings")+":"),x.appendChild(B),mxUtils.br(x),M+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));L.appendChild(e);
-e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));L.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));L.appendChild(e);var P=document.createElement("div");mxUtils.write(P,mxResources.get("LinksLost"));P.style.margin="7px";P.style.display="none";"svg"==y&&(mxUtils.write(x,mxResources.get("links")+":"),x.appendChild(L),x.appendChild(P),mxUtils.br(x),
-mxUtils.br(x),M+=50);g=new CustomDialog(this,x,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=Q.value;p(Q.value,N.checked,!v.checked,V.checked,X.checked,l.checked,n.value,D.checked,!1,L.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==B.value,"lblToSvg"==B.value)}),null,g,m);this.showDialog(g.container,340,M,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,m,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var y=document.createElement("h3");mxUtils.write(y,e);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var A=this.addCheckbox(q,mxResources.get("fit"),!0),x=this.addCheckbox(q,mxResources.get("shadow"),z.shadowVisible&&m,!m),I=this.addCheckbox(q,g),M=this.addCheckbox(q,mxResources.get("lightbox"),
-!0),E=this.addEditButton(q,M),Q=E.getEditInput(),n=1<z.model.getChildCount(z.model.getRoot()),v=this.addCheckbox(q,mxResources.get("layers"),n,!n);v.style.marginLeft=Q.style.marginLeft;v.style.marginBottom="12px";v.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(n&&v.removeAttribute("disabled"),Q.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&M.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled",
-"disabled")});e=new CustomDialog(this,q,mxUtils.bind(this,function(){c(A.checked,x.checked,I.checked,M.checked,E.getLink(),v.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,m,p,q,z,y){function A(Q){var n=" ",v="";m&&(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.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",v+="cursor:pointer;");c&&(v+="max-width:100%;");var D="";g&&(D=' width="'+Math.round(x.width)+'" height="'+Math.round(x.height)+'"');z('<img src="'+Q+'"'+D+(""!=v?' style="'+v+'"':"")+n+"/>")}var x=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var n=m?this.getFileData(!0):null;Q=
-this.createImageDataUri(Q,n,"png");A(Q)}),null,null,null,mxUtils.bind(this,function(Q){y({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),x.width*x.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var M="";g&&(M="&w="+Math.round(2*x.width)+"&h="+Math.round(2*x.height));var E=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+M+"&xml="+encodeURIComponent(e));E.send(mxUtils.bind(this,function(){200<=E.getStatus()&&
-299>=E.getStatus()?A("data:image/png;base64,"+E.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,m,p,q,z){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),A=y.getElementsByTagName("a");if(null!=A)for(var x=0;x<A.length;x++){var I=A[x].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==A[x].getAttribute("target")&&A[x].removeAttribute("target")}m&&
-y.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(y);if(g){var M=" ",E="";m&&(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.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",E+="cursor:pointer;");c&&(E+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(Q){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=E?' style="'+E+'"':"")+M+"/>")}))}else E="",m&&(e=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),E+="cursor:pointer;"),c&&(c=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),E+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=E&&y.setAttribute("style",E),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),z(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(c){c=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};"1"!=urlParams["live-ui"]&&EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,
+p,n,t,y){c=new ImageDialog(this,c,e,g,p,n,t,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,p){p||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,p,n){c=new LibraryDialog(this,
+c,e,g,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");
+c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(p){p.preventDefault()}));mxEvent.addListener(e,
+"click",mxUtils.bind(this,function(p){this.actions.get("shapes").funct();mxEvent.consume(p)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,p,n,t,y){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{y?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,
+c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(B){}if(null!=C||null!=e){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var u=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(u=mxResources.get("cancel"),R=function(){A();C.retry()});if(404==C.code||404==C.status||403==C.code){y=403==C.code?null!=C.message?mxUtils.htmlEntities(C.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+")":""));var l=null!=n?null:null!=t?t: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!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==C.code||404==C.status)){l="#U"==l.substring(0,
+2)?l.substring(45,l.lastIndexOf("%26ex")):l.substring(2);this.showError(e,y,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+l);this.handleError(c,e,g,p,n)}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function B(){L.innerText="";for(var P=0;P<J.length;P++){var S=document.createElement("option");mxUtils.write(S,J[P].displayName);S.value=P;L.appendChild(S);S=document.createElement("option");S.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(S,"<"+J[P].email+">");S.setAttribute("disabled","disabled");L.appendChild(S)}S=document.createElement("option");mxUtils.write(S,mxResources.get("addAccount"));S.value=J.length;L.appendChild(S)}var J=this.drive.getUsersList(),M=document.createElement("div"),E=document.createElement("span");E.style.marginTop="6px";mxUtils.write(E,mxResources.get("changeUser")+": ");M.appendChild(E);var L=document.createElement("select");L.style.width="200px";B();mxEvent.addListener(L,"change",mxUtils.bind(this,
+function(){var P=L.value,S=J.length!=P;S&&this.drive.setUser(J[P]);this.drive.authorize(S,mxUtils.bind(this,function(){S||(J=this.drive.getUsersList(),B())}),mxUtils.bind(this,function(V){this.handleError(V)}),!0)}));M.appendChild(L);M=new CustomDialog(this,M,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(M.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=C.message?
+y=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name):mxUtils.htmlEntities(C.message):null!=C.response&&null!=C.response.error?y=mxUtils.htmlEntities(C.response.error):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?y=mxUtils.htmlEntities(mxResources.get("timeout")):C.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof C&&0<C.length&&(y=mxUtils.htmlEntities(C)))}var q=t=null;null!=C&&null!=C.helpLink?(t=mxResources.get("help"),q=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail&&(t=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+t+": "+C.ownerEmail+")"),q=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))}));this.showError(e,y,u,g,R,null,null,t,q,null,null,null,p?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
+c.init()};EditorUi.prototype.confirm=function(c,e,g,p,n,t){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){y();null!=e&&e()},function(){y();null!=g&&g()},p,n,null,null,null,null,A);this.showDialog(c.container,340,46+A,!0,t);c.init()};EditorUi.prototype.showBanner=function(c,e,g,p){var n=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=
+mxSettings.settings["close"+c])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";
+n=document.createElement("img");n.setAttribute("src",IMAGE_PATH+"/logo.png");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(n);n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));n.setAttribute("border","0");n.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+t.appendChild(n);mxUtils.write(t,e);document.body.appendChild(t);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("id","geDoNotShowAgainCheckbox");y.style.marginRight="6px";if(!p){e.appendChild(y);var A=document.createElement("label");A.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(A,mxResources.get("doNotShowAgain"));e.appendChild(A);
+t.style.paddingBottom="30px";t.appendChild(e)}var C=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,y.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(n,"click",mxUtils.bind(this,function(R){mxEvent.consume(R);C()}));var u=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){C()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(R){var l=mxEvent.getSource(R);l!=y&&l!=A?(null!=g&&g(),C(),mxEvent.consume(R)):u()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(u,3E4);n=!0}return n};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,p){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<p&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",p));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,p,n){var t="jpeg"==g?"jpg":g;p=this.getBaseFilename(p)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,
+e,g,n);this.saveData(p,t,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,p,n,t){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=p?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
+g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,p);else{var y=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(A?parseInt(A[2],10):
+!1)?!1:t}if(t||this.isOffline()){y.href=URL.createObjectURL(p?this.base64ToBlob(c,g):new Blob([c],{type:g}));t?y.download=e:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},2E4),y.click(),y.parentNode.removeChild(y)}catch(C){}}else this.createEchoRequest(c,e,g,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+g?"&mime="+g:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,p=Math.ceil(g/1024),n=Array(p),t=0;t<p;++t){for(var y=1024*t,A=Math.min(y+1024,g),C=Array(A-y),u=0;y<A;++u,++y)C[u]=c[y].charCodeAt(0);n[t]=new Uint8Array(C)}return new Blob(n,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,p,n,t,y,A){t=null!=t?t:!1;y=null!=y?y:"vsdx"!=
+n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(t);isLocalStorage&&n++;var C=4>=n?2:6<n?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(u,R){try{if("_blank"==R)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,p);else if(null!=g&&"text/html"==g.substring(0,9)){var l=new EmbedDialog(this,c);this.showDialog(l.container,450,240,!0,!0);l.init()}else{var q=window.open("about:blank");null==q?mxUtils.popup(c,!0):(q.document.write("<pre>"+mxUtils.htmlEntities(c,
+!1)+"</pre>"),q.document.close())}else R==App.MODE_DEVICE||"download"==R?this.doSaveLocalFile(c,u,g,p,null,A):null!=u&&0<u.length&&this.pickFolder(R,mxUtils.bind(this,function(B){try{this.exportFile(c,u,g,p,R,B)}catch(J){this.handleError(J)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,y,null,1<n,C,c,g,p);t=this.isServices(n)?n>C?390:280:160;this.showDialog(e.container,420,t,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
+function(c,e,g){var p=window.open("about:blank");null==p||null==p.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),p.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):p.document.write("<html>"+c+"</html>"):p.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),p.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(p){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
+"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
+"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var n=e.getBoundingClientRect();this.tagsDialog.style.left=n.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";n=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=n.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(p)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var p=this.editor.graph.getAllTags();e.style.display=0<p.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,function(p){var n=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",n);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)n.apply(this);
+else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=t.zIndex;var y=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});y.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(A){y.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);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",n);document.body.appendChild(this.exportDialog)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,p,n){this.isLocalFileSave()?
+this.saveLocalFile(g,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,y){return this.createEchoRequest(g,t,p,n,e,y)}),g,n,p)};EditorUi.prototype.saveRequest=function(c,e,g,p,n,t,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;var A=this.getServiceCount(!1);isLocalStorage&&A++;var C=4>=A?2:6<A?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(u,R){if("_blank"==R||null!=u&&0<u.length){var l=g("_blank"==R?null:u,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");
+null!=l&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?l.simulate(document,"_blank"):this.pickFolder(R,mxUtils.bind(this,function(q){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,u,t,!0,R,q)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),u,t,!0,R,q)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(B){this.spinner.stop();this.handleError(B)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,y,null,1<A,C,p,t,n);A=this.isServices(A)?4<A?390:280:160;this.showDialog(c.container,420,A,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,p,n,t){};EditorUi.prototype.pickFolder=function(c,
+e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,p,n,t,y,A,C,u,R,l,q,B){if(this.spinner.spin(document.body,mxResources.get("export")))try{var J=this.editor.graph.isSelectionEmpty();g=null!=g?g:J;var M=e?null:this.editor.graph.background;M==mxConstants.NONE&&(M=null);null==M&&0==e&&(M=R?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var E=this.editor.graph.getSvg(M,c,y,A,null,g,null,null,"blank"==u?"_blank":"self"==u?"_top":null,null,!q,R,l);p&&this.editor.graph.addSvgShadow(E);var L=
+this.getBaseFilename()+(n?".drawio":"")+".svg";B=null!=B?B:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(L,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var P=mxUtils.bind(this,function(V){this.spinner.stop();n&&V.setAttribute("content",this.getFileData(!0,null,null,null,g,C,null,null,null,!1));B(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(E);var S=mxUtils.bind(this,function(V){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,P,this.thumbImageCache)):P(V)});q?this.embedFonts(E,S):(this.editor.addFontCss(E),S(E))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(c,e,g,p,n,t,y){return this.addCheckbox(c,g,p,n,t,y,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,p,n,t,y,
+A){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();C.id=y;null!=A&&C.setAttribute("name",A);g&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",y),c.appendChild(g),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,
+e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);
+p=document.createElement("option");p.setAttribute("value","custom");mxUtils.write(p,mxResources.get("custom")+"...");t.appendChild(p);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var y=new FilenameDialog(this,n,mxResources.get("ok"),function(A){null!=A?n=A:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
+function(){g.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return g},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var A=document.createElement("div");A.style.width="100%";A.style.height="100%";A.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(A.style.border="1px solid black",
+A.style.backgroundColor=t):(A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",A.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(A)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));
+p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+
+":");var t="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(A){this.pickColor(t||"none",function(C){t=C;g()});mxEvent.consume(A)}));g();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height="22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";c.appendChild(y);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},
+focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,p,n,t,y){y=null!=y?y:[];p&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=c&&y.push("target="+c),null!=e&&e!=mxConstants.NONE&&y.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=n&&0<n.length&&y.push("edit="+encodeURIComponent(n)),t&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
+this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(c,e,g,p,n,t,y,A,C,u){C=this.createUrlParameters(c,e,g,p,n,t,C);c=this.getCurrentFile();e=!0;null!=y?g="#U"+encodeURIComponent(y):(c=this.getCurrentFile(),A||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
+null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(c.getTitle()));u&&1<g.length&&(C.push("open="+g.substring(1)),g="");return(p&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,p,n,t,y,A,C,u,R,l){this.getBasenames();var q={};""!=
+n&&n!=mxConstants.NONE&&(q.highlight=n);"auto"!==p&&(q.target=p);u||(q.lightbox=!1);q.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(q.zoom=g/100);g=[];y&&(g.push("pages"),q.resize=!0,null!=this.pages&&null!=this.currentPage&&(q.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),q.resize=!0);A&&g.push("layers");C&&g.push("tags");0<g.length&&(u&&g.push("lightbox"),q.toolbar=g.join(" "));null!=R&&0<R.length&&(q.edit=R);null!=c?q.url=c:q.xml=this.getFileData(!0,
+null,null,null,null,!y);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(q))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";l(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var A=document.createElement("input");
+A.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";A.setAttribute("value","url");A.setAttribute("type","radio");A.setAttribute("name","type-embedhtmldialog");t=A.cloneNode(!0);t.setAttribute("value","copy");y.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(C);mxUtils.br(y);y.appendChild(A);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));y.appendChild(C);var u=this.getCurrentFile();
+null==g&&null!=u&&u.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),y.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})));t.setAttribute("checked","checked");null==g&&A.setAttribute("disabled","disabled");n.appendChild(y);var R=this.addLinkSection(n),l=this.addCheckbox(n,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(n,":");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="100%";n.appendChild(q);var B=this.addCheckbox(n,mxResources.get("fit"),!0);y=null!=this.pages&&1<this.pages.length;var J=J=this.addCheckbox(n,mxResources.get("allPages"),y,!y),M=this.addCheckbox(n,mxResources.get("layers"),!0),E=this.addCheckbox(n,mxResources.get("tags"),!0),L=this.addCheckbox(n,
+mxResources.get("lightbox"),!0),P=null;y=380;if(EditorUi.enableHtmlEditOption){P=this.addEditButton(n,L);var S=P.getEditInput();S.style.marginBottom="16px";y+=50;mxEvent.addListener(L,"change",function(){L.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");S.checked&&L.checked?P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){p(A.checked?g:null,l.checked,q.value,R.getTarget(),
+R.getColor(),B.checked,J.checked,M.checked,E.checked,L.checked,null!=P?P.getLink():null)}),null,c,e);this.showDialog(c.container,340,y,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,p,n,t,y,A){var C=document.createElement("div");C.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,c||mxResources.get("link"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(u);var R=this.getCurrentFile();c=0;if(null==
+R||R.constructor!=window.DriveFile||e)y=null!=y?y:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;y=null!=y?y:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";u=document.createElement("div");u.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"));u.appendChild(l);l=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(R.getId())}));l.style.marginTop="12px";l.className="geBtn";u.appendChild(l);C.appendChild(u);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.style.cursor="pointer";mxUtils.write(l,mxResources.get("check"));u.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(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,300,80,!0,!1);X.init()}))}))}var q=null,B=null;if(null!=g||null!=p)c+=30,mxUtils.write(C,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%",C.appendChild(q),mxUtils.write(C,mxResources.get("height")+":"),B=document.createElement("input"),B.setAttribute("type","text"),B.style.width="50px",B.style.marginLeft="6px",B.style.marginBottom="10px",B.value=p+"px",C.appendChild(B),mxUtils.br(C);var J=this.addLinkSection(C,t);g=null!=this.pages&&1<this.pages.length;var M=null;if(null==R||R.constructor!=window.DriveFile||e)M=this.addCheckbox(C,mxResources.get("allPages"),g,!g);var E=this.addCheckbox(C,mxResources.get("lightbox"),!0,
+null,null,!t),L=this.addEditButton(C,E),P=L.getEditInput();t&&(P.style.marginLeft=E.style.marginLeft,E.style.display="none",c-=20);var S=this.addCheckbox(C,mxResources.get("layers"),!0);S.style.marginLeft=P.style.marginLeft;S.style.marginTop="8px";var V=this.addCheckbox(C,mxResources.get("tags"),!0);V.style.marginLeft=P.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(S.removeAttribute("disabled"),P.removeAttribute("disabled")):
+(S.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&E.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,C,mxUtils.bind(this,function(){n(J.getTarget(),J.getColor(),null==M?!0:M.checked,E.checked,L.getLink(),S.checked,null!=q?q.value:null,null!=B?B.value:null,V.checked)}),null,mxResources.get("create"),y,A);this.showDialog(e.container,340,300+c,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";t.appendChild(y);if(n){mxUtils.write(t,mxResources.get("zoom")+":");var A=document.createElement("input");
+A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value=this.lastExportZoom||"100%";t.appendChild(A);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var u=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var l=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=l&&(l.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var q=parseInt(A.value)/100||1,B=parseInt(C.value)||0;g(!u.checked,null!=R?R.checked:!1,null!=l?l.checked:!1,q,B)}),null,c,e);
+this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,p,n,t,y,A,C){y=null!=y?y:Editor.defaultIncludeDiagram;var u=document.createElement("div");u.style.whiteSpace="nowrap";var R=this.editor.graph,l="jpeg"==A?220:300,q=document.createElement("h3");mxUtils.write(q,c);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";u.appendChild(q);mxUtils.write(u,mxResources.get("zoom")+":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value=this.lastExportZoom||"100%";u.appendChild(B);mxUtils.write(u,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";u.appendChild(J);mxUtils.br(u);var M=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,
+R.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");var L=document.createElement("select");L.style.marginTop="16px";L.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var P={};for(q=0;q<c.length;q++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[q]){var S=document.createElement("option");mxUtils.write(S,mxResources.get(c[q]));S.setAttribute("value",
+c[q]);L.appendChild(S);P[c[q]]=S}C?(mxUtils.write(u,mxResources.get("size")+":"),u.appendChild(L),mxUtils.br(u),l+=26,mxEvent.addListener(L,"change",function(){"selectionOnly"==L.value&&(M.checked=!0)})):t&&(u.appendChild(E),mxUtils.write(u,mxResources.get("crop")),mxUtils.br(u),l+=30,mxEvent.addListener(M,"change",function(){M.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?C&&(M.style.display="none",M.nextSibling.style.display="none",M.nextSibling.nextSibling.style.display=
+"none",l-=30):(L.value="diagram",E.setAttribute("checked","checked"),E.defaultChecked=!0,mxEvent.addListener(M,"change",function(){L.value=M.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(u,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=A),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(u,mxResources.get("dark"),!0),l+=26);var m=this.addCheckbox(u,mxResources.get("shadow"),R.shadowVisible),z=null;if("png"==A||"jpeg"==A)z=this.addCheckbox(u,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=30;var K=this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),y,null,null,"jpeg"!=A);K.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");var N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="8px";N.style.marginRight="10px";N.style.marginBottom="16px";
+N.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,mxResources.get("noChange"));N.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));N.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||N.appendChild(t);mxEvent.addListener(N,"change",mxUtils.bind(this,
+function(){"lblToSvg"==N.value?(Q.checked=!0,Q.setAttribute("disabled","disabled"),P.page.style.display="none","page"==L.value&&(L.value="diagram"),m.checked=!1,m.setAttribute("disabled","disabled"),T.style.display="inline-block",U.style.display="none"):"disabled"==Q.getAttribute("disabled")&&(Q.checked=!1,Q.removeAttribute("disabled"),m.removeAttribute("disabled"),P.page.style.display="",T.style.display="none",U.style.display="")}));e&&(u.appendChild(Q),mxUtils.write(u,mxResources.get("embedImages")),
+mxUtils.br(u),mxUtils.write(u,mxResources.get("txtSettings")+":"),u.appendChild(N),mxUtils.br(u),l+=60);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));U.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));U.appendChild(e);
+e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));U.appendChild(e);var T=document.createElement("div");mxUtils.write(T,mxResources.get("LinksLost"));T.style.margin="7px";T.style.display="none";"svg"==A&&(mxUtils.write(u,mxResources.get("links")+":"),u.appendChild(U),u.appendChild(T),mxUtils.br(u),mxUtils.br(u),l+=50);g=new CustomDialog(this,u,mxUtils.bind(this,function(){this.lastExportBorder=J.value;this.lastExportZoom=B.value;
+n(B.value,V.checked,!M.checked,m.checked,K.checked,Q.checked,J.value,E.checked,!1,U.value,null!=z?z.checked:null,null!=X?X.checked:null,L.value,"embedFonts"==N.value,"lblToSvg"==N.value)}),null,g,p);this.showDialog(g.container,340,l,!0,!0,null,null,null,null,!0);B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";
+var y=this.editor.graph;if(null!=e){var A=document.createElement("h3");mxUtils.write(A,e);A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(A)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),u=this.addCheckbox(t,mxResources.get("shadow"),y.shadowVisible&&p,!p),R=this.addCheckbox(t,g),l=this.addCheckbox(t,mxResources.get("lightbox"),!0),q=this.addEditButton(t,l),B=q.getEditInput(),J=1<y.model.getChildCount(y.model.getRoot()),M=this.addCheckbox(t,mxResources.get("layers"),
+J,!J);M.style.marginLeft=B.style.marginLeft;M.style.marginBottom="12px";M.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(J&&M.removeAttribute("disabled"),B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&l.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,u.checked,R.checked,
+l.checked,q.getLink(),M.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,p,n,t,y,A){function C(B){var J=" ",M="";p&&(J=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");c&&(M+="max-width:100%;");var E="";g&&(E=' width="'+Math.round(u.width)+'" height="'+Math.round(u.height)+'"');y('<img src="'+B+'"'+E+(""!=M?' style="'+M+'"':"")+J+"/>")}var u=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(B){var J=p?this.getFileData(!0):null;B=
+this.createImageDataUri(B,J,"png");C(B)}),null,null,null,mxUtils.bind(this,function(B){A({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),u.width*u.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var l="";g&&(l="&w="+Math.round(2*u.width)+"&h="+Math.round(2*u.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+l+"&xml="+encodeURIComponent(e));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
+299>=q.getStatus()?C("data:image/png;base64,"+q.getText()):A({message:mxResources.get("unknownError")})}))}else A({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,p,n,t,y){var A=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),C=A.getElementsByTagName("a");if(null!=C)for(var u=0;u<C.length;u++){var R=C[u].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[u].getAttribute("target")&&C[u].removeAttribute("target")}p&&
+A.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(A);if(g){var l=" ",q="";p&&(l="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":
+"")+"');}})(this);\"",q+="cursor:pointer;");c&&(q+="max-width:100%;");this.editor.convertImages(A,mxUtils.bind(this,function(B){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(B))+'"'+(""!=q?' style="'+q+'"':"")+l+"/>")}))}else q="",p&&(e=this.getSelectedPageIndex(),A.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),c&&(c=parseInt(A.getAttribute("width")),n=parseInt(A.getAttribute("height")),A.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),q+="max-width:100%;max-height:"+n+"px;",A.removeAttribute("height")),""!=q&&A.setAttribute("style",q),this.editor.addFontCss(A),this.editor.graph.mathEnabled&&this.editor.addMathCss(A),y(mxUtils.getXml(A))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
-c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){g=m[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:p.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=m}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
-c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(e=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,m,p){try{var q=this.editor.graph,z=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(z?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),q),y=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(z?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var x=this.pages[0];this.currentPage==x?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=x.viewState&&null!=x.viewState&&q.setBackgroundImage(x.viewState.backgroundImage);q.getGlobalVariable=function(I){return"page"==I?x.getName():"pagenumber"==I?1:A.apply(this,
-arguments)};document.body.appendChild(q.container);q.model.setRoot(x.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=I.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(y));c(M.substring(M.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(E){null!=e&&e(E)}}),null,null,null,mxUtils.bind(this,function(I){null!=e&&
-e(I)}),null,null,m,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(I){null!=e&&e(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,m,p,q,z,y,A,x,I,M,E){y=null!=y?y:!0;I=null!=I?I:0;z=null!=A?A:e.background;z==mxConstants.NONE&&(z=null);q=e.getSvg(z,x,I,null,null,q,null,null,null,e.shadowVisible||M,null,E,"diagram");(e.shadowVisible||M)&&e.addSvgShadow(q,null,null,0==I);null!=c&&q.setAttribute("content",c);null!=g&&q.setAttribute("resource",g);var Q=mxUtils.bind(this,function(n){n=
-(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(n);null!=p&&p(n);return n});e.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(n){y?this.editor.convertImages(n,mxUtils.bind(this,function(v){Q(v)})):Q(n)}));else return Q(q)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(m){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,m,p,q,z,y,A,x,I,M,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Q=this.editor.graph.isSelectionEmpty();g=null!=g?g:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(n){this.spinner.stop();try{this.saveCanvas(n,
-p?this.getFileData(!0,null,null,null,g,y):null,A,null==this.pages||0==this.pages.length,I)}catch(v){this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,g,c||1,e,m,null,null,q,z,x,M,E)}catch(n){this.spinner.stop(),this.handleError(n)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,m,p,q,z){e=null!=e?e:0;g=null!=g?g:0;var y=[];try{var A=
-this.editor.graph;if(null!=c&&0<c.length){A.model.beginUpdate();try{var x=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(x.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var M=I.getElementsByTagName("diagram");if(1==M.length&&!q){if(I=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(c[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var E=M[0].getAttribute("name");null!=E&&""!=E&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,E))}}else if(0<M.length){q=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[M[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(M[0]),m=!1,Q=1);for(;Q<M.length;Q++){var n=M[Q].getAttribute("id");M[Q].removeAttribute("id");var v=this.updatePageRoot(new DiagramPage(M[Q]));c[n]=M[Q].getAttribute("id");var D=this.pages.length;null==v.getName()&&v.setName(mxResources.get("pageWithNumber",[D+1]));A.model.execute(new ChangePage(this,v,v,D,
-!0));q.push(v)}this.updatePageLinks(c,q)}}if(null!=I&&"mxGraphModel"===I.nodeName){y=A.importGraphModel(I,e,g,m);if(null!=y)for(Q=0;Q<y.length;Q++)this.updatePageLinksForCell(c,y[Q]);var H=A.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var K=new ChangePageSetup(this,null,H);K.ignoreColor=!0;A.model.execute(K)}}z&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(G){if(p)throw G;
-this.handleError(G)}return y};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var g=document.createElement("div"),m=this.editor.graph,p=m.getLinkForCell(e);null!=p&&m.setLinkForCell(e,this.updatePageLink(c,p));if(m.isHtmlLabel(e)){g.innerHTML=m.sanitizeHtml(m.getLabel(e));for(var q=g.getElementsByTagName("a"),z=!1,y=0;y<q.length;y++)p=q[y].getAttribute("href"),null!=p&&(q[y].setAttribute("href",this.updatePageLink(c,p)),z=!0);z&&m.labelChanged(e,g.innerHTML)}for(y=0;y<m.model.getChildCount(e);y++)this.updatePageLinksForCell(c,m.model.getChildAt(e,y))};EditorUi.prototype.updatePageLink=
-function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var m=JSON.parse(e.substring(17));if(null!=m.actions){for(var p=0;p<m.actions.length;p++){var q=m.actions[p];if(null!=q.open&&Graph.isPageLink(q.open)){var z=q.open.substring(q.open.indexOf(",")+1);g=c[z];null!=g?q.open="data:page/id,"+g:null==this.getPageById(z)&&delete q.open}}e="data:action/json,"+JSON.stringify(m)}}catch(y){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,m,p){m=null!=m?m:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(m);try{var y="UNKNOWN-VISIO",A=m.lastIndexOf(".");if(0<=A&&A<m.length)y=m.substring(A+1).toUpperCase();else{var x=m.lastIndexOf("/");0<=
-x&&x<m.length&&(m=m.substring(x+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+m,label:z?"remote":"local"})}catch(M){}if(z)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{z=new FormData;z.append("file1",c,m);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=p&&I.setRequestHeader("x-convert-custom",p);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var M=I.response;if("text/xml"==M.type){var E=new FileReader;E.onload=mxUtils.bind(this,function(Q){try{e(Q.target.result)}catch(n){g({message:mxResources.get("errorLoadingFile")})}});E.readAsText(M)}else this.doImportVisio(M,e,g,m)}catch(Q){g(Q)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(E=new FileReader,E.onload=
-function(){g({message:JSON.parse(E.result).Message})},E.readAsText(I.response))}catch(Q){g({})}});I.send(z)}else try{this.doImportVisio(c,e,g,m)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(p){this.handleError(p)});
-var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(p){g(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
-JSON.parse(c);e(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&q.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var z=0;z<p.svgThumbs.length;z++)q.push(Editor.createSvgDataUri(p.svgThumbs[z]));null!=p.thumb&&q.push(p.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),g(y)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(c,
-e,g,m){var p=this,q=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(z).getElementsByTagName("svg");
-if(0<y.length){var A=parseFloat(y[0].getAttribute("width")),x=parseFloat(y[0].getAttribute("height"));if(isNaN(A)||isNaN(x))try{var I=y[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(I[2]);x=parseFloat(I[3])}catch(M){A=A||100,x=x||100}g(p.convertDataUri(Editor.createSvgDataUri(z)),A,x)}else m({message:mxResources.get("invalidInput")})}catch(M){m(M)}})}catch(z){m(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,m){function p(y,A,x){c1=y>>2;c2=(y&3)<<4|A>>4;c3=(A&15)<<2|x>>6;c4=x&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(x){var I=new Image;I.onload=
-function(){try{var M=I.width,E=I.height;if(0==M&&0==E){var Q=A.result,n=Q.indexOf(","),v=decodeURIComponent(escape(atob(Q.substring(n+1)))),D=mxUtils.parseXml(v).getElementsByTagName("svg");0<D.length&&(M=parseFloat(D[0].getAttribute("width")),E=parseFloat(D[0].getAttribute("height")))}g(A.result,M,E)}catch(H){m(H)}};I.src=A.result};A.onerror=function(x){m(x)}}else m(y)};z.onerror=function(y){m(y)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var m=this.editor.graph,p=null;m.getModel().beginUpdate();
-try{p=m.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(p,!0)}finally{m.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,g,m,p,q,z,y){q=null!=q?q:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(E){4==
-E.readyState&&200<=E.status&&299>=E.status&&this.editor.graph.setSelectionCells(this.insertTextAt(E.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var A=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var x=Editor.extractGraphModelFromPdf(c);if(null!=x&&0<x.length)return this.importXml(x,e,g,q,!0,y)}if(Editor.isPngDataUrl(c)&&(x=Editor.extractGraphModelFromPng(c),null!=x&&0<x.length))return this.importXml(x,
-e,g,q,!0,y);if("data:image/svg+xml;"==c.substring(0,19))try{x=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(x=c.substring(c.indexOf(",")+1),x=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x,!0)):x=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(x,e,g,q,!0,y);if(0<I.length)return I}catch(E){}this.loadImage(c,mxUtils.bind(this,function(E){if("data:"==c.substring(0,5))this.resizeImage(E,c,mxUtils.bind(this,function(v,D,H){A.setSelectionCell(A.insertVertex(null,null,
-"",A.snap(e),A.snap(g),D,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(v)+";"))}),z,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/E.width,this.maxImageSize/E.height)),n=Math.round(E.width*Q);E=Math.round(E.height*Q);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(e),A.snap(g),n,E,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var E=null;A.getModel().beginUpdate();try{E=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(m?"html=1;":"")),A.updateCellSize(E),A.fireEvent(new mxEventObject("textInserted","cells",[E]))}finally{A.getModel().endUpdate()}A.setSelectionCell(E)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,q,null,y);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(E){this.editor.graph.setSelectionCells(this.importXml(E,e,g,q,null,y))}),mxUtils.bind(this,function(E){this.handleError(E)}));else{A=this.editor.graph;p=null;A.getModel().beginUpdate();try{p=A.insertVertex(A.getDefaultParent(),null,"",A.snap(e),A.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
-"...");p.value=c;A.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var M=A.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=M.width;p.geometry.height=M.height}Graph.isLink(p.value)&&A.setLinkForCell(p,p.value);p.geometry.width+=A.gridSize;p.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
+c;else if("mxfile"==c.nodeName){var p=c.getElementsByTagName("diagram");if(0<p.length){g=p[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:n.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}p=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=p}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
+c){if(c.hasAttribute("scale")){var p=parseFloat(c.getAttribute("scale"));!isNaN(p)&&0<p&&(e=p)}c.hasAttribute("border")&&(p=parseInt(c.getAttribute("border")),!isNaN(p)&&0<p&&(g=p))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,p,n){try{var t=this.editor.graph,y=null!=t.themes&&"darkTheme"==t.defaultThemeName,A=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(y?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),t),A=g;else if(y||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(y?t.getDefaultStylesheet():t.getStylesheet());var C=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var u=this.pages[0];this.currentPage==u?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&t.setBackgroundImage(u.viewState.backgroundImage);t.getGlobalVariable=function(R){return"page"==R?u.getName():"pagenumber"==R?1:C.apply(this,
+arguments)};document.body.appendChild(t.container);t.model.setRoot(u.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(R){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var l=R.toDataURL("image/png");l=Editor.writeGraphModelToPng(l,"tEXt","mxfile",encodeURIComponent(A));c(l.substring(l.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(q){null!=e&&e(q)}}),null,null,null,mxUtils.bind(this,function(R){null!=e&&
+e(R)}),null,null,p,null,t.shadowVisible,null,t,n,null,null,null,"diagram",null)}catch(R){null!=e&&e(R)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,p,n,t,y,A,C,u,R,l,q){A=null!=A?A:!0;R=null!=R?R:0;y=null!=C?C:e.background;y==mxConstants.NONE&&(y=null);t=e.getSvg(y,u,R,null,null,t,null,null,null,e.shadowVisible||l,null,q,"diagram");(e.shadowVisible||l)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=g&&t.setAttribute("resource",g);var B=mxUtils.bind(this,function(J){J=
+(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(J);null!=n&&n(J);return J});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(J){A?this.editor.convertImages(J,mxUtils.bind(this,function(M){B(M)})):B(J)}));else return B(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(p){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,p,n,t,y,A,C,u,R,l,q){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var B=this.editor.graph.isSelectionEmpty();g=null!=g?g:B;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(J){this.spinner.stop();try{this.saveCanvas(J,
+n?this.getFileData(!0,null,null,null,g,A):null,C,null==this.pages||0==this.pages.length,R)}catch(M){this.handleError(M)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,g,c||1,e,p,null,null,t,y,u,l,q)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,p,n,t,y){e=null!=e?e:0;g=null!=g?g:0;var A=[];try{var C=
+this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var u=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(u.documentElement,null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var l=R.getElementsByTagName("diagram");if(1==l.length&&!t){if(R=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(c[l[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var q=l[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,q))}}else if(0<l.length){t=[];var B=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[l[0].getAttribute("id")]=this.pages[0].getId(),R=Editor.parseDiagramNode(l[0]),p=!1,B=1);for(;B<l.length;B++){var J=l[B].getAttribute("id");l[B].removeAttribute("id");var M=this.updatePageRoot(new DiagramPage(l[B]));c[J]=l[B].getAttribute("id");var E=this.pages.length;null==M.getName()&&M.setName(mxResources.get("pageWithNumber",[E+1]));C.model.execute(new ChangePage(this,M,M,E,
+!0));t.push(M)}this.updatePageLinks(c,t)}}if(null!=R&&"mxGraphModel"===R.nodeName){A=C.importGraphModel(R,e,g,p);if(null!=A)for(B=0;B<A.length;B++)this.updatePageLinksForCell(c,A[B]);var L=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=L&&null!=L.originalSrc){this.updateBackgroundPageLink(c,L);var P=new ChangePageSetup(this,null,L);P.ignoreColor=!0;C.model.execute(P)}}y&&this.insertHandler(A,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(S){if(n)throw S;
+this.handleError(S)}return A};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,e){var g=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){g.innerHTML=p.sanitizeHtml(p.getLabel(e));for(var t=g.getElementsByTagName("a"),y=!1,A=0;A<t.length;A++)n=t[A].getAttribute("href"),null!=n&&(t[A].setAttribute("href",this.updatePageLink(c,n)),y=!0);y&&p.labelChanged(e,g.innerHTML)}for(A=0;A<p.model.getChildCount(e);A++)this.updatePageLinksForCell(c,p.model.getChildAt(e,A))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var y=t.open.substring(t.open.indexOf(",")+1);g=c[y];null!=g?t.open="data:page/id,"+g:null==this.getPageById(y)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(A){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,p,n){p=null!=p?p:c.name;g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(p);try{var A="UNKNOWN-VISIO",C=p.lastIndexOf(".");if(0<=C&&C<p.length)A=p.substring(C+1).toUpperCase();else{var u=p.lastIndexOf("/");0<=
+u&&u<p.length&&(p=p.substring(u+1))}EditorUi.logEvent({category:A+"-MS-IMPORT-FILE",action:"filename_"+p,label:y?"remote":"local"})}catch(l){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",c,p);var R=new XMLHttpRequest;R.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));R.responseType="blob";this.addRemoteServiceSecurityCheck(R);
+null!=n&&R.setRequestHeader("x-convert-custom",n);R.onreadystatechange=mxUtils.bind(this,function(){if(4==R.readyState)if(200<=R.status&&299>=R.status)try{var l=R.response;if("text/xml"==l.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(B){try{e(B.target.result)}catch(J){g({message:mxResources.get("errorLoadingFile")})}});q.readAsText(l)}else this.doImportVisio(l,e,g,p)}catch(B){g(B)}else try{""==R.responseType||"text"==R.responseType?g({message:R.responseText}):(q=new FileReader,q.onload=
+function(){g({message:JSON.parse(q.result).Message})},q.readAsText(R.response))}catch(B){g({})}});R.send(y)}else try{this.doImportVisio(c,e,g,p)}catch(l){g(l)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(n){this.handleError(n)});
+var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(n){g(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
+this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var n=
+JSON.parse(c);e(LucidImporter.importState(n));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",n];null!=n.state&&t.push(JSON.parse(n.state));if(null!=n.svgThumbs)for(var y=0;y<n.svgThumbs.length;y++)t.push(Editor.createSvgDataUri(n.svgThumbs[y]));null!=n.thumb&&t.push(n.thumb);console.log.apply(console,t)}}catch(A){}}catch(A){null!=window.console&&console.error(A),g(A)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(p,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",p)})})})}):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generateMermaidImage=function(c,
+e,g,p){var n=this,t=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(y){try{if(mxClient.IS_IE||mxClient.IS_IE11)y=y.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var A=mxUtils.parseXml(y).getElementsByTagName("svg");
+if(0<A.length){var C=parseFloat(A[0].getAttribute("width")),u=parseFloat(A[0].getAttribute("height"));if(isNaN(C)||isNaN(u))try{var R=A[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(R[2]);u=parseFloat(R[3])}catch(l){C=C||100,u=u||100}g(n.convertDataUri(Editor.createSvgDataUri(y)),C,u)}else p({message:mxResources.get("invalidInput")})}catch(l){p(l)}})}catch(y){p(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,p){function n(A,C,u){c1=A>>2;c2=(A&3)<<4|C>>4;c3=(C&15)<<2|u>>6;c4=u&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(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 y=new XMLHttpRequest;y.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(A){r="";for(i=0;i<A.length;i+=3)r=i+2==A.length?r+n(A.charCodeAt(i),A.charCodeAt(i+1),0):i+1==A.length?r+n(A.charCodeAt(i),0,0):r+n(A.charCodeAt(i),A.charCodeAt(i+1),A.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(u){var R=new Image;R.onload=
+function(){try{var l=R.width,q=R.height;if(0==l&&0==q){var B=C.result,J=B.indexOf(","),M=decodeURIComponent(escape(atob(B.substring(J+1)))),E=mxUtils.parseXml(M).getElementsByTagName("svg");0<E.length&&(l=parseFloat(E[0].getAttribute("width")),q=parseFloat(E[0].getAttribute("height")))}g(C.result,l,q)}catch(L){p(L)}};R.src=C.result};C.onerror=function(u){p(u)}}else p(A)};y.onerror=function(A){p(A)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var p=this.editor.graph,n=null;p.getModel().beginUpdate();
+try{n=p.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,g,p,n,t,y,A){t=null!=t?t:!0;y=null!=y?y:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(q){4==
+q.readyState&&200<=q.status&&299>=q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(q.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var u=Editor.extractGraphModelFromPdf(c);if(null!=u&&0<u.length)return this.importXml(u,e,g,t,!0,A)}if(Editor.isPngDataUrl(c)&&(u=Editor.extractGraphModelFromPng(c),null!=u&&0<u.length))return this.importXml(u,
+e,g,t,!0,A);if("data:image/svg+xml;"==c.substring(0,19))try{u=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(u=c.substring(c.indexOf(",")+1),u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0)):u=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(u,e,g,t,!0,A);if(0<R.length)return R}catch(q){}this.loadImage(c,mxUtils.bind(this,function(q){if("data:"==c.substring(0,5))this.resizeImage(q,c,mxUtils.bind(this,function(M,E,L){C.setSelectionCell(C.insertVertex(null,null,
+"",C.snap(e),C.snap(g),E,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(M)+";"))}),y,this.maxImageSize);else{var B=Math.min(1,Math.min(this.maxImageSize/q.width,this.maxImageSize/q.height)),J=Math.round(q.width*B);q=Math.round(q.height*B);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(g),J,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var q=null;C.getModel().beginUpdate();try{q=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(g),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(q),C.fireEvent(new mxEventObject("textInserted","cells",[q]))}finally{C.getModel().endUpdate()}C.setSelectionCell(q)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,t,null,A);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(q){this.editor.graph.setSelectionCells(this.importXml(q,e,g,t,null,A))}),mxUtils.bind(this,function(q){this.handleError(q)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(g),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var l=C.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=l.width;n.geometry.height=l.height}Graph.isLink(n.value)&&C.setLinkForCell(n,n.value);n.geometry.width+=C.gridSize;n.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,y){StorageFile.listFiles(this,
-"F",z,y)});window.openBrowserFile=mxUtils.bind(this,function(z,y,A){StorageFile.getFileContent(this,z,y,A)});window.deleteBrowserFile=mxUtils.bind(this,function(z,y,A){StorageFile.deleteFile(this,z,y,A)});if(!e){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(z=new Blob([z],{type:"application/octet-stream"}),
-this.importVisio(z,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=m;q.apply(p,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var m=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(q){if(mxUtils.isEmptyObject(q.files))g();else{var z=0,y,A=!1;q.forEach(function(x,I){x=I.name.toLowerCase();"diagram/diagram.xml"==x?(A=!0,I.async("string").then(function(M){0==M.indexOf("<mxfile ")?e(M):g()})):0==x.indexOf("versions/")&&(x=parseInt(x.substr(9)),x>z&&(z=x,y=I))});0<z?y.async("string").then(function(x){(new XMLHttpRequest).upload&&
-m.isRemoteFileFormat(x,c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(x,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?e(I.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(c,e,g,m,p,q,z,y,A,x,I,M){x=null!=
-x?x:!0;var E=!1,Q=null,n=mxUtils.bind(this,function(v){var D=null;null!=v&&"<mxlibrary"==v.substring(0,10)?this.loadLibrary(new LocalLibrary(this,v,z)):D=this.importXml(v,g,m,x,null,null!=M?mxEvent.isControlDown(M):null);null!=y&&y(D)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=I?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(Q=this.importXml(e,g,m,x,null,null!=M?mxEvent.isControlDown(M):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
-A)+c.substring(c.indexOf(",",A+1))),x&&e.isGridEnabled()&&(g=e.snap(g),m=e.snap(m)),Q=[e.insertVertex(null,null,"",g,m,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(E=!0,this.importGraphML(c,n)):null!=A&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(E=!0,this.importVisio(A,n)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(E=!0,p=mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?n(v.responseText):null!=y&&y(null))}),null!=c?this.parseFileData(c,p,z):this.parseFile(A,p,z)):0==c.indexOf("PK")&&null!=A?(E=!0,this.importZipFile(A,n,mxUtils.bind(this,function(){Q=this.insertTextAt(this.validateFileData(c),g,m,!0,null,x);y(Q)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(Q=this.insertTextAt(this.validateFileData(c),
-g,m,!0,null,x,null,null!=M?mxEvent.isControlDown(M):null));E||null==y||y(Q);return Q};EditorUi.prototype.importFiles=function(c,e,g,m,p,q,z,y,A,x,I,M,E){m=null!=m?m:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var Q=null!=e&&null!=g,n=!0;e=null!=e?e:0;g=null!=g?g:0;var v=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var D=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>D){v=!0;break}var K=mxUtils.bind(this,function(){var G=
-this.editor.graph,N=G.gridSize;p=null!=p?p:mxUtils.bind(this,function(B,L,P,O,R,S,W,aa,Y){try{return null!=B&&"<mxlibrary"==B.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,B,W)),null):this.isCompatibleString(B)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,B,W,!0)),null):this.importFile(B,L,P,O,R,S,W,aa,Y,Q,M,E)}catch(Z){return this.handleError(Z),null}});q=null!=q?q:mxUtils.bind(this,function(B){G.setSelectionCells(B)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,V=T,U=[],X=mxUtils.bind(this,function(B,L){U[B]=L;if(0==--V){this.spinner.stop();if(null!=y)y(U);else{var P=[];G.getModel().beginUpdate();try{for(B=0;B<U.length;B++){var O=U[B]();null!=O&&(P=P.concat(O))}}finally{G.getModel().endUpdate()}}q(P)}}),l=0;l<T;l++)mxUtils.bind(this,function(B){var L=c[B];if(null!=L){var P=new FileReader;P.onload=mxUtils.bind(this,function(O){if(null==z||z(L))if("image/"==L.type.substring(0,
-6))if("image/svg"==L.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+1))));var W=mxUtils.parseXml(S);S=W.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=M?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,
-14)?X(B,mxUtils.bind(this,function(){try{if(null!=W){var ba=W.getElementsByTagName("svg");if(0<ba.length){var fa=ba[0],ja=fa.getAttribute("width"),ha=fa.getAttribute("height");ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ra=fa.getAttribute("viewBox");if(null==ra||0==ra.length)fa.setAttribute("viewBox","0 0 "+ja+" "+ha);else if(isNaN(ja)||isNaN(ha)){var ma=ra.split(" ");3<ma.length&&(ja=parseFloat(ma[2]),ha=parseFloat(ma[3]))}R=
-Editor.createSvgDataUri(mxUtils.getXml(fa));var Ga=Math.min(1,Math.min(m/Math.max(1,ja)),m/Math.max(1,ha)),Ea=p(R,L.type,e+B*N,g+B*N,Math.max(1,Math.round(ja*Ga)),Math.max(1,Math.round(ha*Ga)),L.name);if(isNaN(ja)||isNaN(ha)){var za=new Image;za.onload=mxUtils.bind(this,function(){ja=Math.max(1,za.width);ha=Math.max(1,za.height);Ea[0].geometry.width=ja;Ea[0].geometry.height=ha;fa.setAttribute("viewBox","0 0 "+ja+" "+ha);R=Editor.createSvgDataUri(mxUtils.getXml(fa));var Pa=R.indexOf(";");0<Pa&&(R=
-R.substring(0,Pa)+R.substring(R.indexOf(",",Pa+1)));G.setCellStyles("image",R,[Ea[0]])});za.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ea}}}catch(Pa){}return null})):X(B,mxUtils.bind(this,function(){return p(aa,"text/xml",e+B*N,g+B*N,0,0,L.name)}))}else X(B,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;X(B,mxUtils.bind(this,function(){return p(Y,
-"text/xml",e+B*N,g+B*N,Z.width,Z.height,L.name)}));S=!0}}S||(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(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(fa,ja,ha){X(B,mxUtils.bind(this,function(){if(null!=
-fa&&fa.length<x){var ra=n&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(m/ja,m/ha)):1;return p(fa,L.type,e+B*N,g+B*N,Math.round(ja*ra),Math.round(ha*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),n,m,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,p(R,L.type,e+B*N,g+B*N,240,160,L.name,function(ba){X(B,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||
-/(\.vs(x|sx?))($|\?)/i.test(L.name)?p(null,L.type,e+B*N,g+B*N,240,160,L.name,function(O){X(B,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?P.readAsDataURL(L):P.readAsText(L)}})(l)});if(v){v=[];for(H=0;H<c.length;H++)v.push(c[H]);c=v;this.confirmImageResize(function(G){n=G;K()},A)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
-[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(q,z){if(q||e)mxSettings.setResizeImages(q?z:null),mxSettings.save();g();c(z)};null==m||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!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):p(!1,m)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,e,g)});m.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var m=new XMLHttpRequest;m.open("POST",
-OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){e(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,m,p,q,z){p=null!=p?p:this.maxImageSize;var y=Math.max(1,c.width),
-A=Math.max(1,c.height);if(m&&this.isResampleImageSize(null!=z?z:e.length,q))try{var x=Math.max(y/p,A/p);if(1<x){var I=Math.round(y/x),M=Math.round(A/x),E=document.createElement("canvas");E.width=I;E.height=M;E.getContext("2d").drawImage(c,0,0,I,M);var Q=E.toDataURL();if(Q.length<e.length){var n=document.createElement("canvas");n.width=I;n.height=M;var v=n.toDataURL();Q!==v&&(e=Q,y=I,A=M)}}}catch(D){}g(e,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};
-EditorUi.prototype.loadImage=function(c,e,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;e(m)};null!=g&&(m.onerror=g);m.src=c}catch(p){if(null!=g)g(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(D){var H=D.getEvent();return null==D.getState()&&
-!mxEvent.isMouseEvent(H)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==D.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});e.cellEditor.editPlantUmlData=function(D,H,K){var G=JSON.parse(K);H=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(N,G.format,function(T,V,U){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==G.format)e.labelChanged(D,"<pre>"+
-T+"</pre>"),e.updateCellSize(D,!0);else{e.setCellStyles("image",c.convertDataUri(T),[D]);var X=e.model.getGeometry(D);null!=X&&(X=X.clone(),X.width=V,X.height=U,e.cellsResized([D],[X],!1))}e.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:N,format:G.format}))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};e.cellEditor.editMermaidData=function(D,H,K){var G=JSON.parse(K);H=new TextareaDialog(c,mxResources.get("mermaid")+
-":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(N,G.config,function(T,V,U){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",T,[D]);var X=e.model.getGeometry(D);null!=X&&(X=X.clone(),X.width=Math.max(X.width,V),X.height=Math.max(X.height,U),e.cellsResized([D],[X],!1));e.setAttributeForCell(D,"mermaidData",JSON.stringify({data:N,config:G.config},null,2))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},
-null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(D,H){try{var K=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=K)this.editPlantUmlData(D,H,K);else if(K=this.graph.getAttributeForCell(D,"mermaidData"),null!=K)this.editMermaidData(D,H,K);else{var G=e.getCellStyle(D);"1"==mxUtils.getValue(G,"metaEdit","0")?c.showDataDialog(D):g.apply(this,arguments)}}catch(N){c.handleError(N)}};e.getLinkTitle=function(D){return c.getLinkTitle(D)};
-e.customLinkClicked=function(D){var H=!1;try{c.handleCustomLink(D),H=!0}catch(K){c.handleError(K)}return H};var m=e.parseBackgroundImage;e.parseBackgroundImage=function(D){var H=m.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var p=e.setBackgroundImage;e.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=c.createImageForPageLink(D.originalSrc,c.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
-function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(D,H){D=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=D){var K=D.indexOf(",");if(0<K)for(D=D.substring(K+1),H=H.getProperty("patches"),K=0;K<H.length;K++)if(null!=H[K][EditorUi.DIFF_UPDATE]&&null!=H[K][EditorUi.DIFF_UPDATE][D]||null!=H[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[K][EditorUi.DIFF_REMOVE],
-D)){e.refreshBackgroundImage();break}}}));var q=e.getBackgroundImageObject;e.getBackgroundImageObject=function(D,H){var K=q.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!H)K={src:K.originalSrc};else if(H&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var G=this.stylesheet,N=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=c.createImageForPageLink(K.originalSrc);
-this.shapeBackgroundColor=T;this.shapeForegroundColor=N;this.stylesheet=G}return K};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=
-c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return y.apply(this,arguments)};var A=e.addClickHandler;e.addClickHandler=function(D,H,K){var G=H;H=function(N,T){if(null==T){var V=mxEvent.getSource(N);"a"==V.nodeName.toLowerCase()&&(T=V.getAttribute("href"))}null!=T&&e.isCustomLink(T)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&e.customLinkClicked(T)&&mxEvent.consume(N);null!=G&&G(N,T)};A.call(this,D,
-H,K)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(D,H,K){c.editor.graph.isSelectionEmpty()?x.apply(this,arguments):c.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,
-!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=e.getExportVariables;e.getExportVariables=function(){var D=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(D.filename=H.getTitle());D.pagecount=null!=c.pages?c.pages.length:1;D.page=null!=c.currentPage?c.currentPage.getName():"";D.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return D};var M=e.getGlobalVariable;e.getGlobalVariable=function(D){var H=c.getCurrentFile();return"filename"==
-D&&null!=H?H.getTitle():"page"==D&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==D?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==D?null!=c.pages?c.pages.length:1:M.apply(this,arguments)};var E=e.labelLinkClicked;e.labelLinkClicked=function(D,H,K){var G=H.getAttribute("href");if(null==G||!e.isCustomLink(G)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))E.apply(this,arguments);else{if(!e.isEnabled()||null!=D&&e.isCellLocked(D.cell))e.customLinkClicked(G),
-e.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var D=c.defaultFilename,H=c.getCurrentFile();null!=H&&(D=null!=H.getTitle()?H.getTitle():D);return D};var Q=this.actions.get("print");Q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Q.visible=Q.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
-!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var H=e.cellEditor.text2,K=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(G){null!=K&&(K.parentNode.removeChild(K),K=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(G){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&
-(K=this.highlightElement(H));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(G){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,function(T,V,U,X,l,B){e.insertImage(T,l,B)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var V=0;V<T.length;V++)T[V]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var N=
-G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(T){var V=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,V)),U/Math.max(1,T));e.insertImage(decodeURIComponent(N),V*U,T*U)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));this.isSettingsEnabled()&&(Q=this.editor.graph.view,Q.setUnit(mxSettings.getUnit()),Q.addListener("unitChanged",function(D,H){mxSettings.setUnit(H.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,Q.unit),this.refresh());if("1"==urlParams.styledev){Q=document.getElementById("geFooter");null!=Q&&(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)})),Q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,H){0<this.editor.graph.getSelectionCount()?(D=this.editor.graph.getSelectionCell(),D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var n=
-this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:n.apply(this,arguments)}}Q=document.getElementById("geInfo");null!=Q&&Q.parentNode.removeChild(Q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var v=null;mxEvent.addListener(e.container,"dragleave",function(D){e.isEnabled()&&(null!=v&&(v.parentNode.removeChild(v),v=null),D.stopPropagation(),D.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,
-function(D){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(D){null!=v&&(v.parentNode.removeChild(v),v=null);if(e.isEnabled()){var H=mxUtils.convertPoint(e.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),K=D.dataTransfer.files,G=e.view.translate,N=e.view.scale,T=H.x/N-G.x,V=H.y/N-G.y;if(0<K.length)"1"!=
-urlParams.embed&&mxEvent.isShiftDown(D)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(D)&&(V=T=null),this.importFiles(K,T,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(V=T=0);var U=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(D,null!=this.pages);
-if(null!=H)e.setSelectionCells(this.importXml(H,T,V,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var X=D.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=e.sanitizeHtml(X);var l=null;K=H.getElementsByTagName("img");null!=K&&1==K.length?(X=K[0].getAttribute("src"),null==X&&(X=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(l=!0)):(K=H.getElementsByTagName("a"),null!=K&&1==K.length?X=K[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),
-null!=H&&1==H.length&&(X=mxUtils.getTextContent(H[0]))));var B=!0,L=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(X,T,V,!0,l,null,B,mxEvent.isControlDown(D)))});l&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(P){B=P;L()},mxEvent.isControlDown(D)):L()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(P){var O=Math.max(1,P.width);P=Math.max(1,P.height);var R=this.maxImageSize;R=Math.min(1,
-Math.min(R/Math.max(1,O)),R/Math.max(1,P));e.setSelectionCell(e.insertVertex(null,null,"",T,V,O*R,P*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(P){e.setSelectionCells(this.insertTextAt(U,T,V,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),T,V,!0))}}D.stopPropagation();D.preventDefault()}),!1)}e.enableFlowAnimation=
-!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();Q=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",Q);this.addListener("sketchModeChanged",Q);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,m=!1,p=0;p<g.types.length;p++)if("text/"===
-g.types[p].substring(0,5)){m=!0;break}if(!m){var q=g.items;for(index in q){var z=q[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(A,x,I,M,E,Q){c.insertImage(A,E,Q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var x=0;x<A.length;x++)A[x]()});else{var y=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
-"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var z=mxEvent.getSource(q);
-null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||m||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",q=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=q,e.container.scrollTop=z)}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(q){var z=q.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=z&&17!=z&&91!=z&&93!=z||(m=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(q){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=q.clipboardData&&this.pasteCells(q,g,!0,!0),!mxEvent.isConsumed(q))){var z=e.container.scrollLeft,y=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=z;e.container.scrollTop=y;
-this.pasteCells(q,g,!1,!0)}),0)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(q){return mxEvent.getSource(q)==g?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c){function e(I){return""==I||"dark"==I||"kennedy"==I||null==I}var g=Editor.currentTheme;c=e(c)?"default":c;g=e(g)?"default":g;var m=
-"sketch"==g&&"default"==c||"default"==g&&"sketch"==c;if(m&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var p=this.editor.graph.view.translate,q=p.x,z=p.y,y=mxUtils.getOffset(this.editor.graph.container),A=this.editor.graph.container.scrollLeft-y.x,x=this.editor.graph.container.scrollTop-y.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
-function(){"sketch"==g&&"default"==c?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
-"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var I=this.editor.graph.view.scale;y=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=A+y.x+(p.x-q)*I;this.editor.graph.container.scrollTop=
-x+y.y+(p.y-z)*I;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return m};EditorUi.prototype.switchTheme=function(c){this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display=
-"";"sketch"==c?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==c&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(c="default"==c||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
-this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
-(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(c){this.destroyWindows();"sketch"==c?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
-function(c){"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"sketch"==c?(null==this.sketchWrapperElt&&
-(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,A){StorageFile.listFiles(this,
+"F",y,A)});window.openBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.getFileContent(this,y,A,C)});window.deleteBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.deleteFile(this,y,A,C)});if(!e){var p=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,A){null!=A&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(A)?(y=new Blob([y],{type:"application/octet-stream"}),
+this.importVisio(y,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,A)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=p;t.apply(n,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var y=0,A,C=!1;t.forEach(function(u,R){u=R.name.toLowerCase();"diagram/diagram.xml"==u?(C=!0,R.async("string").then(function(l){0==l.indexOf("<mxfile ")?e(l):g()})):0==u.indexOf("versions/")&&(u=parseInt(u.substr(9)),u>y&&(y=u,A=R))});0<y?A.async("string").then(function(u){(new XMLHttpRequest).upload&&
+p.isRemoteFileFormat(u,c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):p.parseFileData(u,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):g())}),c.name):g()}):C||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importFile=function(c,e,g,p,n,t,y,A,C,u,R,l){u=null!=
+u?u:!0;var q=!1,B=null,J=mxUtils.bind(this,function(M){var E=null;null!=M&&"<mxlibrary"==M.substring(0,10)?this.loadLibrary(new LocalLibrary(this,M,y)):E=this.importXml(M,g,p,u,null,null!=l?mxEvent.isControlDown(l):null);null!=A&&A(E)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(e=R?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(B=this.importXml(e,g,p,u,null,null!=l?mxEvent.isControlDown(l):null),C=!0)),C||(e=this.editor.graph,C=c.indexOf(";"),0<C&&(c=c.substring(0,
+C)+c.substring(c.indexOf(",",C+1))),u&&e.isGridEnabled()&&(g=e.snap(g),p=e.snap(p)),B=[e.insertVertex(null,null,"",g,p,n,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(q=!0,this.importGraphML(c,J)):null!=C&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(q=!0,this.importVisio(C,J)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(q=!0,n=mxUtils.bind(this,function(M){4==M.readyState&&(200<=M.status&&299>=M.status?J(M.responseText):null!=A&&A(null))}),null!=c?this.parseFileData(c,n,y):this.parseFile(C,n,y)):0==c.indexOf("PK")&&null!=C?(q=!0,this.importZipFile(C,J,mxUtils.bind(this,function(){B=this.insertTextAt(this.validateFileData(c),g,p,!0,null,u);A(B)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(B=this.insertTextAt(this.validateFileData(c),
+g,p,!0,null,u,null,null!=l?mxEvent.isControlDown(l):null));q||null==A||A(B);return B};EditorUi.prototype.importFiles=function(c,e,g,p,n,t,y,A,C,u,R,l,q){p=null!=p?p:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var B=null!=e&&null!=g,J=!0;e=null!=e?e:0;g=null!=g?g:0;var M=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var E=R||this.resampleThreshold,L=0;L<c.length;L++)if("image/svg"!==c[L].type.substring(0,9)&&"image/"===c[L].type.substring(0,6)&&c[L].size>E){M=!0;break}var P=mxUtils.bind(this,function(){var S=
+this.editor.graph,V=S.gridSize;n=null!=n?n:mxUtils.bind(this,function(N,U,T,W,Z,ca,ba,fa,Y){try{return null!=N&&"<mxlibrary"==N.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,N,ba)),null):this.isCompatibleString(N)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,N,ba,!0)),null):this.importFile(N,U,T,W,Z,ca,ba,fa,Y,B,l,q)}catch(ha){return this.handleError(ha),null}});t=null!=t?t:mxUtils.bind(this,function(N){S.setSelectionCells(N)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=c.length,m=X,z=[],K=mxUtils.bind(this,function(N,U){z[N]=U;if(0==--m){this.spinner.stop();if(null!=A)A(z);else{var T=[];S.getModel().beginUpdate();try{for(N=0;N<z.length;N++){var W=z[N]();null!=W&&(T=T.concat(W))}}finally{S.getModel().endUpdate()}}t(T)}}),Q=0;Q<X;Q++)mxUtils.bind(this,function(N){var U=c[N];if(null!=U){var T=new FileReader;T.onload=mxUtils.bind(this,function(W){if(null==y||y(U))if("image/"==U.type.substring(0,
+6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(W.target.result),ca=Z.indexOf(",");ca=decodeURIComponent(escape(atob(Z.substring(ca+1))));var ba=mxUtils.parseXml(ca);ca=ba.getElementsByTagName("svg");if(0<ca.length){ca=ca[0];var fa=l?null:ca.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel "!==
+fa.substring(0,14)?K(N,mxUtils.bind(this,function(){try{if(null!=ba){var da=ba.getElementsByTagName("svg");if(0<da.length){var wa=da[0],za=wa.getAttribute("width"),xa=wa.getAttribute("height");za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var ta=wa.getAttribute("viewBox");if(null==ta||0==ta.length)wa.setAttribute("viewBox","0 0 "+za+" "+xa);else if(isNaN(za)||isNaN(xa)){var ka=ta.split(" ");3<ka.length&&(za=parseFloat(ka[2]),
+xa=parseFloat(ka[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(wa));var Na=Math.min(1,Math.min(p/Math.max(1,za)),p/Math.max(1,xa)),Ka=n(Z,U.type,e+N*V,g+N*V,Math.max(1,Math.round(za*Na)),Math.max(1,Math.round(xa*Na)),U.name);if(isNaN(za)||isNaN(xa)){var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){za=Math.max(1,Ea.width);xa=Math.max(1,Ea.height);Ka[0].geometry.width=za;Ka[0].geometry.height=xa;wa.setAttribute("viewBox","0 0 "+za+" "+xa);Z=Editor.createSvgDataUri(mxUtils.getXml(wa));var ra=
+Z.indexOf(";");0<ra&&(Z=Z.substring(0,ra)+Z.substring(Z.indexOf(",",ra+1)));S.setCellStyles("image",Z,[Ka[0]])});Ea.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}return Ka}}}catch(ra){}return null})):K(N,mxUtils.bind(this,function(){return n(fa,"text/xml",e+N*V,g+N*V,0,0,U.name)}))}else K(N,mxUtils.bind(this,function(){return null}))}else{ca=!1;if("image/png"==U.type){var Y=l?null:this.extractGraphModelFromPng(W.target.result);if(null!=Y&&0<Y.length){var ha=new Image;ha.src=W.target.result;K(N,
+mxUtils.bind(this,function(){return n(Y,"text/xml",e+N*V,g+N*V,ha.width,ha.height,U.name)}));ca=!0}}ca||(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(W.target.result,mxUtils.bind(this,function(da){this.resizeImage(da,W.target.result,mxUtils.bind(this,function(wa,
+za,xa){K(N,mxUtils.bind(this,function(){if(null!=wa&&wa.length<u){var ta=J&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(p/za,p/xa)):1;return n(wa,U.type,e+N*V,g+N*V,Math.round(za*ta),Math.round(xa*ta),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),J,p,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=W.target.result,n(Z,U.type,e+N*V,g+N*V,240,160,U.name,function(da){K(N,function(){return da})},
+U)});/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name)?n(null,U.type,e+N*V,g+N*V,240,160,U.name,function(W){K(N,function(){return W})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?T.readAsDataURL(U):T.readAsText(U)}})(Q)});if(M){M=[];for(L=0;L<c.length;L++)M.push(c[L]);c=M;this.confirmImageResize(function(S){J=S;P()},C)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==
+mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},p=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,n=function(t,y){if(t||e)mxSettings.setResizeImages(t?y:null),mxSettings.save();g();c(y)};null==p||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){n(t,!0)},function(t){n(t,!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):n(!1,p)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var p=new FileReader;p.onload=mxUtils.bind(this,function(){this.parseFileData(p.result,e,g)});p.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var p=new XMLHttpRequest;
+p.open("POST",OPEN_URL);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.onreadystatechange=function(){e(p)};p.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,p,n,t,y){n=null!=n?n:this.maxImageSize;var A=Math.max(1,
+c.width),C=Math.max(1,c.height);if(p&&this.isResampleImageSize(null!=y?y:e.length,t))try{var u=Math.max(A/n,C/n);if(1<u){var R=Math.round(A/u),l=Math.round(C/u),q=document.createElement("canvas");q.width=R;q.height=l;q.getContext("2d").drawImage(c,0,0,R,l);var B=q.toDataURL();if(B.length<e.length){var J=document.createElement("canvas");J.width=R;J.height=l;var M=J.toDataURL();B!==M&&(e=B,A=R,C=l)}}}catch(E){}g(e,A,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};
+EditorUi.prototype.loadImage=function(c,e,g){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=g&&(p.onerror=g);p.src=c}catch(n){if(null!=g)g(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(E){var L=E.getEvent();return null==E.getState()&&
+!mxEvent.isMouseEvent(L)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(L)&&(null==E.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))});e.cellEditor.editPlantUmlData=function(E,L,P){var S=JSON.parse(P);L=new TextareaDialog(c,mxResources.get("plantUml")+":",S.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,S.format,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==S.format)e.labelChanged(E,"<pre>"+
+X+"</pre>"),e.updateCellSize(E,!0);else{e.setCellStyles("image",c.convertDataUri(X),[E]);var K=e.model.getGeometry(E);null!=K&&(K=K.clone(),K.width=m,K.height=z,e.cellsResized([E],[K],!1))}e.setAttributeForCell(E,"plantUmlData",JSON.stringify({data:V,format:S.format}))}finally{e.getModel().endUpdate()}},function(X){c.handleError(X)})},null,null,400,220);c.showDialog(L.container,420,300,!0,!0);L.init()};e.cellEditor.editMermaidData=function(E,L,P){var S=JSON.parse(P);L=new TextareaDialog(c,mxResources.get("mermaid")+
+":",S.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,S.config,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",X,[E]);var K=e.model.getGeometry(E);null!=K&&(K=K.clone(),K.width=Math.max(K.width,m),K.height=Math.max(K.height,z),e.cellsResized([E],[K],!1));e.setAttributeForCell(E,"mermaidData",JSON.stringify({data:V,config:S.config},null,2))}finally{e.getModel().endUpdate()}},function(X){c.handleError(X)})},
+null,null,400,220);c.showDialog(L.container,420,300,!0,!0);L.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(E,L){try{var P=this.graph.getAttributeForCell(E,"plantUmlData");if(null!=P)this.editPlantUmlData(E,L,P);else if(P=this.graph.getAttributeForCell(E,"mermaidData"),null!=P)this.editMermaidData(E,L,P);else{var S=e.getCellStyle(E);"1"==mxUtils.getValue(S,"metaEdit","0")?c.showDataDialog(E):g.apply(this,arguments)}}catch(V){c.handleError(V)}};e.getLinkTitle=function(E){return c.getLinkTitle(E)};
+e.customLinkClicked=function(E){var L=!1;try{c.handleCustomLink(E),L=!0}catch(P){c.handleError(P)}return L};var p=e.parseBackgroundImage;e.parseBackgroundImage=function(E){var L=p.apply(this,arguments);null!=L&&null!=L.src&&Graph.isPageLink(L.src)&&(L={originalSrc:L.src});return L};var n=e.setBackgroundImage;e.setBackgroundImage=function(E){null!=E&&null!=E.originalSrc&&(E=c.createImageForPageLink(E.originalSrc,c.currentPage,this));n.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
+function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(E,L){E=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=E){var P=E.indexOf(",");if(0<P)for(E=E.substring(P+1),L=L.getProperty("patches"),P=0;P<L.length;P++)if(null!=L[P][EditorUi.DIFF_UPDATE]&&null!=L[P][EditorUi.DIFF_UPDATE][E]||null!=L[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(L[P][EditorUi.DIFF_REMOVE],
+E)){e.refreshBackgroundImage();break}}}));var t=e.getBackgroundImageObject;e.getBackgroundImageObject=function(E,L){var P=t.apply(this,arguments);if(null!=P&&null!=P.originalSrc)if(!L)P={src:P.originalSrc};else if(L&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var S=this.stylesheet,V=this.shapeForegroundColor,X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";P=c.createImageForPageLink(P.originalSrc);
+this.shapeBackgroundColor=X;this.shapeForegroundColor=V;this.stylesheet=S}return P};var y=this.clearDefaultStyle;this.clearDefaultStyle=function(){y.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var A=
+c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(E){E=null!=E?E:"";"1"==urlParams.dev&&(E+=(0<E.length?"&":"?")+"dev=1");return A.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(E,L,P){var S=L;L=function(V,X){if(null==X){var m=mxEvent.getSource(V);"a"==m.nodeName.toLowerCase()&&(X=m.getAttribute("href"))}null!=X&&e.isCustomLink(X)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&e.customLinkClicked(X)&&mxEvent.consume(V);null!=S&&S(V,X)};C.call(this,E,
+L,P)};v.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var u=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(E,L,P){c.editor.graph.isSelectionEmpty()?u.apply(this,arguments):c.menus.addMenuItems(E,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,
+!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var R=e.getExportVariables;e.getExportVariables=function(){var E=R.apply(this,arguments),L=c.getCurrentFile();null!=L&&(E.filename=L.getTitle());E.pagecount=null!=c.pages?c.pages.length:1;E.page=null!=c.currentPage?c.currentPage.getName():"";E.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return E};var l=e.getGlobalVariable;e.getGlobalVariable=function(E){var L=c.getCurrentFile();return"filename"==
+E&&null!=L?L.getTitle():"page"==E&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==E?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==E?null!=c.pages?c.pages.length:1:l.apply(this,arguments)};var q=e.labelLinkClicked;e.labelLinkClicked=function(E,L,P){var S=L.getAttribute("href");if(null==S||!e.isCustomLink(S)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))q.apply(this,arguments);else{if(!e.isEnabled()||null!=E&&e.isCellLocked(E.cell))e.customLinkClicked(S),
+e.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=c.defaultFilename,L=c.getCurrentFile();null!=L&&(E=null!=L.getTitle()?L.getTitle():E);return E};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),
+this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var L=e.cellEditor.text2,P=null;null!=L&&(mxEvent.addListener(L,"dragleave",function(S){null!=P&&(P.parentNode.removeChild(P),P=null);S.stopPropagation();S.preventDefault()}),mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(S){null==
+P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(L));S.stopPropagation();S.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(S){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<S.dataTransfer.files.length)this.importFiles(S.dataTransfer.files,0,0,this.maxImageSize,function(X,m,z,K,Q,N){e.insertImage(X,Q,N)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var m=0;m<X.length;m++)X[m]()},mxEvent.isControlDown(S));else if(0<=
+mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")){var V=S.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(X){var m=Math.max(1,X.width);X=Math.max(1,X.height);var z=this.maxImageSize;z=Math.min(1,Math.min(z/Math.max(1,m)),z/Math.max(1,X));e.insertImage(decodeURIComponent(V),m*z,X*z)})):document.execCommand("insertHTML",!1,S.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(S.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,S.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,S.dataTransfer.getData("text/plain"));S.stopPropagation();S.preventDefault()})))}));this.isSettingsEnabled()&&(B=this.editor.graph.view,B.setUnit(mxSettings.getUnit()),B.addListener("unitChanged",function(E,L){mxSettings.setUnit(L.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,B.unit),this.refresh());if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(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)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,L){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility=
+"visible"):this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?!0:J.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var M=null;mxEvent.addListener(e.container,"dragleave",function(E){e.isEnabled()&&(null!=M&&(M.parentNode.removeChild(M),M=null),E.stopPropagation(),E.preventDefault())});
+mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);if(e.isEnabled()){var L=mxUtils.convertPoint(e.container,mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,S=e.view.translate,
+V=e.view.scale,X=L.x/V-S.x,m=L.y/V-S.y;if(0<P.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(E)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(m=X=null),this.importFiles(P,X,m,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(m=X=0);var z=0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")?E.dataTransfer.getData("text/uri-list"):
+null;L=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=L)e.setSelectionCells(this.importXml(L,X,m,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")){var K=E.dataTransfer.getData("text/html");L=document.createElement("div");L.innerHTML=e.sanitizeHtml(K);var Q=null;P=L.getElementsByTagName("img");null!=P&&1==P.length?(K=P[0].getAttribute("src"),null==K&&(K=P[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)||(Q=!0)):(P=L.getElementsByTagName("a"),null!=
+P&&1==P.length?K=P[0].getAttribute("href"):(L=L.getElementsByTagName("pre"),null!=L&&1==L.length&&(K=mxUtils.getTextContent(L[0]))));var N=!0,U=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(K,X,m,!0,Q,null,N,mxEvent.isControlDown(E)))});Q&&null!=K&&K.length>this.resampleThreshold?this.confirmImageResize(function(T){N=T;U()},mxEvent.isControlDown(E)):U()}else null!=z&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(z)?this.loadImage(decodeURIComponent(z),mxUtils.bind(this,function(T){var W=
+Math.max(1,T.width);T=Math.max(1,T.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,W)),Z/Math.max(1,T));e.setSelectionCell(e.insertVertex(null,null,"",X,m,W*Z,T*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+z+";"))}),mxUtils.bind(this,function(T){e.setSelectionCells(this.insertTextAt(z,X,m,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),
+X,m,!0))}}E.stopPropagation();E.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();B=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",B);this.addListener("sketchModeChanged",B);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):
+("1"==urlParams["live-ui"]||"min"==uiTheme&&"1"!=urlParams.embedInline)&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=
+e.clipboardData||e.originalEvent.clipboardData,p=!1,n=0;n<g.types.length;n++)if("text/"===g.types[n].substring(0,5)){p=!0;break}if(!p){var t=g.items;for(index in t){var y=t[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,function(C,u,R,l,q,B){c.insertImage(C,q,B)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var u=0;u<C.length;u++)C[u]()});else{var A=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],
+A.x,A.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily=
+"monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var p=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var y=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||p||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,y=e.container.scrollTop,e.container.appendChild(g),p=!0,
+g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=y)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var y=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!p||224!=y&&17!=y&&91!=y&&93!=y||(p=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),
+this.copyCells(g),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var y=e.container.scrollLeft,A=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,
+function(){e.container.scrollLeft=y;e.container.scrollTop=A;this.pasteCells(t,g,!1,!0)}),0)}}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:n.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c,e){function g(l){return""==l||"dark"==l||"kennedy"==l||null==l}var p=
+Editor.currentTheme;c=g(c)?"default":c;p=g(p)?"default":p;var n="sketch"==p&&"default"==c||"default"==p&&"sketch"==c;if(n&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var t=this.editor.graph.view.translate,y=t.x,A=t.y,C=mxUtils.getOffset(this.editor.graph.container),u=this.editor.graph.container.scrollLeft-C.x,R=this.editor.graph.container.scrollTop-C.y;e=null!=e?e:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms");0==e&&
+(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"sketch"==p&&"default"==c?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,
+this.formatWidth=EditorUi.prototype.formatWidth):"default"==p&&"sketch"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var l=
+this.editor.graph.view.scale;C=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=u+C.x+(t.x-y)*l;this.editor.graph.container.scrollTop=R+C.y+(t.y-A)*l;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),e)}),e)}),e)}),0)}return n};EditorUi.prototype.switchTheme=function(c){this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
+this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display="";"sketch"==c?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",
+this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==c&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
+this.formatContainer));null!=this.format&&(c="default"==c||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=
+null)};EditorUi.prototype.switchThemeConstants=function(c){var e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;"sketch"==c?(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="none"/>').src,
+mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+
+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(c){"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=
+function(c){"sketch"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
EditorUi.prototype.createMainMenuForTheme=function(c){if("sketch"==c&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var e=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));c=mxUtils.bind(this,function(){e.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=e.style.display});this.actions.get("undo").addListener("stateChanged",c);
-this.actions.get("redo").addListener("stateChanged",c);c();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(c){if("sketch"==c&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";c.appendChild(e);var g=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var m=null!=this.pages?this.pages.length:1,p=this.getPageIndex(this.currentPage);p=null!=p?p+1:1;var q=this.currentPage.getId();
-e.setAttribute("title",this.currentPage.getName()+" ("+p+"/"+m+")"+(null!=q?" ["+q+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();c.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";c.appendChild(g);mxUtils.bind(this,function(m){mxEvent.addListener(m,
-"click",mxUtils.bind(this,function(q){mxEvent.isAltDown(q)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(q)):mxEvent.isShiftDown(q)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(q))}));var p=mxUtils.bind(this,function(){m.innerText="";mxUtils.write(m,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",
-p)})(g);c.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(c){if("sketch"==c&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var e=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(e.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var m=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);m.style.paddingLeft="12px";m.style.backgroundSize="";m.style.width="26px";m.style.height="30px";m.style.opacity="0.7";var p=this.createMenu("insert",Editor.plusImage);p.style.backgroundSize="";p.style.marginBottom="4px";p.style.display="block";p.style.width="30px";p.style.height="30px";p.style.padding="4px";p.style.opacity="0.7";var q=!1,z=mxUtils.bind(this,function(){e.innerText="";if(!q){var y=function(x,I,M,E){null!=I&&x.setAttribute("title",I);x.style.cursor="pointer";x.style.margin="8px 0px";
-x.style.display="block";e.appendChild(x);null!=E&&(x.style.position="relative",x.style.overflow="visible",I=document.createElement("div"),I.style.position="absolute",I.style.fontSize="8px",I.style.left="32px",I.style.top="28px",mxUtils.write(I,E),x.appendChild(I));return x};y(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");y(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");y(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");y(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var A=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");A.geometry.setTerminalPoint(new mxPoint(0,0),!0);A.geometry.setTerminalPoint(new mxPoint(A.geometry.width,0),!1);A.geometry.points=
-[];A.geometry.relative=!0;A.edge=!0;y(this.sidebar.createEdgeTemplateFromCells([A],A.geometry.width,A.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");A=A.clone();A.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";A.geometry.width=this.editor.graph.defaultEdgeLength+20;A.geometry.setTerminalPoint(new mxPoint(0,20),!0);A.geometry.setTerminalPoint(new mxPoint(A.geometry.width,20),!1);
-y(this.sidebar.createEdgeTemplateFromCells([A],A.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));y(m,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(p)}"1"!=urlParams.embedInline&&e.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){q?(mxUtils.setPrefixedStyle(e.style,"transform","translate(0, -50%)"),e.style.padding="8px 6px 4px",e.style.width="40px",e.style.top="50%",e.style.bottom="",e.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",q=!1,z()):(e.innerText="",e.appendChild(g),mxUtils.setPrefixedStyle(e.style,"transform","translate(0, 0)"),e.style.bottom="12px",e.style.padding="0px",e.style.height="24px",e.style.width="24px",e.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",q=!0)}));this.addListener("darkModeChanged",
-z);this.addListener("sketchModeChanged",z);z();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(c){"sketch"==c?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="relative",c.style.height="21px",c.style.width="21px",c.style.right="0px",c.style.top="3px",this.sketchMenubarElt.appendChild(c))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.right=
-"14px",c.style.top="5px",document.body.appendChild(c)))};EditorUi.prototype.createMenu=function(c,e){var g=this.menus.get(c),m=this.menubar.addMenu(mxResources.get(c),g.funct);m.className="geToolbarButton";m.style.display="inline-block";m.style.cursor="pointer";m.style.height="24px";m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(g,m,"geMenuItem");null!=e&&(m.style.backgroundImage="url("+e+")",m.style.backgroundPosition="center center",m.style.backgroundRepeat="no-repeat",m.style.backgroundSize=
-"100% 100%",m.style.width="24px",m.innerText="");return m};EditorUi.prototype.createMenuItem=function(c,e,g){var m=document.createElement("a");m.className="geToolbarButton";m.setAttribute("title",mxResources.get(c));m.style.backgroundImage="url("+e+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="100% 100%";m.style.display="inline-block";m.style.cursor="pointer";m.style.marginLeft="6px";m.style.width="24px";m.style.height="24px";var p=this.actions.get(c);
-null!=p&&(mxEvent.addListener(m,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()})),mxEvent.addListener(m,"click",function(q){"disabled"!=m.getAttribute("disabled")&&p.funct(q);mxEvent.consume(q)}),g||(c=function(){p.isEnabled()?(m.removeAttribute("disabled"),m.style.cursor="pointer"):(m.setAttribute("disabled","disabled"),m.style.cursor="default");m.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",
-c),c()));return m};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,e,240,g,mxUtils.bind(this,function(m){m.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
-"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,
+this.actions.get("redo").addListener("stateChanged",c);c();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(c){if("sketch"==c&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";c.appendChild(e);var g=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var p=null!=this.pages?this.pages.length:1,n=this.getPageIndex(this.currentPage);n=null!=n?n+1:1;var t=this.currentPage.getId();
+e.setAttribute("title",this.currentPage.getName()+" ("+n+"/"+p+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();c.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";c.appendChild(g);mxUtils.bind(this,function(p){mxEvent.addListener(p,
+"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var n=mxUtils.bind(this,function(){p.innerText="";mxUtils.write(p,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,n);this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",
+n)})(g);c.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(c){if("sketch"==c&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var e=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(e.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var p=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);p.style.paddingLeft="12px";p.style.backgroundSize="";p.style.width="26px";p.style.height="30px";p.style.opacity="0.7";var n=this.createMenu("insert",Editor.plusImage);n.style.backgroundSize="";n.style.marginBottom="4px";n.style.display="block";n.style.width="30px";n.style.height="30px";n.style.padding="4px";n.style.opacity="0.7";var t=!1,y=mxUtils.bind(this,function(){e.innerText="";if(!t){var A=function(u,R,l,q){null!=R&&u.setAttribute("title",R);u.style.cursor="pointer";u.style.margin="8px 0px";
+u.style.display="block";e.appendChild(u);null!=q&&(u.style.position="relative",u.style.overflow="visible",R=document.createElement("div"),R.style.position="absolute",R.style.fontSize="8px",R.style.left="32px",R.style.top="28px",mxUtils.write(R,q),u.appendChild(R));return u};A(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");A(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");A(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");A(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var C=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,0),!1);C.geometry.points=
+[];C.geometry.relative=!0;C.edge=!0;A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,C.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");C=C.clone();C.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";C.geometry.width=this.editor.graph.defaultEdgeLength+20;C.geometry.setTerminalPoint(new mxPoint(0,20),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,20),!1);
+A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));A(p,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(n)}"1"!=urlParams.embedInline&&e.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(e.style,"transform","translate(0, -50%)"),e.style.padding="8px 6px 4px",e.style.width="40px",e.style.top="50%",e.style.bottom="",e.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,y()):(e.innerText="",e.appendChild(g),mxUtils.setPrefixedStyle(e.style,"transform","translate(0, 0)"),e.style.bottom="12px",e.style.padding="0px",e.style.height="24px",e.style.width="24px",e.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
+y);this.addListener("sketchModeChanged",y);y();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(c){"sketch"==c?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="4px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="relative",c.style.height="21px",c.style.width="21px",c.style.right="0px",c.style.top="3px",this.sketchMenubarElt.appendChild(c))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),
+this.statusContainer.style.marginTop=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.right="14px",c.style.top="5px",document.body.appendChild(c)))};EditorUi.prototype.createMenu=function(c,e){var g=this.menus.get(c),p=this.menubar.addMenu(mxResources.get(c),g.funct);p.className="geToolbarButton";p.style.display="inline-block";p.style.cursor="pointer";p.style.height=
+"24px";p.setAttribute("title",mxResources.get(c));this.menus.menuCreated(g,p,"geMenuItem");null!=e&&(p.style.backgroundImage="url("+e+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="100% 100%",p.style.width="24px",p.innerText="");return p};EditorUi.prototype.createMenuItem=function(c,e,g){var p=document.createElement("a");p.className="geToolbarButton";p.setAttribute("title",mxResources.get(c));p.style.backgroundImage="url("+e+")";p.style.backgroundPosition=
+"center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="100% 100%";p.style.display="inline-block";p.style.cursor="pointer";p.style.marginLeft="6px";p.style.width="24px";p.style.height="24px";var n=this.actions.get(c);null!=n&&(mxEvent.addListener(p,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(p,"click",function(t){"disabled"!=p.getAttribute("disabled")&&n.funct(t);mxEvent.consume(t)}),g||(c=function(){n.isEnabled()?
+(p.removeAttribute("disabled"),p.style.cursor="pointer"):(p.setAttribute("disabled","disabled"),p.style.cursor="default");p.style.opacity=n.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c()));return p};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?
+580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,e,240,g,mxUtils.bind(this,function(p){p.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var x=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=
+function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):x.apply(this,arguments)};var D=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():D.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top=
+"0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=c?c:1)&&this.editor.graph.sizeDidChange()):G.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?
+66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,
mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
@@ -11764,200 +11767,201 @@ mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var u=document.createElement("link");u.setAttribute("rel","stylesheet");u.setAttribute("href",STYLE_PATH+"/dark.css");
-u.setAttribute("charset","UTF-8");u.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var e=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";e.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;e.view.gridColor=e.view.defaultGridColor;e.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var H=document.createElement("link");H.setAttribute("rel","stylesheet");H.setAttribute("href",STYLE_PATH+"/dark.css");
+H.setAttribute("charset","UTF-8");H.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var e=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";e.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;e.view.gridColor=e.view.defaultGridColor;e.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
"#ffffff";e.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";e.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";e.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";e.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.loadStylesheet();null!=this.actions.layersWindow&&
(c=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,c&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=e.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
e.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=e.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=e.shapeForegroundColor;Graph.prototype.defaultThemeName=e.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==u.parentNode&&document.getElementsByTagName("head")[0].appendChild(u):
-null!=u.parentNode&&u.parentNode.removeChild(u)}};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=
-c){var e=function(m,p,q){null==m[p]&&(m[p]=q)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,
-"jettySize","auto");e(g.defaultEdgeStyle,"orthogonalLoop","1");e(g.defaultEdgeStyle,"endArrow","open");e(g.defaultEdgeStyle,"endSize","14");e(g.defaultEdgeStyle,"startSize","14");c&&(e(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),e(g.defaultVertexStyle,"hachureGap","4"),e(g.defaultVertexStyle,"sketch","1"),e(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
-e(g.defaultEdgeStyle,"sketch","1"),e(g.defaultEdgeStyle,"hachureGap","4"),e(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),e(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),
-e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
-mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
-this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,p){try{this.spinner.stop();var q=this.createImageDataUri(m,e,"png"),z=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,z,y,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,
-function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,m){var p=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](m)};
-EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),p=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(p));e?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=p,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;
-e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,m){var p=this.editor.graph,q=null;p.lastPasteXml==c?p.pasteCounter++:(p.lastPasteXml=c,p.pasteCounter=0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(c))q=this.importXml(c,z,z),p.setSelectionCells(q);else if(e&&1==p.getSelectionCount()){z=p.getStartEditingCell(p.getSelectionCell(),
-m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==p.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{p.model.beginUpdate();try{p.labelChanged(z,c),Graph.isLink(c)&&p.setLinkForCell(z,c)}finally{p.model.endUpdate()}}p.setSelectionCell(z)}else q=p.getInsertPoint(),p.isMouseInsertPoint()&&(z=0,p.lastPasteXml==c&&0<p.pasteCounter&&p.pasteCounter--),q=this.insertTextAt(c,q.x+z,q.y+z,!0),p.setSelectionCells(q);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return q};EditorUi.prototype.pasteCells=function(c,e,g,m){if(!mxEvent.isConsumed(c)){var p=e,q=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),y=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var A=decodeURIComponent(z);this.isCompatibleString(A)&&(y=!0,z=A)}catch(n){}y=y?null:c.clipboardData.getData("text/html");null!=y&&0<y.length?(p=
-this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=z&&0<z.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,y))}z=p.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(n){var v=this.editor.graph;v.lastPasteXml==n?v.pasteCounter++:(v.lastPasteXml=n,v.pasteCounter=0);var D=
-v.pasteCounter*v.gridSize;v.setSelectionCells(this.importXml(n,D,D));v.scrollCellToVisible(v.getSelectionCell())}),mxUtils.bind(this,function(n){this.handleError(n)})),mxEvent.consume(c));else{var x=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText),I=!1;try{var M=x.lastIndexOf("%3E");0<=M&&M<x.length-3&&(x=x.substring(0,M+3))}catch(n){}try{z=p.getElementsByTagName("span"),(A=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(x))&&
-(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,x=A)}catch(n){}try{if(null!=x&&0<x.length){if(0==x.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var E=mxUtils.bind(this,function(){try{x=(new MiroImporter).importMiroJson(JSON.parse(x)),this.pasteXml(x,m,I,c)}catch(n){console.log("Miro import error:",n)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",E):E()}else this.pasteXml(x,m,I,c);try{mxEvent.consume(c)}catch(n){}}else if(!g){var Q=
-this.editor.graph;Q.lastPasteXml=null;Q.pasteCounter=0}}catch(n){this.handleError(n)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(m){null!=e&&(e.parentNode.removeChild(e),e=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<
-document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(m){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,
-!0);else{var p=this.extractGraphModelFromEvent(m);if(null==p){var q=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?p=q.getData("Text"):(p=null,p=0<=mxUtils.indexOf(q.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=p&&0<p.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(p),q=q.getElementsByTagName("img"),0<q.length&&
-(p=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(p=q.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(p))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(),
-null,!0)})):/^https?:\/\//.test(p)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(p):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(p)))))}else this.openLocalFile(p,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var m=document.body;var p=document.documentElement;var q=(m.clientWidth||p.clientWidth)-3;m=
-Math.max(m.clientHeight||0,p.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,q=c.clientWidth,m=c.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=g+"px";p.style.width=Math.max(0,q-3)+"px";p.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);
-return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),m=new mxGraphModel;g.decode(e,m);e=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(e);g++)c.push(m.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,m,p){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=
-e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(y){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==y.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,y,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,e,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,
-mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(y){4==y.readyState&&(this.spinner.stop(),200<=y.status&&299>=y.status?q(y.responseText):this.handleError({message:mxResources.get(413==
-y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(y){this.spinner.stop();this.openLocalFile(y,e,m)}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,m)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(p=null,m=!0,
-c=z)}this.spinner.stop();this.openLocalFile(c,e,m,p,null!=p?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(m){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,m.name,m,e)}catch(z){this.handleError(z)}});p.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==m.type.substring(0,
-5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?p.readAsText(m):p.readAsDataURL(m)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,m,p){var q=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var y=mxUtils.parseXml(c);null!=y&&(this.editor.setGraphXml(y.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,m,p))});if(null!=
-c&&0<c.length)null==q||!q.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(z){if(null!=
-z){var y=z.lastIndexOf(".");0<y&&(z=z.substring(y+1,z.length));null==e[z]&&(e[z]=!0)}}var m=this.editor.graph,p=m.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&(g(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=m.model.getChildCount(c);for(var q=0;q<p;q++)this.addBasenamesForCell(m.model.getChildAt(c,q),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
-c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
-null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=
-!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,m,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var z=q.model.cells,y;for(y in z){var A=z[y];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=e.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(p){g.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(c){var e=null,g=!1,m=!1,p=null,q=mxUtils.bind(this,function(A,x){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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var x=A.data,I=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
-"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var E=!1;try{x=JSON.parse(x),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[x])}catch(Y){x=null}try{if(null==x)return;
-if("dialog"==x.action){this.showError(null!=x.titleKey?mxResources.get(x.titleKey):x.title,null!=x.messageKey?mxResources.get(x.messageKey):x.message,null!=x.buttonKey?mxResources.get(x.buttonKey):x.button);null!=x.modified&&(this.editor.modified=x.modified);return}if("layout"==x.action){this.executeLayouts(this.editor.graph.createLayouts(x.layouts));return}if("prompt"==x.action){this.spinner.stop();var Q=new FilenameDialog(this,x.defaultValue||"",null!=x.okKey?mxResources.get(x.okKey):x.ok,function(Y){null!=
-Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:x}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:x}),"*")},null!=x.titleKey?mxResources.get(x.titleKey):x.title);this.showDialog(Q.container,300,80,!0,!1);Q.init();return}if("draft"==x.action){var n=M(x.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[x.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",
-message:x}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:x}),"*")}),x.editKey?mxResources.get(x.editKey):null,x.discardKey?mxResources.get(x.discardKey):null,x.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:x}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{Q.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:x}),"*")}return}if("template"==x.action){this.spinner.stop();var v=1==x.enableRecent,D=1==x.enableSearch,H=1==x.enableCustomTemp;if("1"==urlParams.newTempDlg&&!x.templatesOnly&&null!=x.callback){var K=this.getCurrentUser(),G=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:x}),
-"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,v?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,D?mxUtils.bind(this,function(Y,Z,ba,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
-!1,!1,!0,!0);this.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Q=new NewDialog(this,!1,x.templatesOnly?!1:null!=x.callback,mxUtils.bind(this,function(Y,Z,ba,fa){Y=Y||this.emptyDiagramXml;null!=x.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:fa,builtIn:!0,message:x}),"*"):(c(Y,A,Y!=this.emptyDiagramXml,x.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
-null,v?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
-x.withoutType);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==x.action){var N=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:N,message:x}),"*");return}if("status"==x.action){null!=x.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(x.messageKey))):null!=x.message&&this.editor.setStatus(mxUtils.htmlEntities(x.message));
-null!=x.modified&&(this.editor.modified=x.modified);return}if("spinner"==x.action){var T=null!=x.messageKey?mxResources.get(x.messageKey):x.message;null==x.show||x.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==x.action){this.actions.get("exit").funct();return}if("viewport"==x.action){null!=x.viewport&&(this.embedViewport=x.viewport);return}if("snapshot"==x.action){this.sendEmbeddedSvgExport(!0);return}if("export"==x.action){if("png"==x.format||"xmlpng"==x.format){if(null==
-x.spin&&null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin)){var V=null!=x.xml?x.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,X=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=x.format;Z.message=x;Z.data=Y;Z.xml=V;z.postMessage(JSON.stringify(Z),"*")}),l=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==x.format&&
-(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(V)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);X(Y)}),B=x.pageId||(null!=this.pages?x.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=B){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
-B){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);U.getGlobalVariable=function(ra){return"page"==ra?Z.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Z.root)}if(null!=x.layerIds){var fa=U.model,ja=fa.getChildCells(fa.getRoot()),ha={};for(ba=0;ba<x.layerIds.length;ba++)ha[x.layerIds[ba]]=!0;for(ba=0;ba<ja.length;ba++)fa.setVisible(ja[ba],ha[ja[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){l(ra.toDataURL("image/png"))}),
-x.width,null,x.background,mxUtils.bind(this,function(){l(null)}),null,null,x.scale,x.transparent,x.shadow,null,U,x.border,null,x.grid,x.keepTheme)});null!=x.xml&&0<x.xml.length&&(g=!0,this.setFileData(V),g=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==x.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=x.layerIds&&0<x.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:x.layerIds})):"")+(null!=x.scale?"&scale="+x.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
-function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?X("data:image/png;base64,"+Y.getText()):l(null)}),mxUtils.bind(this,function(){l(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=x;if("html2"==x.format||"html"==x.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=x.format}else if("html"==x.format)Z=this.editor.getGraphXml(),
-Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=x.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=x.background?x.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);z.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==x.format)(null==x.spin&&
-null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,x.embedImages,Z,x.scale,x.border,x.shadow,x.keepTheme);else if(null==x.spin&&null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,x.scale,x.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||x.shadow,null,x.keepTheme),
-(this.editor.graph.shadowVisible||x.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){x.embedImages||null==x.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(ja){ba(mxUtils.getXml(ja))})):ba(mxUtils.getXml(fa))}));return}z.postMessage(JSON.stringify(Y),"*")}),null!=x.xml&&0<x.xml.length){if(this.editor.graph.mathEnabled){var P=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){P.apply(this,arguments);L()}}g=!0;this.setFileData(x.xml);
-g=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==x.action){E=x.toSketch;m=1==x.autosave;this.hideDialog();null!=x.modified&&null==urlParams.modified&&(urlParams.modified=x.modified);null!=x.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=x.saveAndExit);null!=x.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=x.noSaveBtn);if(null!=x.rough){var O=Editor.sketchMode;this.doSetSketchMode(x.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-x.dark&&(O=Editor.darkMode,this.doSetDarkMode(x.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=x.border&&(this.embedExportBorder=x.border);null!=x.background&&(this.embedExportBackground=x.background);null!=x.viewport&&(this.embedViewport=x.viewport);this.embedExitPoint=null;if(null!=x.rect){var R=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=x.rect.top+"px";this.diagramContainer.style.left=x.rect.left+
-"px";this.diagramContainer.style.height=x.rect.height+"px";this.diagramContainer.style.width=x.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=x.maxFitScale;Y.fit(2*R);Y.maxFitScale=Z;Y.container.scrollTop-=2*R;Y.container.scrollLeft-=2*R;this.fireEvent(new mxEventObject("editInlineStart","data",[x]))})}null!=x.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=x.noExitBtn);
-null!=x.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,x.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n);try{x.libs&&this.sidebar.showEntries(x.libs)}catch(Y){}x=null!=x.xmlpng?this.extractGraphModelFromPng(x.xmlpng):null!=x.descriptor?x.descriptor:x.xml}else{if("merge"==x.action){var S=this.getCurrentFile();null!=S&&(n=M(x.xml),null!=n&&""!=
-n&&S.mergeFile(new LocalFile(this,n),function(){z.postMessage(JSON.stringify({event:"merge",message:x}),"*")},function(Y){z.postMessage(JSON.stringify({event:"merge",message:x,error:Y}),"*")}))}else"remoteInvokeReady"==x.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==x.action?this.handleRemoteInvoke(x,A.origin):"remoteInvokeResponse"==x.action?this.handleRemoteInvokeResponse(x):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(x)}),"*");return}}catch(Y){this.handleError(Y)}}var W=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){g=!0;try{c(Y,Z,null,E)}catch(ba){this.handleError(ba)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");p=W();m&&null==e&&(e=mxUtils.bind(this,function(ba,fa){ba=W();ba==p||g||(fa=this.createLoadMessage("autosave"),fa.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));p=ba}),
-this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",
-e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=x&&"function"===typeof x.substring&&"data:application/vnd.visio;base64,"==x.substring(0,34)?(M="0M8R4KGxGuE"==x.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(x.substring(x.indexOf(",")+1)),function(Y){aa(Y,A)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=x&&"function"===typeof x.substring&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(x,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(x,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,A)}),""):null!=x&&"function"===typeof x.substring&&this.isLucidChartData(x)?this.convertLucidChart(x,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==x||"object"!==typeof x||
-null==x.format||null==x.data&&null==x.url?(x=M(x),aa(x,A)):this.loadDescriptor(x,mxUtils.bind(this,function(Y){aa(W(),A)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(A,x,I){y.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
-href:A,target:x,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";c.style.marginRight="12px";c.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var e=document.createElement("button");e.className="geBigButton";if("1"==
-urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,g);e.setAttribute("title",g);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e));"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e));this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),
-null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),
-m=[],p=[],q=[],z={};if(0<g.length){var y={},A=this.editor.graph,x=null,I=null,M=null,E=null,Q=null,n=null,v=null,D="whiteSpace=wrap;html=1;",H=null,K=null,G="",N="auto",T="auto",V=!1,U=null,X=null,l=40,B=40,L=100,P=0,O=mxUtils.bind(this,function(){null!=e?e(da):(A.setSelectionCells(da),A.scrollCellToVisible(A.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),R=A.getFreeInsertPoint(),S=R.x,W=R.y;R=W;var aa=null,Y="auto";
-K=null;for(var Z=[],ba=null,fa=null,ja=0;ja<g.length&&"#"==g[ja].charAt(0);){c=g[ja].replace(/\r$/,"");for(ja++;ja<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ja].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[ja].substring(1)),ja++;if("#"!=c.charAt(1)){var ha=c.indexOf(":");if(0<ha){var ra=mxUtils.trim(c.substring(1,ha)),ma=mxUtils.trim(c.substring(ha+1));"label"==ra?aa=A.sanitizeHtml(ma):"labelname"==ra&&0<ma.length&&"-"!=ma?Q=ma:"labels"==ra&&0<ma.length&&"-"!=ma?v=JSON.parse(ma):"style"==
-ra?I=ma:"parentstyle"==ra?D=ma:"unknownStyle"==ra&&"-"!=ma?n=ma:"stylename"==ra&&0<ma.length&&"-"!=ma?E=ma:"styles"==ra&&0<ma.length&&"-"!=ma?M=JSON.parse(ma):"vars"==ra&&0<ma.length&&"-"!=ma?x=JSON.parse(ma):"identity"==ra&&0<ma.length&&"-"!=ma?H=ma:"parent"==ra&&0<ma.length&&"-"!=ma?K=ma:"namespace"==ra&&0<ma.length&&"-"!=ma?G=ma:"width"==ra?N=ma:"height"==ra?T=ma:"collapsed"==ra&&"-"!=ma?V="true"==ma:"left"==ra&&0<ma.length?U=ma:"top"==ra&&0<ma.length?X=ma:"ignore"==ra?fa=ma.split(","):"connect"==
-ra?Z.push(JSON.parse(ma)):"link"==ra?ba=ma:"padding"==ra?P=parseFloat(ma):"edgespacing"==ra?l=parseFloat(ma):"nodespacing"==ra?B=parseFloat(ma):"levelspacing"==ra?L=parseFloat(ma):"layout"==ra&&(Y=ma)}}}if(null==g[ja])throw Error(mxResources.get("invalidOrMissingFile"));var Ga=this.editor.csvToArray(g[ja].replace(/\r$/,""));ha=c=null;ra=[];for(ma=0;ma<Ga.length;ma++)H==Ga[ma]&&(c=ma),K==Ga[ma]&&(ha=ma),ra.push(mxUtils.trim(Ga[ma]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==aa&&(aa="%"+ra[0]+"%");if(null!=Z)for(var Ea=0;Ea<Z.length;Ea++)null==y[Z[Ea].to]&&(y[Z[Ea].to]={});H=[];for(ma=ja+1;ma<g.length;ma++){var za=this.editor.csvToArray(g[ma].replace(/\r$/,""));if(null==za){var Pa=40<g[ma].length?g[ma].substring(0,40)+"...":g[ma];throw Error(Pa+" ("+ma+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&H.push(za)}A.model.beginUpdate();try{for(ma=0;ma<H.length;ma++){za=H[ma];var Aa=null,Fa=null!=c?G+za[c]:null;g=!1;null!=Fa&&(Aa=A.model.getCell(Fa),
-g=null==Aa||0<=mxUtils.indexOf(m,Aa));var qa=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");qa.collapsed=V;qa.vertex=!0;qa.id=Fa;null==Aa||g||A.model.setCollapsed(Aa,V);for(var Ba=0;Ba<za.length;Ba++)A.setAttributeForCell(qa,ra[Ba],za[Ba]),null==Aa||g||A.setAttributeForCell(Aa,ra[Ba],za[Ba]);if(null!=Q&&null!=v){var Ra=v[qa.getAttribute(Q)];null!=Ra&&(A.labelChanged(qa,Ra),null==Aa||g||A.cellLabelChanged(Aa,Ra))}if(null!=E&&null!=M){var xa=M[qa.getAttribute(E)];null!=xa&&(qa.style=
-xa)}A.setAttributeForCell(qa,"placeholders","1");qa.style=A.replacePlaceholders(qa,qa.style,x);null==Aa||g?A.fireEvent(new mxEventObject("cellsInserted","cells",[qa])):(A.model.setStyle(Aa,qa.style),0>mxUtils.indexOf(q,Aa)&&q.push(Aa),A.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])));g=null!=Aa;Aa=qa;if(!g)for(Ea=0;Ea<Z.length;Ea++)y[Z[Ea].to][Aa.getAttribute(Z[Ea].to)]=Aa;null!=ba&&"link"!=ba&&(A.setLinkForCell(Aa,Aa.getAttribute(ba)),A.setAttributeForCell(Aa,ba,null));var Da=this.editor.graph.getPreferredSizeForCell(Aa);
-K=null!=ha?A.model.getCell(G+za[ha]):null;if(Aa.vertex){Pa=null!=K?0:S;ja=null!=K?0:W;null!=U&&null!=Aa.getAttribute(U)&&(Aa.geometry.x=Pa+parseFloat(Aa.getAttribute(U)));null!=X&&null!=Aa.getAttribute(X)&&(Aa.geometry.y=ja+parseFloat(Aa.getAttribute(X)));var va="@"==N.charAt(0)?Aa.getAttribute(N.substring(1)):null;Aa.geometry.width=null!=va&&"auto"!=va?parseFloat(Aa.getAttribute(N.substring(1))):"auto"==N||"auto"==va?Da.width+P:parseFloat(N);var Ka="@"==T.charAt(0)?Aa.getAttribute(T.substring(1)):
-null;Aa.geometry.height=null!=Ka&&"auto"!=Ka?parseFloat(Ka):"auto"==T||"auto"==Ka?Da.height+P:parseFloat(T);R+=Aa.geometry.height+B}g?(null==z[Fa]&&(z[Fa]=[]),z[Fa].push(Aa)):(m.push(Aa),null!=K?(K.style=A.replacePlaceholders(K,D,x),A.addCell(Aa,K),p.push(K)):q.push(A.addCell(Aa)))}for(ma=0;ma<p.length;ma++)va="@"==N.charAt(0)?p[ma].getAttribute(N.substring(1)):null,Ka="@"==T.charAt(0)?p[ma].getAttribute(T.substring(1)):null,"auto"!=N&&"auto"!=va||"auto"!=T&&"auto"!=Ka||A.updateGroupBounds([p[ma]],
-P,!0);var la=q.slice(),da=q.slice();for(Ea=0;Ea<Z.length;Ea++){var ca=Z[Ea];for(ma=0;ma<m.length;ma++){Aa=m[ma];var na=mxUtils.bind(this,function(Ha,La,Qa){var Ia=La.getAttribute(Qa.from);if(null!=Ia&&""!=Ia){Ia=Ia.split(",");for(var Na=0;Na<Ia.length;Na++){var Oa=y[Qa.to][Ia[Na]];if(null==Oa&&null!=n){Oa=new mxCell(Ia[Na],new mxGeometry(S,W,0,0),n);Oa.style=A.replacePlaceholders(La,Oa.style,x);var Ma=this.editor.graph.getPreferredSizeForCell(Oa);Oa.geometry.width=Ma.width+P;Oa.geometry.height=Ma.height+
-P;y[Qa.to][Ia[Na]]=Oa;Oa.vertex=!0;Oa.id=Ia[Na];q.push(A.addCell(Oa))}if(null!=Oa){Ma=Qa.label;null!=Qa.fromlabel&&(Ma=(La.getAttribute(Qa.fromlabel)||"")+(Ma||""));null!=Qa.sourcelabel&&(Ma=A.replacePlaceholders(La,Qa.sourcelabel,x)+(Ma||""));null!=Qa.tolabel&&(Ma=(Ma||"")+(Oa.getAttribute(Qa.tolabel)||""));null!=Qa.targetlabel&&(Ma=(Ma||"")+A.replacePlaceholders(Oa,Qa.targetlabel,x));var Sa="target"==Qa.placeholders==!Qa.invert?Oa:Ha;Sa=null!=Qa.style?A.replacePlaceholders(Sa,Qa.style,x):A.createCurrentEdgeStyle();
-Ma=A.insertEdge(null,null,Ma||"",Qa.invert?Oa:Ha,Qa.invert?Ha:Oa,Sa);if(null!=Qa.labels)for(Sa=0;Sa<Qa.labels.length;Sa++){var Ua=Qa.labels[Sa],Ja=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Ua.placeholders&&(Ja.value=A.replacePlaceholders("target"==Ua.placeholders==!Qa.invert?Oa:Ha,Ja.value,x));if(null!=Ua.dx||null!=Ua.dy)Ja.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=
-Ua.dy?Ua.dy:0);Ma.insert(Ja)}da.push(Ma);mxUtils.remove(Qa.invert?Ha:Oa,la)}}}});na(Aa,Aa,ca);if(null!=z[Aa.id])for(Ba=0;Ba<z[Aa.id].length;Ba++)na(Aa,z[Aa.id][Ba],ca)}}if(null!=fa)for(ma=0;ma<m.length;ma++)for(Aa=m[ma],Ba=0;Ba<fa.length;Ba++)A.setAttributeForCell(Aa,mxUtils.trim(fa[Ba]),null);if(0<q.length){var ka=new mxParallelEdgeLayout(A);ka.spacing=l;ka.checkOverlap=!0;var pa=function(){0<ka.spacing&&ka.execute(A.getDefaultParent());for(var Ha=0;Ha<q.length;Ha++){var La=A.getCellGeometry(q[Ha]);
-La.x=Math.round(A.snap(La.x));La.y=Math.round(A.snap(La.y));"auto"==N&&(La.width=Math.round(A.snap(La.width)));"auto"==T&&(La.height=Math.round(A.snap(La.height)))}};if("["==Y.charAt(0)){var ea=O;A.view.validate();this.executeLayouts(A.createLayouts(JSON.parse(Y)),function(){pa();ea()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(A);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var oa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ha){return oa.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};
-this.executeLayout(function(){ia.execute(A.getDefaultParent());pa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&da.length==2*q.length-1&&1==la.length){A.view.validate();var ua=new mxCompactTreeLayout(A,"horizontaltree"==Y);ua.levelDistance=B;ua.edgeRouting=!1;ua.resetEdges=!1;this.executeLayout(function(){ua.execute(A.getDefaultParent(),0<la.length?la[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==la.length){A.view.validate();var wa=
-new mxHierarchicalLayout(A,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=B;wa.parallelEdgeSpacing=l;wa.interRankCellSpacing=L;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(A.getDefaultParent(),da);A.moveCells(da,S,W)},!0,O);O=null}else if("orgchart"==Y){A.view.validate();var Ca=new mxOrgChartLayout(A,2,L,B),ya=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return ya.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};this.executeLayout(function(){Ca.execute(A.getDefaultParent());
-pa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&da.length>q.length){A.view.validate();var ta=new mxFastOrganicLayout(A);ta.forceConstant=3*B;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var sa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return sa.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};this.executeLayout(function(){ta.execute(A.getDefaultParent());pa()},!0,O);O=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
-function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(e+=g+m+"="+urlParams[m],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(c=0==e?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+urlParams[m],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,m,p){c=new LinkDialog(this,c,e,g,!0,m,p);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
-this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var C=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(c){var e=C.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var F=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=
-e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);
-this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=
-c&&null!=c.shape&&null!=c.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,m,p,q,z,y){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");
-else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(m,p,q)),"image/svg+xml");else{var x=c.getFileData(!0,null,null,null,null,!0),I=A.getGraphBounds(),M=Math.floor(I.width*p/A.view.scale),E=Math.floor(I.height*p/A.view.scale);if(x.length<=MAX_REQUEST_SIZE&&M*E<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var Q={globalVars:A.getExportVariables()};y&&(Q.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});c.saveRequest(e,g,function(n,
-v){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(v||"0")+(null!=n?"&filename="+encodeURIComponent(n):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<z?"&dpi="+z:"")+"&bg="+(null!=m?m:"none")+"&w="+M+"&h="+E+"&border="+q+"&xml="+encodeURIComponent(x))})}else"png"==g?c.exportImage(p,null==m||"none"==m,!0,!1,!1,q,!0,!1,null,y,z):c.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=c;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=
-document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var y=z[c];if("R"==y.substring(0,1)){var A=JSON.parse(decodeURIComponent(y.substring(1)));
-q[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(x){p.innerText="";if(0==x.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<x.length;I++){var M=x[I];q[M.id]&&(e[M.id]=M);var E=this.addCheckbox(p,M.title,q[M.id]);(function(Q,n){mxEvent.addListener(n,"change",function(){this.checked?e[Q.id]=Q:delete e[Q.id]})})(M,E)}},mxUtils.bind(this,
-function(x){p.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=x&&null!=x.message?x.message:mxResources.get("unknownError"));p.appendChild(I)}));g.appendChild(p);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var x=0,I;for(I in e)null==q[I]&&(x++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],
-null,mxUtils.bind(this,function(E){x--;0==x&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,E,M))}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){x--;0==x&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[I]));for(I in q)e[I]||this.closeLibrary(new RemoteLibrary(this,null,q[I]));0==x&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==H.parentNode&&document.getElementsByTagName("head")[0].appendChild(H):
+null!=H.parentNode&&H.parentNode.removeChild(H)}};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=
+c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"sketch"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)c.defaultEdgeStyle.fontSize=null,c.defaultVertexStyle.fontSize=
+null;else{c.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var e=parseInt(this.menus.defaultFontSize)-4;c.defaultEdgeStyle.fontSize=e}"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.jiggle="2",c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.jiggle="2",c.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};
+EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,
+e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(p,n){try{this.spinner.stop();var t=this.createImageDataUri(p,e,"png"),y=parseInt(n.getAttribute("width")),A=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,y,A,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(p){this.handleError(p)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,p){var n=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":n,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](p)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var p=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),n=mxUtils.getXml(g.encodeCells(p));mxUtils.setTextContent(c,encodeURIComponent(n));e?(g.removeCells(p,!1),g.lastPasteXml=null):(g.lastPasteXml=n,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
+e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,p){var n=this.editor.graph,t=null;n.lastPasteXml==c?n.pasteCounter++:(n.lastPasteXml=c,n.pasteCounter=0);var y=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(c))t=this.importXml(c,y,y),n.setSelectionCells(t);else if(e&&1==n.getSelectionCount()){y=n.getStartEditingCell(n.getSelectionCell(),p);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==n.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])n.setCellStyles(mxConstants.STYLE_IMAGE,
+c,[y]);else{n.model.beginUpdate();try{n.labelChanged(y,c),Graph.isLink(c)&&n.setLinkForCell(y,c)}finally{n.model.endUpdate()}}n.setSelectionCell(y)}else t=n.getInsertPoint(),n.isMouseInsertPoint()&&(y=0,n.lastPasteXml==c&&0<n.pasteCounter&&n.pasteCounter--),t=this.insertTextAt(c,t.x+y,t.y+y,!0),n.setSelectionCells(t);n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));return t};EditorUi.prototype.pasteCells=
+function(c,e,g,p){if(!mxEvent.isConsumed(c)){var n=e,t=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var y=c.clipboardData.getData("text/plain"),A=!1;if(null!=y&&0<y.length&&"%3CmxGraphModel%3E"==y.substring(0,18))try{var C=decodeURIComponent(y);this.isCompatibleString(C)&&(A=!0,y=C)}catch(J){}A=A?null:c.clipboardData.getData("text/html");null!=A&&0<A.length?(n=this.parseHtmlData(A),t="text/plain"!=n.getAttribute("data-type")):null!=y&&0<y.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,
+A))}y=n.getElementsByTagName("span");if(null!=y&&0<y.length&&"application/vnd.lucid.chart.objects"===y[0].getAttribute("data-lucid-type"))g=y[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(J){var M=this.editor.graph;M.lastPasteXml==J?M.pasteCounter++:(M.lastPasteXml=J,M.pasteCounter=0);var E=M.pasteCounter*M.gridSize;M.setSelectionCells(this.importXml(J,E,E));M.scrollCellToVisible(M.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),
+mxEvent.consume(c));else{var u=t?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText),R=!1;try{var l=u.lastIndexOf("%3E");0<=l&&l<u.length-3&&(u=u.substring(0,l+3))}catch(J){}try{y=n.getElementsByTagName("span"),(C=null!=y&&0<y.length?mxUtils.trim(decodeURIComponent(y[0].textContent)):decodeURIComponent(u))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(R=!0,u=C)}catch(J){}try{if(null!=u&&0<u.length){if(0==u.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var q=mxUtils.bind(this,function(){try{u=(new MiroImporter).importMiroJson(JSON.parse(u)),this.pasteXml(u,p,R,c)}catch(J){console.log("Miro import error:",J)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",q):q()}else this.pasteXml(u,p,R,c);try{mxEvent.consume(c)}catch(J){}}else if(!g){var B=this.editor.graph;B.lastPasteXml=null;B.pasteCounter=0}}catch(J){this.handleError(J)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
+function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(p){null!=e&&(e.parentNode.removeChild(e),e=null);p.stopPropagation();p.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(p){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());p.stopPropagation();p.preventDefault()})),mxEvent.addListener(c[g],"drop",
+mxUtils.bind(this,function(p){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<p.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(p.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(p)&&!mxEvent.isShiftDown(p)):this.openFiles(p.dataTransfer.files,!0);else{var n=this.extractGraphModelFromEvent(p);if(null==n){var t=null!=p.dataTransfer?p.dataTransfer:p.clipboardData;null!=t&&(10==
+document.documentMode||11==document.documentMode?n=t.getData("Text"):(n=null,n=0<=mxUtils.indexOf(t.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=n&&0<n.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(n),t=t.getElementsByTagName("img"),0<t.length&&(n=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(n=t.getData("text/plain"))),null!=n&&(Editor.isPngDataUrl(n)?
+(n=Editor.extractGraphModelFromPng(n),null!=n&&0<n.length&&this.openLocalFile(n,null,!0)):this.isRemoteFileFormat(n)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(n))).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()&&this.openLocalFile(y.getText(),null,!0)})):/^https?:\/\//.test(n)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(n):window.openWindow((mxClient.IS_CHROMEAPP?
+EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(n)))))}else this.openLocalFile(n,null,!0)}p.stopPropagation();p.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var p=document.body;var n=document.documentElement;var t=(p.clientWidth||n.clientWidth)-3;p=Math.max(p.clientHeight||0,n.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,t=c.clientWidth,p=c.clientHeight;n=document.createElement("div");n.style.zIndex=
+mxPopupMenu.prototype.zIndex+2;n.style.border="3px dotted rgb(254, 137, 12)";n.style.pointerEvents="none";n.style.position="absolute";n.style.top=e+"px";n.style.left=g+"px";n.style.width=Math.max(0,t-3)+"px";n.style.height=Math.max(0,p-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(n):document.body.appendChild(n);return n};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=
+[];if(null!=e){var g=new mxCodec(e.ownerDocument),p=new mxGraphModel;g.decode(e,p);e=p.getChildAt(p.getRoot(),0);for(g=0;g<p.getChildCount(e);g++)c.push(p.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,p,n){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var t=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,p);try{this.loadLibrary(new LocalLibrary(this,A,e))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(A,e,p)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(A){this.spinner.stop();t(A)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,
+mxUtils.bind(this,function(A){this.spinner.stop();t(A)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(A){4==A.readyState&&(this.spinner.stop(),200<=A.status&&299>=A.status?t(A.responseText):this.handleError({message:mxResources.get(413==A.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
+else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(A){this.spinner.stop();this.openLocalFile(A,e,p)}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(A){this.handleError(A,
+mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(A){this.spinner.stop();t(A)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,p)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var y=Editor.extractGraphModelFromPdf(c);null!=y&&(n=null,p=!0,c=y)}this.spinner.stop();this.openLocalFile(c,e,p,n,null!=n?g:null)}}};EditorUi.prototype.openFiles=function(c,
+e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(p){var n=new FileReader;n.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,p.name,p,e)}catch(y){this.handleError(y)}});n.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==p.type.substring(0,5)&&"application/pdf"!==p.type||"image/svg"===p.type.substring(0,9)?n.readAsText(p):n.readAsDataURL(p)})(c[g])};
+EditorUi.prototype.openLocalFile=function(c,e,g,p,n){var t=this.getCurrentFile(),y=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var A=mxUtils.parseXml(c);null!=A&&(this.editor.setGraphXml(A.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,p,n))});if(null!=c&&0<c.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)?y():(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||null!=p)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));
+};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(y){if(null!=y){var A=y.lastIndexOf(".");0<A&&(y=y.substring(A+1,y.length));null==e[y]&&(e[y]=!0)}}var p=this.editor.graph,n=p.getCellStyle(c);
+g(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));p.model.isEdge(c)&&(g(mxMarker.getPackageForType(n[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(n[mxConstants.STYLE_ENDARROW])));n=p.model.getChildCount(c);for(var t=0;t<n;t++)this.addBasenamesForCell(p.model.getChildAt(c,t),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=
+c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
+null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,
+g,p,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var y=t.model.cells,A;for(A in y){var C=y[A];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(u){console.log(u)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=p?p:!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(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;
+e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var p=e.background;if(null==p||p==mxConstants.NONE)p=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(n){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,p,1,this.embedExportBorder)}else c||
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,u){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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(C){if(C.source==(window.opener||window.parent)){var u=C.data,R=null,l=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,
+26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(ha){}return Y});if("json"==urlParams.proto){var q=!1;try{u=JSON.parse(u),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[u])}catch(Y){u=null}try{if(null==u)return;if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):
+u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("layout"==u.action){this.executeLayouts(this.editor.graph.createLayouts(u.layouts));return}if("prompt"==u.action){this.spinner.stop();var B=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):u.ok,function(Y){null!=Y?y.postMessage(JSON.stringify({event:"prompt",value:Y,message:u}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:u}),
+"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(B.container,300,80,!0,!1);B.init();return}if("draft"==u.action){var J=l(u.xml);this.spinner.stop();B=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),J,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),
+"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null,u.ignore?mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:u}),"*")}):null);this.showDialog(B.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{B.init()}catch(Y){y.postMessage(JSON.stringify({event:"draft",error:Y.toString(),message:u}),"*")}return}if("template"==u.action){this.spinner.stop();
+var M=1==u.enableRecent,E=1==u.enableSearch,L=1==u.enableCustomTemp;if("1"==urlParams.newTempDlg&&!u.templatesOnly&&null!=u.callback){var P=this.getCurrentUser(),S=new TemplatesDialog(this,function(Y,ha,da){Y=Y||this.emptyDiagramXml;y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ha,tempUrl:da.url,libs:da.libs,builtIn:null!=da.info&&null!=da.info.custContentId,message:u}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
+P?P.id:null,M?mxUtils.bind(this,function(Y,ha,da){this.remoteInvoke("getRecentDiagrams",[da],null,Y,ha)}):null,E?mxUtils.bind(this,function(Y,ha,da,wa){this.remoteInvoke("searchDiagrams",[Y,wa],null,ha,da)}):null,mxUtils.bind(this,function(Y,ha,da){this.remoteInvoke("getFileContent",[Y.url],null,ha,da)}),null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,!1,!1,!0,!0);this.showDialog(S.container,window.innerWidth,window.innerHeight,!0,
+!1,null,!1,!0);return}B=new NewDialog(this,!1,u.templatesOnly?!1:null!=u.callback,mxUtils.bind(this,function(Y,ha,da,wa){Y=Y||this.emptyDiagramXml;null!=u.callback?y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ha,tempUrl:da,libs:wa,builtIn:!0,message:u}),"*"):(c(Y,C,Y!=this.emptyDiagramXml,u.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,M?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",
+[null],null,Y,function(){Y(null,"Network Error!")})}):null,E?mxUtils.bind(this,function(Y,ha){this.remoteInvoke("searchDiagrams",[Y,null],null,ha,function(){ha(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,ha,da){y.postMessage(JSON.stringify({event:"template",docUrl:Y,info:ha,name:da}),"*")}),null,null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==u.withoutType);this.showDialog(B.container,620,460,!0,!1,mxUtils.bind(this,
+function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));B.init();return}if("textContent"==u.action){var V=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:V,message:u}),"*");return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(u.messageKey))):null!=u.message&&this.editor.setStatus(mxUtils.htmlEntities(u.message));null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var X=
+null!=u.messageKey?mxResources.get(u.messageKey):u.message;null==u.show||u.show?this.spinner.spin(document.body,X):this.spinner.stop();return}if("exit"==u.action){this.actions.get("exit").funct();return}if("viewport"==u.action){null!=u.viewport&&(this.embedViewport=u.viewport);return}if("snapshot"==u.action){this.sendEmbeddedSvgExport(!0);return}if("export"==u.action){if("png"==u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):
+u.spin)){var m=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var z=this.editor.graph,K=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=u.format;ha.message=u;ha.data=Y;ha.xml=m;y.postMessage(JSON.stringify(ha),"*")}),Q=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==u.format&&(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(m)));z!=this.editor.graph&&
+z.container.parentNode.removeChild(z.container);K(Y)}),N=u.pageId||(null!=this.pages?u.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var U=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=N){var Y=z.getGlobalVariable;z=this.createTemporaryGraph(z.getStylesheet());for(var ha,da=0;da<this.pages.length;da++)if(this.pages[da].getId()==N){ha=this.updatePageRoot(this.pages[da]);break}null==ha&&(ha=this.currentPage);z.getGlobalVariable=
+function(ta){return"page"==ta?ha.getName():"pagenumber"==ta?1:Y.apply(this,arguments)};document.body.appendChild(z.container);z.model.setRoot(ha.root)}if(null!=u.layerIds){var wa=z.model,za=wa.getChildCells(wa.getRoot()),xa={};for(da=0;da<u.layerIds.length;da++)xa[u.layerIds[da]]=!0;for(da=0;da<za.length;da++)wa.setVisible(za[da],xa[za[da].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ta){Q(ta.toDataURL("image/png"))}),u.width,null,u.background,mxUtils.bind(this,function(){Q(null)}),
+null,null,u.scale,u.transparent,u.shadow,null,z,u.border,null,u.grid,u.keepTheme)});null!=u.xml&&0<u.xml.length&&(g=!0,this.setFileData(m),g=!1);U()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==u.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=u.layerIds&&0<u.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:u.layerIds})):"")+(null!=u.scale?"&scale="+u.scale:"")+"&base64=1&xml="+encodeURIComponent(m))).send(mxUtils.bind(this,function(Y){200<=Y.getStatus()&&
+299>=Y.getStatus()?K("data:image/png;base64,"+Y.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(U=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=u;if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();Y.xml=mxUtils.getXml(ha);Y.data=this.getFileData(null,null,!0,null,null,null,ha);Y.format=u.format}else if("html"==u.format)ha=this.editor.getGraphXml(),Y.data=this.getHtml(ha,
+this.editor.graph),Y.xml=mxUtils.getXml(ha),Y.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;ha=null!=u.background?u.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var da=mxUtils.bind(this,function(wa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(wa);y.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==u.format)(null==u.spin&&null==u.spinKey||
+this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,da,null,null,u.embedImages,ha,u.scale,u.border,u.shadow,u.keepTheme);else if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),ha=this.editor.graph.getSvg(ha,u.scale,u.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||u.shadow,null,u.keepTheme),(this.editor.graph.shadowVisible||
+u.shadow)&&this.editor.graph.addSvgShadow(ha),this.embedFonts(ha,mxUtils.bind(this,function(wa){u.embedImages||null==u.embedImages?this.editor.convertImages(wa,mxUtils.bind(this,function(za){da(mxUtils.getXml(za))})):da(mxUtils.getXml(wa))}));return}y.postMessage(JSON.stringify(Y),"*")}),null!=u.xml&&0<u.xml.length){if(this.editor.graph.mathEnabled){var T=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){T.apply(this,arguments);U()}}g=!0;this.setFileData(u.xml);g=!1;this.editor.graph.mathEnabled||
+U()}else U();return}if("load"==u.action){q=u.toSketch;p=1==u.autosave;this.hideDialog();null!=u.modified&&null==urlParams.modified&&(urlParams.modified=u.modified);null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit);null!=u.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=u.noSaveBtn);if(null!=u.rough){var W=Editor.sketchMode;this.doSetSketchMode(u.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=u.dark&&(W=Editor.darkMode,
+this.doSetDarkMode(u.dark),W!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=u.border&&(this.embedExportBorder=u.border);null!=u.background&&(this.embedExportBackground=u.background);null!=u.viewport&&(this.embedViewport=u.viewport);this.embedExitPoint=null;if(null!=u.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=u.rect.top+"px";this.diagramContainer.style.left=u.rect.left+"px";this.diagramContainer.style.height=
+u.rect.height+"px";this.diagramContainer.style.width=u.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";R=mxUtils.bind(this,function(){var Y=this.editor.graph,ha=Y.maxFitScale;Y.maxFitScale=u.maxFitScale;Y.fit(2*Z);Y.maxFitScale=ha;Y.container.scrollTop-=2*Z;Y.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[u]))})}null!=u.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=u.noExitBtn);null!=u.title&&null!=this.buttonContainer&&
+(J=document.createElement("span"),mxUtils.write(J,u.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(J),this.embedFilenameSpan=J);try{u.libs&&this.sidebar.showEntries(u.libs)}catch(Y){}u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=u.descriptor?u.descriptor:u.xml}else{if("merge"==u.action){var ca=this.getCurrentFile();null!=ca&&(J=l(u.xml),null!=J&&""!=J&&ca.mergeFile(new LocalFile(this,J),function(){y.postMessage(JSON.stringify({event:"merge",
+message:u}),"*")},function(Y){y.postMessage(JSON.stringify({event:"merge",message:u,error:Y}),"*")}))}else"remoteInvokeReady"==u.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==u.action?this.handleRemoteInvoke(u,C.origin):"remoteInvokeResponse"==u.action?this.handleRemoteInvokeResponse(u):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(u)}),"*");return}}catch(Y){this.handleError(Y)}}var ba=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<
+this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(Y,ha){g=!0;try{c(Y,ha,null,q)}catch(da){this.handleError(da)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ba();p&&null==e&&(e=mxUtils.bind(this,function(da,wa){da=ba();da==n||g||(wa=this.createLoadMessage("autosave"),wa.xml=da,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));n=da}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",
+e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ha=this.createLoadMessage("load"),
+ha.xml=Y,y.postMessage(JSON.stringify(ha),"*");null!=R&&R()});null!=u&&"function"===typeof u.substring&&"data:application/vnd.visio;base64,"==u.substring(0,34)?(l="0M8R4KGxGuE"==u.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(u.substring(u.indexOf(",")+1)),function(Y){fa(Y,C)},mxUtils.bind(this,function(Y){this.handleError(Y)}),l)):null!=u&&"function"===typeof u.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(u,"")?this.isOffline()?this.showError(mxResources.get("error"),
+mxResources.get("notInOffline")):this.parseFileData(u,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&fa(Y.responseText,C)}),""):null!=u&&"function"===typeof u.substring&&this.isLucidChartData(u)?this.convertLucidChart(u,mxUtils.bind(this,function(Y){fa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==u||"object"!==typeof u||null==u.format||null==u.data&&null==u.url?(u=l(u),fa(u,C)):this.loadDescriptor(u,
+mxUtils.bind(this,function(Y){fa(ba(),C)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(t,"*");if("json"==urlParams.proto){var A=this.editor.graph.openLink;this.editor.graph.openLink=function(C,u,R){A.apply(this,arguments);y.postMessage(JSON.stringify({event:"openLink",href:C,target:u,allowOpener:R}),"*")}}};EditorUi.prototype.addEmbedButtons=
+function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";c.style.marginRight="12px";c.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var e=document.createElement("button");e.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,g);e.setAttribute("title",g);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),
+mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e));"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",
+e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e));this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
+null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),p=[],n=[],t=[],y={};if(0<g.length){var A={},C=this.editor.graph,u=null,R=null,
+l=null,q=null,B=null,J=null,M=null,E="whiteSpace=wrap;html=1;",L=null,P=null,S="",V="auto",X="auto",m=!1,z=null,K=null,Q=40,N=40,U=100,T=0,W=mxUtils.bind(this,function(){null!=e?e(la):(C.setSelectionCells(la),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),ca=Z.x,ba=Z.y;Z=ba;var fa=null,Y="auto";P=null;for(var ha=[],da=null,wa=null,za=0;za<g.length&&"#"==g[za].charAt(0);){c=
+g[za].replace(/\r$/,"");for(za++;za<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[za].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[za].substring(1)),za++;if("#"!=c.charAt(1)){var xa=c.indexOf(":");if(0<xa){var ta=mxUtils.trim(c.substring(1,xa)),ka=mxUtils.trim(c.substring(xa+1));"label"==ta?fa=C.sanitizeHtml(ka):"labelname"==ta&&0<ka.length&&"-"!=ka?B=ka:"labels"==ta&&0<ka.length&&"-"!=ka?M=JSON.parse(ka):"style"==ta?R=ka:"parentstyle"==ta?E=ka:"unknownStyle"==ta&&"-"!=ka?J=ka:"stylename"==
+ta&&0<ka.length&&"-"!=ka?q=ka:"styles"==ta&&0<ka.length&&"-"!=ka?l=JSON.parse(ka):"vars"==ta&&0<ka.length&&"-"!=ka?u=JSON.parse(ka):"identity"==ta&&0<ka.length&&"-"!=ka?L=ka:"parent"==ta&&0<ka.length&&"-"!=ka?P=ka:"namespace"==ta&&0<ka.length&&"-"!=ka?S=ka:"width"==ta?V=ka:"height"==ta?X=ka:"collapsed"==ta&&"-"!=ka?m="true"==ka:"left"==ta&&0<ka.length?z=ka:"top"==ta&&0<ka.length?K=ka:"ignore"==ta?wa=ka.split(","):"connect"==ta?ha.push(JSON.parse(ka)):"link"==ta?da=ka:"padding"==ta?T=parseFloat(ka):
+"edgespacing"==ta?Q=parseFloat(ka):"nodespacing"==ta?N=parseFloat(ka):"levelspacing"==ta?U=parseFloat(ka):"layout"==ta&&(Y=ka)}}}if(null==g[za])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(g[za].replace(/\r$/,""));xa=c=null;ta=[];for(ka=0;ka<Na.length;ka++)L==Na[ka]&&(c=ka),P==Na[ka]&&(xa=ka),ta.push(mxUtils.trim(Na[ka]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+ta[0]+"%");if(null!=ha)for(var Ka=0;Ka<ha.length;Ka++)null==
+A[ha[Ka].to]&&(A[ha[Ka].to]={});L=[];for(ka=za+1;ka<g.length;ka++){var Ea=this.editor.csvToArray(g[ka].replace(/\r$/,""));if(null==Ea){var ra=40<g[ka].length?g[ka].substring(0,40)+"...":g[ka];throw Error(ra+" ("+ka+"):\n"+mxResources.get("containsValidationErrors"));}0<Ea.length&&L.push(Ea)}C.model.beginUpdate();try{for(ka=0;ka<L.length;ka++){Ea=L[ka];var qa=null,Oa=null!=c?S+Ea[c]:null;g=!1;null!=Oa&&(qa=C.model.getCell(Oa),g=null==qa||0<=mxUtils.indexOf(p,qa));var ua=new mxCell(fa,new mxGeometry(ca,
+Z,0,0),R||"whiteSpace=wrap;html=1;");ua.collapsed=m;ua.vertex=!0;ua.id=Oa;null==qa||g||C.model.setCollapsed(qa,m);for(var Ca=0;Ca<Ea.length;Ca++)C.setAttributeForCell(ua,ta[Ca],Ea[Ca]),null==qa||g||C.setAttributeForCell(qa,ta[Ca],Ea[Ca]);if(null!=B&&null!=M){var Ba=M[ua.getAttribute(B)];null!=Ba&&(C.labelChanged(ua,Ba),null==qa||g||C.cellLabelChanged(qa,Ba))}if(null!=q&&null!=l){var La=l[ua.getAttribute(q)];null!=La&&(ua.style=La)}C.setAttributeForCell(ua,"placeholders","1");ua.style=C.replacePlaceholders(ua,
+ua.style,u);null==qa||g?C.fireEvent(new mxEventObject("cellsInserted","cells",[ua])):(C.model.setStyle(qa,ua.style),0>mxUtils.indexOf(t,qa)&&t.push(qa),C.fireEvent(new mxEventObject("cellsInserted","cells",[qa])));g=null!=qa;qa=ua;if(!g)for(Ka=0;Ka<ha.length;Ka++)A[ha[Ka].to][qa.getAttribute(ha[Ka].to)]=qa;null!=da&&"link"!=da&&(C.setLinkForCell(qa,qa.getAttribute(da)),C.setAttributeForCell(qa,da,null));var ma=this.editor.graph.getPreferredSizeForCell(qa);P=null!=xa?C.model.getCell(S+Ea[xa]):null;
+if(qa.vertex){ra=null!=P?0:ca;za=null!=P?0:ba;null!=z&&null!=qa.getAttribute(z)&&(qa.geometry.x=ra+parseFloat(qa.getAttribute(z)));null!=K&&null!=qa.getAttribute(K)&&(qa.geometry.y=za+parseFloat(qa.getAttribute(K)));var ea="@"==V.charAt(0)?qa.getAttribute(V.substring(1)):null;qa.geometry.width=null!=ea&&"auto"!=ea?parseFloat(qa.getAttribute(V.substring(1))):"auto"==V||"auto"==ea?ma.width+T:parseFloat(V);var aa="@"==X.charAt(0)?qa.getAttribute(X.substring(1)):null;qa.geometry.height=null!=aa&&"auto"!=
+aa?parseFloat(aa):"auto"==X||"auto"==aa?ma.height+T:parseFloat(X);Z+=qa.geometry.height+N}g?(null==y[Oa]&&(y[Oa]=[]),y[Oa].push(qa)):(p.push(qa),null!=P?(P.style=C.replacePlaceholders(P,E,u),C.addCell(qa,P),n.push(P)):t.push(C.addCell(qa)))}for(ka=0;ka<n.length;ka++)ea="@"==V.charAt(0)?n[ka].getAttribute(V.substring(1)):null,aa="@"==X.charAt(0)?n[ka].getAttribute(X.substring(1)):null,"auto"!=V&&"auto"!=ea||"auto"!=X&&"auto"!=aa||C.updateGroupBounds([n[ka]],T,!0);var na=t.slice(),la=t.slice();for(Ka=
+0;Ka<ha.length;Ka++){var pa=ha[Ka];for(ka=0;ka<p.length;ka++){qa=p[ka];var ia=mxUtils.bind(this,function(Ga,Ia,Ja){var Pa=Ia.getAttribute(Ja.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ra=0;Ra<Pa.length;Ra++){var Ua=A[Ja.to][Pa[Ra]];if(null==Ua&&null!=J){Ua=new mxCell(Pa[Ra],new mxGeometry(ca,ba,0,0),J);Ua.style=C.replacePlaceholders(Ia,Ua.style,u);var Ha=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ha.width+T;Ua.geometry.height=Ha.height+T;A[Ja.to][Pa[Ra]]=Ua;Ua.vertex=
+!0;Ua.id=Pa[Ra];t.push(C.addCell(Ua))}if(null!=Ua){Ha=Ja.label;null!=Ja.fromlabel&&(Ha=(Ia.getAttribute(Ja.fromlabel)||"")+(Ha||""));null!=Ja.sourcelabel&&(Ha=C.replacePlaceholders(Ia,Ja.sourcelabel,u)+(Ha||""));null!=Ja.tolabel&&(Ha=(Ha||"")+(Ua.getAttribute(Ja.tolabel)||""));null!=Ja.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ua,Ja.targetlabel,u));var Ta="target"==Ja.placeholders==!Ja.invert?Ua:Ga;Ta=null!=Ja.style?C.replacePlaceholders(Ta,Ja.style,u):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,
+null,Ha||"",Ja.invert?Ua:Ga,Ja.invert?Ga:Ua,Ta);if(null!=Ja.labels)for(Ta=0;Ta<Ja.labels.length;Ta++){var Sa=Ja.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=C.replacePlaceholders("target"==Sa.placeholders==!Ja.invert?Ua:Ga,Wa.value,u));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ha.insert(Wa)}la.push(Ha);
+mxUtils.remove(Ja.invert?Ga:Ua,na)}}}});ia(qa,qa,pa);if(null!=y[qa.id])for(Ca=0;Ca<y[qa.id].length;Ca++)ia(qa,y[qa.id][Ca],pa)}}if(null!=wa)for(ka=0;ka<p.length;ka++)for(qa=p[ka],Ca=0;Ca<wa.length;Ca++)C.setAttributeForCell(qa,mxUtils.trim(wa[Ca]),null);if(0<t.length){var ja=new mxParallelEdgeLayout(C);ja.spacing=Q;ja.checkOverlap=!0;var oa=function(){0<ja.spacing&&ja.execute(C.getDefaultParent());for(var Ga=0;Ga<t.length;Ga++){var Ia=C.getCellGeometry(t[Ga]);Ia.x=Math.round(C.snap(Ia.x));Ia.y=Math.round(C.snap(Ia.y));
+"auto"==V&&(Ia.width=Math.round(C.snap(Ia.width)));"auto"==X&&(Ia.height=Math.round(C.snap(Ia.height)))}};if("["==Y.charAt(0)){var ya=W;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(Y)),function(){oa();ya()});W=null}else if("circle"==Y){var Aa=new mxCircleLayout(C);Aa.disableEdgeStyle=!1;Aa.resetEdges=!1;var Fa=Aa.isVertexIgnored;Aa.isVertexIgnored=function(Ga){return Fa.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){Aa.execute(C.getDefaultParent());
+oa()},!0,W);W=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&la.length==2*t.length-1&&1==na.length){C.view.validate();var Da=new mxCompactTreeLayout(C,"horizontaltree"==Y);Da.levelDistance=N;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(C.getDefaultParent(),0<na.length?na[0]:null)},!0,W);W=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==na.length){C.view.validate();var va=new mxHierarchicalLayout(C,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);va.intraCellSpacing=N;va.parallelEdgeSpacing=Q;va.interRankCellSpacing=U;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(C.getDefaultParent(),la);C.moveCells(la,ca,ba)},!0,W);W=null}else if("orgchart"==Y){C.view.validate();var sa=new mxOrgChartLayout(C,2,U,N),Ma=sa.isVertexIgnored;sa.isVertexIgnored=function(Ga){return Ma.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){sa.execute(C.getDefaultParent());oa()},!0,W);W=null}else if("organic"==
+Y||"auto"==Y&&la.length>t.length){C.view.validate();var Qa=new mxFastOrganicLayout(C);Qa.forceConstant=3*N;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){Qa.execute(C.getDefaultParent());oa()},!0,W);W=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=W&&W()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&
+"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",p;for(p in urlParams)0>mxUtils.indexOf(c,p)&&null!=urlParams[p]&&(e+=g+p+"="+urlParams[p],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),p;for(p in urlParams)0>mxUtils.indexOf(g,
+p)&&(c=0==e?c+"?":c+"&",null!=urlParams[p]&&(c+=p+"="+urlParams[p],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,p,n){c=new LinkDialog(this,c,e,g,!0,p,n);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=
+this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
+this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("resetView").setEnabled(e);
+this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));
+this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var I=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var e=I.apply(this,arguments);
+this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var F=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),p=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(p);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());
+this.actions.get("guides").setEnabled(p);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(p);this.actions.get("connectionArrows").setEnabled(p);this.actions.get("connectionPoints").setEnabled(p);this.actions.get("copyStyle").setEnabled(p&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(p&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(p);this.actions.get("createRevision").setEnabled(p);
+this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(p&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};
+var O=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);O.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,p,n,t,y,A){var C=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,
+"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var u=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),l=Math.floor(R.width*n/C.view.scale),q=Math.floor(R.height*n/C.view.scale);if(u.length<=MAX_REQUEST_SIZE&&l*q<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var B={globalVars:C.getExportVariables()};A&&(B.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,g,function(J,M){return new mxXmlRequest(EXPORT_URL,
+"format="+g+"&base64="+(M||"0")+(null!=J?"&filename="+encodeURIComponent(J):"")+"&extras="+encodeURIComponent(JSON.stringify(B))+(0<y?"&dpi="+y:"")+"&bg="+(null!=p?p:"none")+"&w="+l+"&h="+q+"&border="+t+"&xml="+encodeURIComponent(u))})}else"png"==g?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,A,y):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",A);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=
+this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var p=c;this.currentPage!=this.pages[g]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),p.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+p.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var p=document.createElement("h3");
+mxUtils.write(p,mxUtils.htmlEntities(c));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(p);var n=document.createElement("div");n.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var A=y[c];if("R"==A.substring(0,1)){var C=JSON.parse(decodeURIComponent(A.substring(1)));
+t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(u){}this.remoteInvoke("getCustomLibraries",null,null,function(u){n.innerText="";if(0==u.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<u.length;R++){var l=u[R];t[l.id]&&(e[l.id]=l);var q=this.addCheckbox(n,l.title,t[l.id]);(function(B,J){mxEvent.addListener(J,"change",function(){this.checked?e[B.id]=B:delete e[B.id]})})(l,q)}},mxUtils.bind(this,
+function(u){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=u&&null!=u.message?u.message:mxResources.get("unknownError"));n.appendChild(R)}));g.appendChild(n);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var u=0,R;for(R in e)null==t[R]&&(u++,mxUtils.bind(this,function(l){this.remoteInvoke("getFileContent",[l.downloadUrl],
+null,mxUtils.bind(this,function(q){u--;0==u&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,q,l))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){u--;0==u&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==u&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,m,p){var q=!0,z=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(z);q&&m.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(z);q&&p.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
-e){var g=mxUtils.bind(this,function(x,I){var M={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=I?M.error={errResp:I}:null!=x&&(M.resp=x);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var m=c.funtionName,p=this.remoteInvokableFns[m];if(null!=p&&"function"===typeof this[m]){if(p.allowedDomains){for(var q=!1,z=0;z<p.allowedDomains.length;z++)if(e=="https://"+p.allowedDomains[z]){q=!0;break}if(!q){g(null,"Invalid Call: "+m+" is not allowed.");return}}var y=c.functionArgs;Array.isArray(y)||
-(y=[]);if(p.isAsync)y.push(function(){g(Array.prototype.slice.apply(arguments))}),y.push(function(x){g(null,x||"Unkown Error")}),this[m].apply(this,y);else{var A=this[m].apply(this,y);g([A])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(x){g(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=
-function(p){try{var q=m.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};m.onsuccess=mxUtils.bind(this,function(p){var q=m.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var A=!0,x=!1,I,M=0,E=mxUtils.bind(this,function(){x=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){M++;n()}),n=mxUtils.bind(this,function(){try{if(M>=I.length)E();else{var D=I[M];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(H){null==H||".scratchpad"==D&&H==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):Q()}),Q)}}catch(H){console.log(H)}}),v=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title,
-size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],Q,Q,["filesInfo","files"])}catch(H){console.log(H)}});z=mxUtils.bind(this,function(D){try{if(D.source==y.contentWindow){var H={};try{H=JSON.parse(D.data)}catch(K){}"init"==H.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||x||
-(A?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],A=!1,n()):E():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?v(H.resp[0]):Q())}}catch(K){console.log(K)}});window.addEventListener("message",z)}})));c(q);q.onversionchange=function(){q.close()}});m.onerror=e;m.onblocked=function(){}}catch(p){null!=e&&e(p)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,m,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=
-[p],c=[c],e=[e]);var z=q.transaction(p,"readwrite");z.oncomplete=g;z.onerror=m;for(q=0;q<p.length;q++)z.objectStore(p[q]).put(null!=c&&null!=c[q]?{key:c[q],data:e[q]}:e[q])}catch(y){null!=m&&m(y)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,m){this.openDatabase(mxUtils.bind(this,function(p){m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);p=p.transaction(m,"readwrite");p.oncomplete=e;p.onerror=g;for(var q=0;q<m.length;q++)p.objectStore(m[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=
-function(c,e,g,m){this.openDatabase(mxUtils.bind(this,function(p){try{m=m||"objects";var q=p.transaction([m],"readonly").objectStore(m).get(c);q.onsuccess=function(){e(q.result)};q.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var p=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(z){null==z.target.result?c(q):(q.push(z.target.result.value),
-z.target.result.continue())};p.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var p=m.transaction([g],"readonly").objectStore(g).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=e}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
-this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var m=this.getCurrentFile();null!=m?m.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,p,n){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),A=mxUtils.bind(this,function(){window.clearTimeout(y);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(y);t&&n.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:A,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
+e){var g=mxUtils.bind(this,function(u,R){var l={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=R?l.error={errResp:R}:null!=u&&(l.resp=u);this.remoteWin.postMessage(JSON.stringify(l),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,y=0;y<n.allowedDomains.length;y++)if(e=="https://"+n.allowedDomains[y]){t=!0;break}if(!t){g(null,"Invalid Call: "+p+" is not allowed.");return}}var A=c.functionArgs;Array.isArray(A)||
+(A=[]);if(n.isAsync)A.push(function(){g(Array.prototype.slice.apply(arguments))}),A.push(function(u){g(null,u||"Unkown Error")}),this[p].apply(this,A);else{var C=this[p].apply(this,A);g([C])}}else g(null,"Invalid Call: "+p+" is not found.")}catch(u){g(null,"Invalid Call: An error occurred, "+u.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var p=g.open("database",2);p.onupgradeneeded=
+function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=e&&e(y)}};p.onsuccess=mxUtils.bind(this,function(n){var t=p.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var A=document.createElement("iframe");A.style.display="none";A.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(A);var C=!0,u=!1,R,l=0,q=mxUtils.bind(this,function(){u=!0;this.setDatabaseItem(".drawioMigrated3",!0);A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),B=mxUtils.bind(this,function(){l++;J()}),J=mxUtils.bind(this,function(){try{if(l>=R.length)q();else{var E=R[l];StorageFile.getFileContent(this,E,mxUtils.bind(this,function(L){null==L||".scratchpad"==E&&L==this.emptyLibraryXml?A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):B()}),B)}}catch(L){console.log(L)}}),M=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,
+size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],B,B,["filesInfo","files"])}catch(L){console.log(L)}});y=mxUtils.bind(this,function(E){try{if(E.source==A.contentWindow){var L={};try{L=JSON.parse(E.data)}catch(P){}"init"==L.event?(A.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||u||
+(C?null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?(R=L.resp[0],C=!1,J()):q():null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?M(L.resp[0]):B())}}catch(P){console.log(P)}});window.addEventListener("message",y)}})));c(t);t.onversionchange=function(){t.close()}});p.onerror=e;p.onblocked=function(){}}catch(n){null!=e&&e(n)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,p,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";Array.isArray(n)||(n=
+[n],c=[c],e=[e]);var y=t.transaction(n,"readwrite");y.oncomplete=g;y.onerror=p;for(t=0;t<n.length;t++)y.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(A){null!=p&&p(A)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,p){this.openDatabase(mxUtils.bind(this,function(n){p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);n=n.transaction(p,"readwrite");n.oncomplete=e;n.onerror=g;for(var t=0;t<p.length;t++)n.objectStore(p[t]).delete(c[t])}),g)};EditorUi.prototype.getDatabaseItem=
+function(c,e,g,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";var t=n.transaction([p],"readonly").objectStore(p).get(c);t.onsuccess=function(){e(t.result)};t.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(p){try{g=g||"objects";var n=p.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),t=[];n.onsuccess=function(y){null==y.target.result?c(t):(t.push(y.target.result.value),
+y.target.result.continue())};n.onerror=e}catch(y){null!=e&&e(y)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(p){try{g=g||"objects";var n=p.transaction([g],"readonly").objectStore(g).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
+this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var p=this.getCurrentFile();null!=p?p.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=
-g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,m,p,q,z,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,e,g,m,p,q,z,y)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,m,p,q,z,y,A,x,I,M,E,Q,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,m,p,q,z,y,A,x,I,M,E,Q,n,v)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(c,e,g,m)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,m,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,m,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var p=
-"<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(p||m)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,k,d,t,u){function C(){for(var D=x.getElementsByTagName("div"),H=0,K=0;K<D.length;K++)"none"!=D[K].style.display&&D[K].parentNode==x&&H++;I.style.display=0==H?"block":"none"}function F(D,H,K,G){function N(){H.removeChild(U);H.removeChild(X);V.style.display="block";T.style.display="block"}z={div:H,comment:D,saveCallback:K,deleteOnCancel:G};var T=H.querySelector(".geCommentTxt"),V=H.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=T.offsetHeight+"px";U.value=D.content;H.insertBefore(U,T);var X=document.createElement("div");X.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){G?(H.parentNode.removeChild(H),C()):N();z=null});l.className="geCommentEditBtn";X.appendChild(l);var B=mxUtils.button(mxResources.get("save"),function(){T.innerText="";D.content=U.value;mxUtils.write(T,D.content);N();K(D);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(B.click(),mxEvent.consume(L)):27==L.keyCode&&(l.click(),mxEvent.consume(L)))}));B.focus();B.className="geCommentEditBtn gePrimaryBtn";X.appendChild(B);H.insertBefore(X,T);V.style.display="none";T.style.display="none";U.focus()}function J(D,H){H.innerText="";D=new Date(D.modifiedDate);var K=b.timeSince(D);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo",
-[K],"{1} ago"));H.setAttribute("title",D.toLocaleDateString()+" "+D.toLocaleTimeString())}function c(D){var H=document.createElement("img");H.className="geCommentBusyImg";H.src=IMAGE_PATH+"/spin.gif";D.appendChild(H);D.busyImg=H}function e(D){D.style.border="1px solid red";D.removeChild(D.busyImg)}function g(D){D.style.border="";D.removeChild(D.busyImg)}function m(D,H,K,G,N){function T(O,R,S){var W=document.createElement("li");W.className="geCommentAction";var aa=document.createElement("a");aa.className=
-"geCommentActionLnk";mxUtils.write(aa,O);W.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,D);Y.preventDefault();mxEvent.consume(Y)});P.appendChild(W);S&&(W.style.display="none")}function V(){function O(W){R.push(S);if(null!=W.replies)for(var aa=0;aa<W.replies.length;aa++)S=S.nextSibling,O(W.replies[aa])}var R=[],S=X;O(D);return{pdiv:S,replies:R}}function U(O,R,S,W,aa){function Y(){c(ja);D.addReply(fa,function(ha){fa.id=ha;D.replies.push(fa);g(ja);S&&S()},function(ha){Z();e(ja);b.handleError(ha,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},W,aa)}function Z(){F(fa,ja,function(ha){Y()},!0)}var ba=V().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=D.id;null==D.replies&&(D.replies=[]);var ja=m(fa,D.replies,ba,G+1);R?Z():Y()}if(N||!D.isResolved){I.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",D.id);X.style.marginLeft=20*G+5+"px";D.isResolved&&!Editor.isDarkMode()&&(X.style.backgroundColor=
-"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var B=document.createElement("img");B.className="geCommentUserImg";B.src=D.user.pictureUrl||Editor.userImage;l.appendChild(B);B=document.createElement("div");B.className="geCommentHeaderTxt";l.appendChild(B);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,D.user.displayName||"");B.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
-D.id);J(D,L);B.appendChild(L);X.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,D.content||"");X.appendChild(l);D.isLocked&&(X.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";l.appendChild(P);p||D.isLocked||0!=G&&!q||T(mxResources.get("reply"),function(){U("",!0)},D.isResolved);B=b.getCurrentUser();null==B||B.id!=D.user.id||p||D.isLocked||(T(mxResources.get("edit"),
-function(){function O(){F(D,X,function(){c(X);D.editComment(D.content,function(){g(X)},function(R){e(X);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},D.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(X);D.deleteComment(function(O){if(!0===O){O=X.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=X.querySelectorAll(".geCommentAction");for(O=
-0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(X);X.style.opacity="0.5"}else{R=V(D).replies;for(O=0;O<R.length;O++)x.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==D){H.splice(O,1);break}I.style.display=0==x.getElementsByTagName("div").length?"block":"none"}},function(O){e(X);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},D.isResolved));p||D.isLocked||0!=G||T(D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
-O.target;S.innerText="";D.isResolved=!D.isResolved;mxUtils.write(S,D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var W=D.isResolved?"none":"",aa=V(D).replies,Y=Editor.isDarkMode()?"transparent":D.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ba.length;fa++)ba[fa]!=S.parentNode&&(ba[fa].style.display=W);Q||(aa[Z].style.display="none")}C()}D.isResolved?U(mxResources.get("reOpened")+
-": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});X.appendChild(l);null!=K?x.insertBefore(X,K.nextSibling):x.appendChild(X);for(K=0;null!=D.replies&&K<D.replies.length;K++)l=D.replies[K],l.isResolved=D.isResolved,m(l,D.replies,null,G+1,N);null!=z&&(z.comment.id==D.id?(N=D.content,D.content=z.comment.content,F(D,X,z.saveCallback,z.deleteOnCancel),D.content=N):null==z.comment.id&&z.comment.pCommentId==D.id&&(x.appendChild(z.div),F(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
-var p=!b.canComment(),q=b.canReplyToReplies(),z=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var A=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.className="geCommentsList";x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x.style.bottom=parseInt(A)+7+"px";y.appendChild(x);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(I,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=A;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A=document.createElement("a");A.className="geButton";if(!p){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(E,"click",function(D){function H(){F(K,G,function(N){c(G);b.addComment(N,function(T){N.id=T;n.push(N);g(G)},function(T){e(G);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),G=m(K,n,null,0);H();D.preventDefault();mxEvent.consume(D)});M.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
-E.className="geAdaptiveAsset";var Q=!1;mxEvent.addListener(E,"click",function(D){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";v();D.preventDefault();mxEvent.consume(D)});M.appendChild(E);b.commentsRefreshNeeded()&&(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),E.className="geAdaptiveAsset",mxEvent.addListener(E,"click",function(D){v();D.preventDefault();mxEvent.consume(D)}),M.appendChild(E));
-b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geAdaptiveAsset",mxEvent.addListener(A,"click",function(D){u();D.preventDefault();mxEvent.consume(D)}),M.appendChild(A));y.appendChild(M);var n=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var D=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns");
-z.comment.content=D.value;D.parentNode.removeChild(D);H.parentNode.removeChild(H)}catch(K){b.handleError(K)}x.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function G(N){if(null!=N){N.sort(function(V,U){return new Date(V.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<N.length;T++)G(N[T].replies)}}
-K.sort(function(N,T){return new Date(N.modifiedDate)-new Date(T.modifiedDate)});x.innerText="";x.appendChild(I);I.style.display="block";n=K;for(K=0;K<n.length;K++)G(n[K].replies),m(n[K],n,null,0,Q);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(x.appendChild(z.div),F(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(K){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):x.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-v();this.refreshComments=v;M=mxUtils.bind(this,function(){function D(T){var V=K[T.id];if(null!=V)for(J(T,V),V=0;null!=T.replies&&V<T.replies.length;V++)D(T.replies[V])}if(this.window.isVisible()){for(var H=x.querySelectorAll(".geCommentDate"),K={},G=0;G<H.length;G++){var N=H[G];K[N.getAttribute("data-commentId")]=N}for(G=0;G<n.length;G++)D(n[G])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),y,f,k,d,t,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,d,t,u,C,F,J,c,e){var g=document.createElement("div");g.style.textAlign="center";e=null!=e?e:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=e+
-"px";m.style.lineHeight="1.2em";mxUtils.write(m,f);g.appendChild(m);null!=c&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),m.appendChild(f),g.appendChild(m));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");u=mxUtils.button(u||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(p.checked)});u.className="geBtn";
-null!=F&&(u.innerHTML=F+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&c.appendChild(u);var q=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(p.checked)});c.appendChild(q);null!=C?(q.innerHTML=C+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-c.appendChild(u);g.appendChild(c);J?(c.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.style.marginBottom="0px",m.appendChild(p),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),m.appendChild(t),g.appendChild(m),mxEvent.addListener(t,"click",function(z){p.checked=!p.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){q.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");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,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,t){if(null!=f)for(var u=0;u<f.length;u++)null!=f[u]&&(b=this.patchPages(b,f[u],k,d,t));return b};
-EditorUi.prototype.patchPages=function(b,f,k,d,t){var u={},C=[],F={},J={},c={},e={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var g in d[EditorUi.DIFF_UPDATE])u[g]=d[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)J[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)F[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][g],null!=d.previous&&(e[d.previous]=g);if(null!=b){var m="";for(d=0;d<b.length;d++){var p=b[d].getId();c[p]=b[d];null!=e[m]||J[p]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][p]&&null!=f[EditorUi.DIFF_UPDATE][p].previous||(e[m]=p);m=p}}var q={},z=mxUtils.bind(this,function(A){var x=null!=A?A.getId():"";if(null!=A&&!q[x]){q[x]=!0;C.push(A);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][x]:null;null!=I&&(this.updatePageRoot(A),null!=I.name&&A.setName(I.name),
-null!=I.view&&this.patchViewState(A,I.view),null!=I.cells&&this.patchPage(A,I.cells,u[A.getId()],t),!k||null==I.cells&&null==I.view||(A.needsUpdate=!0))}A=e[x];null!=A&&(delete e[x],z(c[A]));A=F[x];null!=A&&(delete F[x],y(A))}),y=mxUtils.bind(this,function(A){A=mxUtils.parseXml(A.data).documentElement;A=new DiagramPage(A);this.updatePageRoot(A);var x=c[A.getId()];null==x?z(A):(this.patchPage(x,this.diffPages([x],[A]),u[x.getId()],t),k&&(x.needsUpdate=!0))});z();for(g in e)z(c[e[g]]),delete e[g];for(g in F)y(F[g]),
-delete F[g];return C};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
-EditorUi.prototype.createParentLookup=function(b,f){function k(c){var e=d[c];null==e&&(e={inserted:[],moved:{}},d[c]=e);return e}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var u=f[EditorUi.DIFF_INSERT][t],C=null!=u.parent?u.parent:"",F=null!=u.previous?u.previous:"";k(C).inserted[F]=u}if(null!=f[EditorUi.DIFF_UPDATE])for(var J in f[EditorUi.DIFF_UPDATE])u=f[EditorUi.DIFF_UPDATE][J],null!=u.previous&&(C=u.parent,null==C&&(t=b.getCell(J),null!=t&&(t=
-b.getParent(t),null!=t&&(C=t.getId()))),null!=C&&(k(C).moved[u.previous]=J));return d};
-EditorUi.prototype.patchPage=function(b,f,k,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(t,f);t.beginUpdate();try{var C=t.updateEdgeParent,F=new mxDictionary,J=[];t.updateEdgeParent=function(y,A){!F.get(y)&&d&&(F.put(y,!0),J.push(y))};var c=u[""],e=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=e&&(g=this.getCellForJson(e));if(null==g){var m=null!=c&&null!=c.moved?c.moved[""]:null;null!=m&&(g=t.getCell(m))}null!=g&&(t.setRoot(g),
-b.root=g);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var p=0;p<f[EditorUi.DIFF_REMOVE].length;p++){var q=t.getCell(f[EditorUi.DIFF_REMOVE][p]);null!=q&&t.remove(q)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(m in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(m),f[EditorUi.DIFF_UPDATE][m],null!=z?z[m]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(p=0;p<f[EditorUi.DIFF_INSERT].length;p++)e=f[EditorUi.DIFF_INSERT][p],
-q=t.getCell(e.id),null!=q&&(t.setTerminal(q,t.getCell(e.source),!0),t.setTerminal(q,t.getCell(e.target),!1));t.updateEdgeParent=C;if(d&&0<J.length)for(p=0;p<J.length;p++)t.contains(J[p])&&t.updateEdgeParent(J[p])}finally{t.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,k,d,t){if(null!=k){var u=d[k.getId()],C=null!=u&&null!=u.inserted?u.inserted:{};u=null!=u&&null!=u.moved?u.moved:{};for(var F=0,J=f.getChildCount(k),c="",e=0;e<J;e++){var g=f.getChildAt(k,e).getId();null==u[c]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][g]||null==t[EditorUi.DIFF_UPDATE][g].previous&&null==t[EditorUi.DIFF_UPDATE][g].parent)&&(u[c]=g);c=g}J=mxUtils.bind(this,function(m,p){var q=null!=m?m.getId():"";null!=m&&p&&(p=
-f.getCell(q),null!=p&&p!=m&&(m=null));null!=m&&(f.getChildAt(k,F)!=m&&f.add(k,m,F),this.patchCellRecursive(b,f,m,d,t),F++);return q});for(c=[null];0<c.length;)if(e=c.shift(),e=J(null!=e?e.child:null,null!=e?e.insert:!1),g=u[e],null!=g&&(delete u[e],c.push({child:f.getCell(g)})),g=C[e],null!=g&&(delete C[e],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(e in u)c.push({child:f.getCell(u[e])}),delete u[e];for(e in C)c.push({child:this.getCellForJson(C[e]),insert:!0}),delete C[e]}}};
+g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,p,n,t,y,A){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(c,e,g,p,n,t,y,A)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,p,n,t,y,A,C,u,R,l,q,B,J,M){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,p,n,t,y,A,C,u,R,l,q,B,J,M)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(c,e,g,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),p=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<p.length){var n=
+"<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,f,k,d,v,x){function D(){for(var B=y.getElementsByTagName("div"),J=0,M=0;M<B.length;M++)"none"!=B[M].style.display&&B[M].parentNode==y&&J++;A.style.display=0==J?"block":"none"}function G(B,J,M,E){function L(){J.removeChild(V);J.removeChild(X);S.style.display="block";P.style.display="block"}p={div:J,comment:B,saveCallback:M,deleteOnCancel:E};var P=J.querySelector(".geCommentTxt"),S=J.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
+"geCommentEditTxtArea";V.style.minHeight=P.offsetHeight+"px";V.value=B.content;J.insertBefore(V,P);var X=document.createElement("div");X.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){E?(J.parentNode.removeChild(J),D()):L();p=null});m.className="geCommentEditBtn";X.appendChild(m);var z=mxUtils.button(mxResources.get("save"),function(){P.innerText="";B.content=V.value;mxUtils.write(P,B.content);L();M(B);p=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(z.click(),mxEvent.consume(K)):27==K.keyCode&&(m.click(),mxEvent.consume(K)))}));z.focus();z.className="geCommentEditBtn gePrimaryBtn";X.appendChild(z);J.insertBefore(X,P);S.style.display="none";P.style.display="none";V.focus()}function H(B,J){J.innerText="";B=new Date(B.modifiedDate);var M=b.timeSince(B);null==M&&(M=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
+[M],"{1} ago"));J.setAttribute("title",B.toLocaleDateString()+" "+B.toLocaleTimeString())}function I(B){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";B.appendChild(J);B.busyImg=J}function F(B){B.style.border="1px solid red";B.removeChild(B.busyImg)}function O(B){B.style.border="";B.removeChild(B.busyImg)}function c(B,J,M,E,L){function P(N,U,T){var W=document.createElement("li");W.className="geCommentAction";var Z=document.createElement("a");Z.className=
+"geCommentActionLnk";mxUtils.write(Z,N);W.appendChild(Z);mxEvent.addListener(Z,"click",function(ca){U(ca,B);ca.preventDefault();mxEvent.consume(ca)});Q.appendChild(W);T&&(W.style.display="none")}function S(){function N(W){U.push(T);if(null!=W.replies)for(var Z=0;Z<W.replies.length;Z++)T=T.nextSibling,N(W.replies[Z])}var U=[],T=X;N(B);return{pdiv:T,replies:U}}function V(N,U,T,W,Z){function ca(){I(ha);B.addReply(Y,function(da){Y.id=da;B.replies.push(Y);O(ha);T&&T()},function(da){ba();F(ha);b.handleError(da,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},W,Z)}function ba(){G(Y,ha,function(da){ca()},!0)}var fa=S().pdiv,Y=b.newComment(N,b.getCurrentUser());Y.pCommentId=B.id;null==B.replies&&(B.replies=[]);var ha=c(Y,B.replies,fa,E+1);U?ba():ca()}if(L||!B.isResolved){A.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&&!Editor.isDarkMode()&&(X.style.backgroundColor=
+"ghostWhite");var m=document.createElement("div");m.className="geCommentHeader";var z=document.createElement("img");z.className="geCommentUserImg";z.src=B.user.pictureUrl||Editor.userImage;m.appendChild(z);z=document.createElement("div");z.className="geCommentHeaderTxt";m.appendChild(z);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,B.user.displayName||"");z.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
+B.id);H(B,K);z.appendChild(K);X.appendChild(m);m=document.createElement("div");m.className="geCommentTxt";mxUtils.write(m,B.content||"");X.appendChild(m);B.isLocked&&(X.style.opacity="0.5");m=document.createElement("div");m.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";m.appendChild(Q);e||B.isLocked||0!=E&&!g||P(mxResources.get("reply"),function(){V("",!0)},B.isResolved);z=b.getCurrentUser();null==z||z.id!=B.user.id||e||B.isLocked||(P(mxResources.get("edit"),
+function(){function N(){G(B,X,function(){I(X);B.editComment(B.content,function(){O(X)},function(U){F(X);N();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},B.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){I(X);B.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerText="";mxUtils.write(N,mxResources.get("msgDeleted"));var U=X.querySelectorAll(".geCommentAction");for(N=
+0;N<U.length;N++)U[N].parentNode.removeChild(U[N]);O(X);X.style.opacity="0.5"}else{U=S(B).replies;for(N=0;N<U.length;N++)y.removeChild(U[N]);for(N=0;N<J.length;N++)if(J[N]==B){J.splice(N,1);break}A.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(N){F(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},B.isResolved));e||B.isLocked||0!=E||P(B.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function U(){var T=
+N.target;T.innerText="";B.isResolved=!B.isResolved;mxUtils.write(T,B.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var W=B.isResolved?"none":"",Z=S(B).replies,ca=Editor.isDarkMode()?"transparent":B.isResolved?"ghostWhite":"white",ba=0;ba<Z.length;ba++){Z[ba].style.backgroundColor=ca;for(var fa=Z[ba].querySelectorAll(".geCommentAction"),Y=0;Y<fa.length;Y++)fa[Y]!=T.parentNode&&(fa[Y].style.display=W);R||(Z[ba].style.display="none")}D()}B.isResolved?V(mxResources.get("reOpened")+
+": ",!0,U,!1,!0):V(mxResources.get("markedAsResolved"),!1,U,!0)});X.appendChild(m);null!=M?y.insertBefore(X,M.nextSibling):y.appendChild(X);for(M=0;null!=B.replies&&M<B.replies.length;M++)m=B.replies[M],m.isResolved=B.isResolved,c(m,B.replies,null,E+1,L);null!=p&&(p.comment.id==B.id?(L=B.content,B.content=p.comment.content,G(B,X,p.saveCallback,p.deleteOnCancel),B.content=L):null==p.comment.id&&p.comment.pCommentId==B.id&&(y.appendChild(p.div),G(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return X}}
+var e=!b.canComment(),g=b.canReplyToReplies(),p=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var t=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(t)+7+"px";n.appendChild(y);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(A,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";t=document.createElement("a");t.className="geButton";if(!e){var u=t.cloneNode();u.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';u.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(u,"click",function(B){function J(){G(M,E,function(L){I(E);b.addComment(L,function(P){L.id=P;l.push(L);O(E)},function(P){F(E);J();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var M=b.newComment("",b.getCurrentUser()),E=c(M,l,null,0);J();B.preventDefault();mxEvent.consume(B)});C.appendChild(u)}u=t.cloneNode();u.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';u.setAttribute("title",mxResources.get("showResolved"));
+u.className="geAdaptiveAsset";var R=!1;mxEvent.addListener(u,"click",function(B){this.className=(R=!R)?"geButton geCheckedBtn":"geButton";q();B.preventDefault();mxEvent.consume(B)});C.appendChild(u);b.commentsRefreshNeeded()&&(u=t.cloneNode(),u.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',u.setAttribute("title",mxResources.get("refresh")),u.className="geAdaptiveAsset",mxEvent.addListener(u,"click",function(B){q();B.preventDefault();mxEvent.consume(B)}),C.appendChild(u));
+b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(B){x();B.preventDefault();mxEvent.consume(B)}),C.appendChild(t));n.appendChild(C);var l=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var B=p.div.querySelector(".geCommentEditTxtArea"),J=p.div.querySelector(".geCommentEditBtns");
+p.comment.content=B.value;B.parentNode.removeChild(B);J.parentNode.removeChild(J)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(M){function E(L){if(null!=L){L.sort(function(S,V){return new Date(S.modifiedDate)-new Date(V.modifiedDate)});for(var P=0;P<L.length;P++)E(L[P].replies)}}
+M.sort(function(L,P){return new Date(L.modifiedDate)-new Date(P.modifiedDate)});y.innerText="";y.appendChild(A);A.style.display="block";l=M;for(M=0;M<l.length;M++)E(l[M].replies),c(l[M],l,null,0,R);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(y.appendChild(p.div),G(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(M){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(M&&M.message?": "+M.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+q();this.refreshComments=q;C=mxUtils.bind(this,function(){function B(P){var S=M[P.id];if(null!=S)for(H(P,S),S=0;null!=P.replies&&S<P.replies.length;S++)B(P.replies[S])}if(this.window.isVisible()){for(var J=y.querySelectorAll(".geCommentDate"),M={},E=0;E<J.length;E++){var L=J[E];M[L.getAttribute("data-commentId")]=L}for(E=0;E<l.length;E++)B(l[E])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,f,k,d,v,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,d,v,x,D,G,H,I,F){var O=document.createElement("div");O.style.textAlign="center";F=null!=F?F:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=F+
+"px";c.style.lineHeight="1.2em";mxUtils.write(c,f);O.appendChild(c);null!=I&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",I),c.appendChild(f),O.appendChild(c));I=document.createElement("div");I.style.textAlign="center";I.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});x.className="geBtn";
+null!=G&&(x.innerHTML=G+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&I.appendChild(x);var g=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(e.checked)});I.appendChild(g);null!=D?(g.innerHTML=D+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+I.appendChild(x);O.appendChild(I);H?(I.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),c.appendChild(v),O.appendChild(c),mxEvent.addListener(v,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):I.style.marginTop="12px";this.init=function(){g.focus()};this.container=O};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");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,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,v){if(null!=f)for(var x=0;x<f.length;x++)null!=f[x]&&(b=this.patchPages(b,f[x],k,d,v));return b};
+EditorUi.prototype.patchPages=function(b,f,k,d,v){var x={},D=[],G={},H={},I={},F={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var O in d[EditorUi.DIFF_UPDATE])x[O]=d[EditorUi.DIFF_UPDATE][O];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)H[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)G[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(O in f[EditorUi.DIFF_UPDATE])d=
+f[EditorUi.DIFF_UPDATE][O],null!=d.previous&&(F[d.previous]=O);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();I[e]=b[d];null!=F[c]||H[e]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][e]&&null!=f[EditorUi.DIFF_UPDATE][e].previous||(F[c]=e);c=e}}var g={},p=mxUtils.bind(this,function(t){var y=null!=t?t.getId():"";if(null!=t&&!g[y]){g[y]=!0;D.push(t);var A=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=A&&(this.updatePageRoot(t),null!=A.name&&t.setName(A.name),
+null!=A.view&&this.patchViewState(t,A.view),null!=A.cells&&this.patchPage(t,A.cells,x[t.getId()],v),!k||null==A.cells&&null==A.view||(t.needsUpdate=!0))}t=F[y];null!=t&&(delete F[y],p(I[t]));t=G[y];null!=t&&(delete G[y],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var y=I[t.getId()];null==y?p(t):(this.patchPage(y,this.diffPages([y],[t]),x[y.getId()],v),k&&(y.needsUpdate=!0))});p();for(O in F)p(I[F[O]]),delete F[O];for(O in G)n(G[O]),
+delete G[O];return D};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
+EditorUi.prototype.createParentLookup=function(b,f){function k(I){var F=d[I];null==F&&(F={inserted:[],moved:{}},d[I]=F);return F}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var v=0;v<f[EditorUi.DIFF_INSERT].length;v++){var x=f[EditorUi.DIFF_INSERT][v],D=null!=x.parent?x.parent:"",G=null!=x.previous?x.previous:"";k(D).inserted[G]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][H],null!=x.previous&&(D=x.parent,null==D&&(v=b.getCell(H),null!=v&&(v=
+b.getParent(v),null!=v&&(D=v.getId()))),null!=D&&(k(D).moved[x.previous]=H));return d};
+EditorUi.prototype.patchPage=function(b,f,k,d){var v=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(v,f);v.beginUpdate();try{var D=v.updateEdgeParent,G=new mxDictionary,H=[];v.updateEdgeParent=function(n,t){!G.get(n)&&d&&(G.put(n,!0),H.push(n))};var I=x[""],F=null!=I&&null!=I.inserted?I.inserted[""]:null,O=null;null!=F&&(O=this.getCellForJson(F));if(null==O){var c=null!=I&&null!=I.moved?I.moved[""]:null;null!=c&&(O=v.getCell(c))}null!=O&&(v.setRoot(O),
+b.root=O);this.patchCellRecursive(b,v,v.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var e=0;e<f[EditorUi.DIFF_REMOVE].length;e++){var g=v.getCell(f[EditorUi.DIFF_REMOVE][e]);null!=g&&v.remove(g)}if(null!=f[EditorUi.DIFF_UPDATE]){var p=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(c in f[EditorUi.DIFF_UPDATE])this.patchCell(v,v.getCell(c),f[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(e=0;e<f[EditorUi.DIFF_INSERT].length;e++)F=f[EditorUi.DIFF_INSERT][e],
+g=v.getCell(F.id),null!=g&&(v.setTerminal(g,v.getCell(F.source),!0),v.setTerminal(g,v.getCell(F.target),!1));v.updateEdgeParent=D;if(d&&0<H.length)for(e=0;e<H.length;e++)v.contains(H[e])&&v.updateEdgeParent(H[e])}finally{v.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,k,d,v){if(null!=k){var x=d[k.getId()],D=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var G=0,H=f.getChildCount(k),I="",F=0;F<H;F++){var O=f.getChildAt(k,F).getId();null==x[I]&&(null==v[EditorUi.DIFF_UPDATE]||null==v[EditorUi.DIFF_UPDATE][O]||null==v[EditorUi.DIFF_UPDATE][O].previous&&null==v[EditorUi.DIFF_UPDATE][O].parent)&&(x[I]=O);I=O}H=mxUtils.bind(this,function(c,e){var g=null!=c?c.getId():"";null!=c&&e&&(e=
+f.getCell(g),null!=e&&e!=c&&(c=null));null!=c&&(f.getChildAt(k,G)!=c&&f.add(k,c,G),this.patchCellRecursive(b,f,c,d,v),G++);return g});for(I=[null];0<I.length;)if(F=I.shift(),F=H(null!=F?F.child:null,null!=F?F.insert:!1),O=x[F],null!=O&&(delete x[F],I.push({child:f.getCell(O)})),O=D[F],null!=O&&(delete D[F],I.push({child:this.getCellForJson(O),insert:!0})),0==I.length){for(F in x)I.push({child:f.getCell(x[F])}),delete x[F];for(F in D)I.push({child:this.getCellForJson(D[F]),insert:!0}),delete D[F]}}};
EditorUi.prototype.patchCell=function(b,f,k,d){if(null!=f&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
-1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var t in k)this.cellProperties[t]||(f[t]=k[t])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
-EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var t=b[k].node.cloneNode(!1);t.appendChild(d);f.appendChild(t)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var v in k)this.cellProperties[v]||(f[v]=k[v])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
+EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var v=b[k].node.cloneNode(!1);v.appendChild(d);f.appendChild(v)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);k.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),k.push(d));return k};
-EditorUi.prototype.diffPages=function(b,f){var k=[],d=[],t={},u={},C={},F=null;if(null!=b&&null!=f){for(var J=0;J<f.length;J++)u[f[J].getId()]={page:f[J],prev:F},F=f[J];F=null;for(J=0;J<b.length;J++){var c=b[J].getId();f=u[c];if(null==f)d.push(c);else{var e=this.diffPage(b[J],f.page),g={};mxUtils.isEmptyObject(e)||(g.cells=e);e=this.diffViewState(b[J],f.page);mxUtils.isEmptyObject(e)||(g.view=e);if((null!=f.prev?null==F:null!=F)||null!=F&&null!=f.prev&&F.getId()!=f.prev.getId())g.previous=null!=f.prev?
-f.prev.getId():"";null!=f.page.getName()&&b[J].getName()!=f.page.getName()&&(g.name=f.page.getName());mxUtils.isEmptyObject(g)||(C[c]=g)}delete u[b[J].getId()];F=b[J]}for(c in u)f=u[c],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(C)||(t[EditorUi.DIFF_UPDATE]=C);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k)}return t};
-EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var t=0;t<d;t++){var u=b.getChildAt(t);this.createCellLookup(u,f,k);f=u}return k};
-EditorUi.prototype.diffCellRecursive=function(b,f,k,d,t){d=null!=d?d:{};var u=k[b.getId()];delete k[b.getId()];if(null==u)t.push(b.getId());else{var C=this.diffCell(b,u.cell);if(null!=C.parent||(null!=u.prev?null==f:null!=f)||null!=f&&null!=u.prev&&f.getId()!=u.prev.getId())C.previous=null!=u.prev?u.prev.getId():"";mxUtils.isEmptyObject(C)||(d[b.getId()]=C)}u=b.getChildCount();f=null;for(C=0;C<u;C++){var F=b.getChildAt(C);this.diffCellRecursive(F,f,k,d,t);f=F}return d};
-EditorUi.prototype.diffPage=function(b,f){var k=[],d=[],t={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var u=this.diffCellRecursive(b.root,null,f,u,d),C;for(C in f)b=f[C],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(u)||(t[EditorUi.DIFF_UPDATE]=u);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k);return t};
-EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,d={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var t in this.viewStateProperties)this.diffViewStateProperty(b,k,t,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(d[k]=f)};
+EditorUi.prototype.diffPages=function(b,f){var k=[],d=[],v={},x={},D={},G=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)x[f[H].getId()]={page:f[H],prev:G},G=f[H];G=null;for(H=0;H<b.length;H++){var I=b[H].getId();f=x[I];if(null==f)d.push(I);else{var F=this.diffPage(b[H],f.page),O={};mxUtils.isEmptyObject(F)||(O.cells=F);F=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(F)||(O.view=F);if((null!=f.prev?null==G:null!=G)||null!=G&&null!=f.prev&&G.getId()!=f.prev.getId())O.previous=null!=f.prev?
+f.prev.getId():"";null!=f.page.getName()&&b[H].getName()!=f.page.getName()&&(O.name=f.page.getName());mxUtils.isEmptyObject(O)||(D[I]=O)}delete x[b[H].getId()];G=b[H]}for(I in x)f=x[I],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(D)||(v[EditorUi.DIFF_UPDATE]=D);0<d.length&&(v[EditorUi.DIFF_REMOVE]=d);0<k.length&&(v[EditorUi.DIFF_INSERT]=k)}return v};
+EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var v=0;v<d;v++){var x=b.getChildAt(v);this.createCellLookup(x,f,k);f=x}return k};
+EditorUi.prototype.diffCellRecursive=function(b,f,k,d,v){d=null!=d?d:{};var x=k[b.getId()];delete k[b.getId()];if(null==x)v.push(b.getId());else{var D=this.diffCell(b,x.cell);if(null!=D.parent||(null!=x.prev?null==f:null!=f)||null!=f&&null!=x.prev&&f.getId()!=x.prev.getId())D.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(D)||(d[b.getId()]=D)}x=b.getChildCount();f=null;for(D=0;D<x;D++){var G=b.getChildAt(D);this.diffCellRecursive(G,f,k,d,v);f=G}return d};
+EditorUi.prototype.diffPage=function(b,f){var k=[],d=[],v={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var x=this.diffCellRecursive(b.root,null,f,x,d),D;for(D in f)b=f[D],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(x)||(v[EditorUi.DIFF_UPDATE]=x);0<d.length&&(v[EditorUi.DIFF_REMOVE]=d);0<k.length&&(v[EditorUi.DIFF_INSERT]=k);return v};
+EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,d={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var v in this.viewStateProperties)this.diffViewStateProperty(b,k,v,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(d[k]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b};
EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
EditorUi.prototype.getJsonForCell=function(b,f){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=f&&(k.previous=f.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(k[d]=b[d]);return k};
-EditorUi.prototype.diffCell=function(b,f){function k(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
+EditorUi.prototype.diffCell=function(b,f){function k(D){return null!=D&&"object"===typeof D&&"number"===typeof D.nodeType&&"string"===typeof D.nodeName&&"function"===typeof D.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
-f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var t=this.codec.encode(f.geometry);null!=t&&(d.geometry=mxUtils.getXml(t))}for(var u in b)this.cellProperties[u]||"function"===typeof b[u]||"function"===typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);for(u in f)u in b||this.cellProperties[u]||"function"===typeof b[u]||"function"===
-typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);return d};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(t,u){return null==k||k[t]!=u?!0===u?1:u:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var v=this.codec.encode(f.geometry);null!=v&&(d.geometry=mxUtils.getXml(v))}for(var x in b)this.cellProperties[x]||"function"===typeof b[x]||"function"===typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);for(x in f)x in b||this.cellProperties[x]||"function"===typeof b[x]||"function"===
+typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);return d};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(v,x){return null==k||k[v]!=x?!0===x?1:x:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var f=mxSettings.getMainSettings();f.ui=b;"kennedy"==b&&(f.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
@@ -11981,8 +11985,8 @@ DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
-DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){t=this.file.getRealtimeState();var u=mxResources.get("disconnected");this.file.invalidChecksum?u=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?u=mxResources.get("offline"):1==t&&(u=mxResources.get("online"));
-this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(u))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign=
+DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(v){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){v=this.file.getRealtimeState();var x=mxResources.get("disconnected");this.file.invalidChecksum?x=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?x=mxResources.get("offline"):1==v&&(x=mxResources.get("online"));
+this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(x))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign=
"bottom";f.style.color="#666";f.style.top="6px";f.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";f.style.padding="2px";f.style.fontSize="8pt";f.style.verticalAlign="middle";f.style.textDecoration="none";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";f.style.backgroundSize="16px 16px";f.style.width="16px";f.style.height="16px";mxUtils.setOpacity(f,60);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
function(d){d.preventDefault()}));b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
this.file.isRealtimeSupported()&&(f=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=f&&null!=f.message?b+(" ("+f.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
@@ -12000,46 +12004,46 @@ DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
"changes",b,f?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(t,u){return t.id<u.id?-1:t.id>u.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(v,x){return v.id<x.id?-1:v.id>x.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
-DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(t){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var u=this.ui.getPagesForXml(t.data);d=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",t,"patches",d)}null!=b&&b()}catch(C){null!=f&&f(C)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(v){try{if(this.isValidState()&&
+!this.file.inConflictState&&this.file.isRealtime()){var x=this.ui.getPagesForXml(v.data);d=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",v,"patches",d)}null!=b&&b()}catch(D){null!=f&&f(D)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var t=f[EditorUi.DIFF_UPDATE][k];t.cells={};t.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
-DrawioFileSync.prototype.patchRealtime=function(b,f,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var t=this.extractRemove(this.extractLocal(d)),u=(null==k?b:b.concat(k)).concat([t]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,u,!0,f);mxUtils.isEmptyObject(t)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",d,"local",
-t,"applied",u)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var v=f[EditorUi.DIFF_UPDATE][k];v.cells={};v.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
+DrawioFileSync.prototype.patchRealtime=function(b,f,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var v=this.extractRemove(this.extractLocal(d)),x=(null==k?b:b.concat(k)).concat([v]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,f);mxUtils.isEmptyObject(v)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",d,"local",
+v,"applied",x)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,k)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,k,d,t,u){try{this.file.stats.merged++;this.lastModified=new Date;var C=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var F=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(F,this.ui.pages):null;var J=this.file.isRealtime()?this.ui.diffPages(F,this.file.ownPages):null;F=this.ui.applyPatches(F,b);var c=null==f?null:this.ui.getHashValueForPages(F);
-this.file.setShadowPages(F);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",J,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",C,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var e=this.ui.hashValue(C),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nCurrent: "+c,C,"merge",
-f,c,C);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(F)]);return}null==this.patchRealtime(b,null,J)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(q){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=t&&t(q);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(C),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),q);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,q)}}catch(z){}}};
-DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var t=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=k&&k()||(this.isValidState()?this.catchup(u,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=t};
+DrawioFileSync.prototype.merge=function(b,f,k,d,v,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null;var H=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var I=null==f?null:this.ui.getHashValueForPages(G);
+this.file.setShadowPages(G);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",H,"checksum",f,"current",I,"valid",f==I,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=I){var F=this.ui.hashValue(D),O=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(v,b,"From: "+O+"\nTo: "+F+"\nChecksum: "+f+"\nCurrent: "+I,D,"merge",
+f,I,D);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(G)]);return}null==this.patchRealtime(b,null,H)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=v&&v(g);try{if(this.file.errorReportsEnabled)O=this.ui.hashValue(this.file.getCurrentRevisionId()),F=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+O+"\nTo: "+F+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),g);else{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,g)}}catch(p){}}};
+DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var v=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=k&&k()||(this.isValidState()?this.catchup(x,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=v};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",u,"valid",this.isValidState());if(t==u)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var C=this.file.getDescriptorSecret(b);if(null==C||"1"==urlParams.lockdown)this.reload(f,k,d);else{var F=0,J=!1,c=mxUtils.bind(this,function(){if(null==
-d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(u)+(null!=C?"&secret="+encodeURIComponent(C):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(g);if(e&&
-(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var p=null,q=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[m],"status",m.getStatus(),"cacheReadyRetryCount",F,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var z=JSON.parse(m.getText());if(null!=z&&0<z.length)for(var y=0;y<z.length;y++){var A=this.stringToObject(z[y]);if(A.v>DrawioFileSync.PROTOCOL){J=!0;q=[];break}else if(A.v===
-DrawioFileSync.PROTOCOL&&null!=A.d)p=A.d.checksum,q.push(A.d.patch);else{J=!0;q=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",J,"temp",q,"checksum",p)}catch(x){q=[],null!=window.console&&"1"==urlParams.test&&console.log(x)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,p,b,f,k,d)):F<=this.maxCacheReadyRetries-1&&!J&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(F++,this.file.stats.cacheMiss++,window.setTimeout(c,(F+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(x){null!=k&&k(x)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(t){null!=f&&f(t)}),k,d)};
+DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var v=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",v,"to",x,"valid",this.isValidState());if(v==x)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var D=this.file.getDescriptorSecret(b);if(null==D||"1"==urlParams.lockdown)this.reload(f,k,d);else{var G=0,H=!1,I=mxUtils.bind(this,function(){if(null==
+d||!d())if(v!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var F=!0,O=window.setTimeout(mxUtils.bind(this,function(){F=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(v)+"&to="+encodeURIComponent(x)+(null!=D?"&secret="+encodeURIComponent(D):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;window.clearTimeout(O);if(F&&
+(null==d||!d()))if(v!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var e=null,g=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[c],"status",c.getStatus(),"cacheReadyRetryCount",G,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var p=JSON.parse(c.getText());if(null!=p&&0<p.length)for(var n=0;n<p.length;n++){var t=this.stringToObject(p[n]);if(t.v>DrawioFileSync.PROTOCOL){H=!0;g=[];break}else if(t.v===
+DrawioFileSync.PROTOCOL&&null!=t.d)e=t.d.checksum,g.push(t.d.patch);else{H=!0;g=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[p],"failed",H,"temp",g,"checksum",e)}catch(y){g=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<g.length?(this.file.stats.cacheHits++,this.merge(g,e,b,f,k,d)):G<=this.maxCacheReadyRetries-1&&!H&&401!=c.getStatus()&&503!=c.getStatus()&&410!=c.getStatus()?(G++,this.file.stats.cacheMiss++,window.setTimeout(I,(G+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(I,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(v){null!=f&&f(v)}),k,d)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,f,k){var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(u){window.clearTimeout(t);d&&(200<=u.getStatus()&&299>=u.getStatus()?f(u.getText()):k({code:u.getStatus(),message:"Token Error "+u.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(b,f,k){var d=!0,v=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(x){window.clearTimeout(v);d&&(200<=x.getStatus()&&299>=x.getStatus()?f(x.getText()):k({code:x.getStatus(),message:"Token Error "+x.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,k,d,t){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),C=this.file.getDescriptorSecret(this.file.getDescriptor()),F=this.file.getDescriptorRevisionId(f),J=this.file.getCurrentRevisionId();if(null==
-C||null==t||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(u),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",J,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var e=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:e}));this.file.stats.bytesSent+=g.length;
-this.file.stats.msgSent++;var m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(F)+"&to="+encodeURIComponent(J)+"&msg="+encodeURIComponent(u)+(null!=C?"&secret="+encodeURIComponent(C):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=t?"&token="+encodeURIComponent(t):
-""),mxUtils.bind(this,function(q){window.clearTimeout(p);m&&(200<=q.getStatus()&&299>=q.getStatus()?null!=k&&k():d({code:q.getStatus(),message:q.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",F,"to",J,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,f,k,d,v){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),D=this.file.getDescriptorSecret(this.file.getDescriptor()),G=this.file.getDescriptorRevisionId(f),H=this.file.getCurrentRevisionId();if(null==
+D||null==v||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(x),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag());else{var I=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var F=this.ui.getHashValueForPages(b),O=this.objectToString(this.createMessage({patch:I,checksum:F}));this.file.stats.bytesSent+=O.length;
+this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(H)+"&msg="+encodeURIComponent(x)+(null!=D?"&secret="+encodeURIComponent(D):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(O.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(O):"")+(null!=v?"&token="+encodeURIComponent(v):
+""),mxUtils.bind(this,function(g){window.clearTimeout(e);c&&(200<=g.getStatus()&&299>=g.getStatus()?null!=k&&k():d({code:g.getStatus(),message:g.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",I,O.length,"bytes","from",G,"to",H,"etag",this.file.getCurrentEtag(),"checksum",F)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.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,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
-"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var t={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
+"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var v={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"};
-d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(t.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(t)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
+d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(v.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(v)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.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(d,t,u){if("1"==urlParams.openInSameWin||navigator.standalone)u();else{var C=null;try{C=window.open(d)}catch(F){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,t,u)).container,320,140,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,v,x){if("1"==urlParams.openInSameWin||navigator.standalone)x();else{var D=null;try{D=window.open(d)}catch(G){}null==D||void 0===D?this.showDialog((new PopupDialog(this,d,v,x)).container,320,140,!0,!0):null!=v&&v()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
@@ -12053,43 +12057,43 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var d=0;d<k.length;d++)k[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
-App.main=function(b,f){function k(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(e){function g(){var y=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,f){function k(I){mxUtils.getAll("1"!=urlParams.dev?[I]:[I,STYLE_PATH+"/default.xml"],function(F){function O(){var n=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(y);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[y,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(e[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var m=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=m){EditorUi.debug("Setting configuration",JSON.stringify(m));if(null!=m.merge){var p=localStorage.getItem(Editor.configurationKey);if(null!=p)try{var q=JSON.parse(p),z;for(z in m.merge)q[z]=m.merge[z];m=q}catch(y){window.location.hash="",alert(y)}else m=m.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(m)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(y){window.location.hash=
-"",alert(y)}1<e.length&&(Graph.prototype.defaultThemes["default-style2"]=e[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=e[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g))},function(e){e=document.getElementById("geStatus");null!=e&&(e.innerHTML="Error loading page. <a>Please try refreshing.</a>",e.getElementsByTagName("a")[0].onclick=
-function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var c=parseInt(mxSettings.settings.autosaveDelay);!isNaN(c)&&0<c?(DrawioFile.prototype.autosaveDelay=c,EditorUi.debug("Setting autosaveDelay",
-c)):EditorUi.debug("Invalid autosaveDelay",c)}null!=mxSettings.settings.defaultEdgeLength&&(c=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(c)&&0<c?(Graph.prototype.defaultEdgeLength=c,EditorUi.debug("Using defaultEdgeLength",c)):EditorUi.debug("Invalid defaultEdgeLength",c))}}catch(g){null!=window.console&&console.error(g)}if(null!=Menus.prototype.defaultFonts)for(c=0;c<Menus.prototype.defaultFonts.length;c++){var e=Menus.prototype.defaultFonts[c];"string"!==typeof e&&null!=e.fontFamily&&
-null!=e.fontUrl&&Graph.addFont(e.fontFamily,e.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(c,e,g,m,p){EditorUi.logError("Global: "+(null!=c?c:""),e,g,m,p,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var t=
-document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var u=mxUtils.getTextContent(t[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
-CryptoJS.MD5(u).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=t&&1<t.length&&(u=mxUtils.getTextContent(t[t.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(u).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
-/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(c){null!=window.console&&console.error(c)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
-urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){t=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var C=JSON.parse(localStorage.getItem(mxSettings.key));null!=C&&(t=C.plugins)}catch(c){}C=urlParams.p;App.initPluginCallback();null!=C&&App.loadPlugins(C.split(";"));if(null!=
-t&&0<t.length&&"0"!=urlParams.plugins)for(C=0;C<t.length;C++)try{("/"==t[C].charAt(0)&&(t[C]=PLUGINS_BASE_PATH+t[C]),App.isSameDomain(t[C]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(t[C])?null==App.pluginsLoaded[t[C]]&&(App.pluginsLoaded[t[C]]=!0,App.embedModePluginsCount++,mxscript(t[C])):null!=window.console&&console.log("Unknown plugin:",t[C]):null!=window.console&&console.log("Blocked plugin:",t[C])}catch(c){}}"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 F=window.opener||window.parent,J=function(c){if(c.source==F)try{var e=JSON.parse(c.data);null!=e&&"configure"==
-e.action&&(mxEvent.removeListener(window,"message",J),Editor.configure(e.config),mxSettings.load(),e.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,c.data)}};mxEvent.addListener(window,"message",J);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
-mxSettings.load()}catch(c){null!=window.console&&console.error(c)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(C=localStorage.getItem(Editor.configurationKey),null!=C))try{C=JSON.parse(C),null!=C&&(EditorUi.debug("Using local configuration",C),Editor.configure(C),mxSettings.load())}catch(c){null!=window.console&&console.error(c)}}d()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(n);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[n,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(F[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=c){EditorUi.debug("Setting configuration",JSON.stringify(c));if(null!=c.merge){var e=localStorage.getItem(Editor.configurationKey);if(null!=e)try{var g=JSON.parse(e),p;for(p in c.merge)g[p]=c.merge[p];c=g}catch(n){window.location.hash="",alert(n)}else c=c.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(c)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(n){window.location.hash=
+"",alert(n)}1<F.length&&(Graph.prototype.defaultThemes["default-style2"]=F[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=F[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?O():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],O))},function(F){F=document.getElementById("geStatus");null!=F&&(F.innerHTML="Error loading page. <a>Please try refreshing.</a>",F.getElementsByTagName("a")[0].onclick=
+function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var I=parseInt(mxSettings.settings.autosaveDelay);!isNaN(I)&&0<I?(DrawioFile.prototype.autosaveDelay=I,EditorUi.debug("Setting autosaveDelay",
+I)):EditorUi.debug("Invalid autosaveDelay",I)}null!=mxSettings.settings.defaultEdgeLength&&(I=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(I)&&0<I?(Graph.prototype.defaultEdgeLength=I,EditorUi.debug("Using defaultEdgeLength",I)):EditorUi.debug("Invalid defaultEdgeLength",I))}}catch(O){null!=window.console&&console.error(O)}if(null!=Menus.prototype.defaultFonts)for(I=0;I<Menus.prototype.defaultFonts.length;I++){var F=Menus.prototype.defaultFonts[I];"string"!==typeof F&&null!=F.fontFamily&&
+null!=F.fontUrl&&Graph.addFont(F.fontFamily,F.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(I,F,O,c,e){EditorUi.logError("Global: "+(null!=I?I:""),F,O,c,e,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var v=
+document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var x=mxUtils.getTextContent(v[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
+CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=v&&1<v.length&&(x=mxUtils.getTextContent(v[v.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
+/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(I){null!=window.console&&console.error(I)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
+urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){v=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var D=JSON.parse(localStorage.getItem(mxSettings.key));null!=D&&(v=D.plugins)}catch(I){}D=urlParams.p;App.initPluginCallback();null!=D&&App.loadPlugins(D.split(";"));if(null!=
+v&&0<v.length&&"0"!=urlParams.plugins)for(D=0;D<v.length;D++)try{("/"==v[D].charAt(0)&&(v[D]=PLUGINS_BASE_PATH+v[D]),App.isSameDomain(v[D]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(v[D])?null==App.pluginsLoaded[v[D]]&&(App.pluginsLoaded[v[D]]=!0,App.embedModePluginsCount++,mxscript(v[D])):null!=window.console&&console.log("Unknown plugin:",v[D]):null!=window.console&&console.log("Blocked plugin:",v[D])}catch(I){}}"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 G=window.opener||window.parent,H=function(I){if(I.source==G)try{var F=JSON.parse(I.data);null!=F&&"configure"==
+F.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(F.config),mxSettings.load(),F.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(O){null!=window.console&&console.log("Error in configure message: "+O,I.data)}};mxEvent.addListener(window,"message",H);G.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+mxSettings.load()}catch(I){null!=window.console&&console.error(I)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(D=localStorage.getItem(Editor.configurationKey),null!=D))try{D=JSON.parse(D),null!=D&&(EditorUi.debug("Using local configuration",D),Editor.configure(D),mxSettings.load())}catch(I){null!=window.console&&console.error(I)}}d()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=";
App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC";
App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==";
App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=";
App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(t){null!=window.console&&console.log("Error loading plugin:",
-b[k],t)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(v){null!=window.console&&console.log("Error loading plugin:",
+b[k],v)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",
mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
-this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(u){null!=window.console&&console.error(u)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var u=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
-this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,u),window.DrawGapiClientCallback=null):u()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
-this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(u){null!=window.console&&console.error(u)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
-"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(u){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){u.prompt()})})),mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var u=this.getCurrentFile();u=null!=u?u.getMode():null;"1"==urlParams.extAuth||u!=App.MODE_DEVICE&&u!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
-"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var t=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var u=this.getCurrentFile();null!=u&&null!=u.sync&&(u.sync.destroy(),u.sync=null,u=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+u+'" class="geStatusAlert">'+u+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
-(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(u){window.clearTimeout(t)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
-"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)})),
+this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(x){null!=window.console&&console.error(x)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var x=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,x),window.DrawGapiClientCallback=null):x()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
+this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(x){null!=window.console&&console.error(x)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
+"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(x){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){x.prompt()})})),mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var x=this.getCurrentFile();x=null!=x?x.getMode():null;"1"==urlParams.extAuth||x!=App.MODE_DEVICE&&x!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
+"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var v=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var x=this.getCurrentFile();null!=x&&null!=x.sync&&(x.sync.destroy(),x.sync=null,x=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
+(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(x){window.clearTimeout(v)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
+"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(x){this.appIconClicked(x)})),
this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};
App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var f={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
@@ -12102,31 +12106,31 @@ App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBann
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img");
k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","1 star");k.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(k);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(d);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","3 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(t);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","4 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(u);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(F){mxEvent.consume(F);C()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(d);var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.setAttribute("title","3 star");v.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");v.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(v);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","4 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(x);this.bannerShowing=!0;var D=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);D()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);D()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(G){mxEvent.consume(G);D()}));mxEvent.addListener(v,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);D()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");D()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),d=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var u=t.getText();if(0<u.length){var C=JSON.parse(u);null!=C&&this.handleLicense(C,
-d)}}}catch(F){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),d=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(v){try{if(200<=v.getStatus()&&299>=v.getStatus()){var x=v.getText();if(0<x.length){var D=JSON.parse(x);null!=D&&this.handleLicense(D,
+d)}}}catch(G){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var k=0;k<f.length;k++)f[k].id==b.id&&f.splice(k,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(v){window.clearTimeout(t);d&&f(v)});null==this.thumbImageCache&&(this.thumbImageCache={});var C=this.editor.graph,F=C.backgroundImage,J=null!=C.themes&&"darkTheme"==C.defaultThemeName;if(null!=this.pages&&(J||this.currentPage!=this.pages[0])){var c=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var e=this.pages[0];this.currentPage==e?C.setBackgroundImage(F):null!=e.viewState&&null!=e.viewState&&(F=e.viewState.backgroundImage,C.setBackgroundImage(F));C.getGlobalVariable=function(v){return"page"==v?e.getName():"pagenumber"==v?1:c.apply(this,arguments)};C.getGlobalVariable=c;document.body.appendChild(C.container);C.model.setRoot(e.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(v){try{C!=this.editor.graph&&
-null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(D){v=null}u(v)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,C,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),m=C.getGraphBounds(),p=C.view.translate,q=C.view.scale;null!=F&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle((p.x+F.x)*q,(p.y+F.y)*q,F.width*q,F.height*q)));var z=b/m.width;
-z=Math.min(1,Math.min(3*b/(4*m.height),z));var y=Math.floor(m.x),A=Math.floor(m.y);g.setAttribute("width",Math.ceil(z*(m.width+4)));g.setAttribute("height",Math.ceil(z*(m.height+4)));var x=g.getContext("2d");x.scale(z,z);x.translate(-y,-A);var I=C.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";x.save();x.fillStyle=I;x.fillRect(y,A,Math.ceil(m.width+4),Math.ceil(m.height+4));x.restore();if(null!=F){var M=new Image;M.src=F.src;x.drawImage(M,F.x*z,F.y*z,F.width*z,F.height*z)}var E=new mxJsCanvas(g),
-Q=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var n=new mxImageExport;n.drawShape=function(v,D){v.shape instanceof mxShape&&v.shape.checkBounds()&&(D.save(),D.translate(.5,.5),v.shape.paint(D),D.translate(-.5,-.5),D.restore())};n.drawText=function(v,D){};n.drawState(C.getView().getState(C.model.root),Q);Q.finish(mxUtils.bind(this,function(){try{n.drawState(C.getView().getState(C.model.root),E),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(v){g=
-null}u(g)}));k=!0}}catch(v){k=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}k||window.clearTimeout(t);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,v=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),x=mxUtils.bind(this,function(q){window.clearTimeout(v);d&&f(q)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,G=D.backgroundImage,H=null!=D.themes&&"darkTheme"==D.defaultThemeName;if(null!=this.pages&&(H||this.currentPage!=this.pages[0])){var I=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var F=this.pages[0];this.currentPage==F?D.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,D.setBackgroundImage(G));D.getGlobalVariable=function(q){return"page"==q?F.getName():"pagenumber"==q?1:I.apply(this,arguments)};D.getGlobalVariable=I;document.body.appendChild(D.container);D.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(q){try{D!=this.editor.graph&&
+null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(B){q=null}x(q)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var O=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,g=D.view.scale;null!=G&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+G.x)*g,(e.y+G.y)*g,G.width*g,G.height*g)));var p=b/c.width;
+p=Math.min(1,Math.min(3*b/(4*c.height),p));var n=Math.floor(c.x),t=Math.floor(c.y);O.setAttribute("width",Math.ceil(p*(c.width+4)));O.setAttribute("height",Math.ceil(p*(c.height+4)));var y=O.getContext("2d");y.scale(p,p);y.translate(-n,-t);var A=D.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";y.save();y.fillStyle=A;y.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));y.restore();if(null!=G){var C=new Image;C.src=G.src;y.drawImage(C,G.x*p,G.y*p,G.width*p,G.height*p)}var u=new mxJsCanvas(O),
+R=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var l=new mxImageExport;l.drawShape=function(q,B){q.shape instanceof mxShape&&q.shape.checkBounds()&&(B.save(),B.translate(.5,.5),q.shape.paint(B),B.translate(-.5,-.5),B.restore())};l.drawText=function(q,B){};l.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{l.drawState(D.getView().getState(D.model.root),u),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(q){O=
+null}x(O)}));k=!0}}catch(q){k=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}k||window.clearTimeout(v);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(u){}}})();
+this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var v=new Date;v.setYear(v.getFullYear()+1);document.cookie="MODE="+f+"; expires="+v.toUTCString()}}catch(x){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),k=null!=f?f.getMode():null;k==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?null!=
f&&null!=f.meta&&null!=f.meta.webUrl?(k=f.meta.webUrl,f=encodeURIComponent(f.meta.name),k.substring(k.length-f.length,k.length)==f&&(k=k.substring(0,k.length-f.length)),this.openLink(k)):this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?null!=f&&null!=f.stat&&null!=f.stat.path_display?(k="https://www.dropbox.com/home/Apps/drawio"+f.stat.path_display,mxEvent.isShiftDown(b)||(k=k.substring(0,k.length-f.stat.name.length)),this.openLink(k)):this.openLink("https://www.dropbox.com/"):k==App.MODE_TRELLO?
this.openLink("https://trello.com/"):k==App.MODE_GITHUB?null!=f&&f.constructor==GitHubFile?this.openLink(f.meta.html_url):this.openLink("https://github.com/"):k==App.MODE_GITLAB?null!=f&&f.constructor==GitLabFile?this.openLink(f.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var f=b.indexOf("#");0<f&&(b=b.substring(0,f))}return b};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,t){this.spinner.stop();null==d&&(d=urlParams.title,t=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,t))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,v){this.spinner.stop();null==d&&(d=urlParams.title,v=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,v))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
@@ -12134,355 +12138,354 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(u,C,F,J,c){"ResizeObserver loop limit exceeded"!=u&&(EditorUi.logError("Uncaught: "+(null!=u?u:""),C,F,J,c,null,!0),b.handleError({message:u},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(u){var C=this.getCurrentFile();EditorUi.debug("storage event",[u],[C]);null!=C&&".draft-alive-check"==u.key&&null!=u.newValue&&null!=C.draftId&&(this.draftAliveCheck=u.newValue,C.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(u){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(u){try{this.hideDialog();
-var C=this.getDiagramId(),F=this.getCurrentFile();null!=F&&F.getHash()==C||this.loadFile(C,!0)}catch(J){null!=document.body&&this.handleError(J,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,
-mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=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 u=mxUtils.bind(this,function(J){Editor.isPngDataUrl(J)&&(J=Editor.extractGraphModelFromPng(J));var c=urlParams.title;c=null!=c?decodeURIComponent(c):
-this.defaultFilename;J=new LocalFile(this,J,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(J.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(J);this.getCurrentFile().setModified(!this.editor.chromeless)}),C=window.opener||window.parent;if(C!=window){var F=urlParams.create;null!=F?u(C[decodeURIComponent(F)]):(F=urlParams.data,null!=F?u(decodeURIComponent(F)):this.installMessageHandler(mxUtils.bind(this,function(J,c){c.source==C&&u(J)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(J){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,
-function(){var J=decodeURIComponent(urlParams.viewbox||"");if(""!=J)try{var c=JSON.parse(J);this.editor.graph.fitWindow(c,c.border)}catch(e){console.error(e)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.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"]))}),t=mxUtils.bind(this,function(u){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,u,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;u=this.getServiceCount(!0);isLocalStorage&&u++;var F=4>=
-u?2:6<u?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(J,c){if(null==c){this.hideDialog();var e=Editor.useLocalStorage;this.createFile(0<J.length?J:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=e}else this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(J,this.getFileData(!0),null,c,null,!0,g)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,u>F?
-390:280,!0,!1,mxUtils.bind(this,function(J){J&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?t(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(u){t(u)},mxUtils.bind(this,function(u){this.handleError(u,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!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
-f())}}catch(u){this.handleError(u)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,k){function d(){k(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(u){EditorUi.debug("App.filterDrafts",[this],"items",u);for(var C=0;C<u.length;C++)try{var F=u[C].key;if(null!=F&&".draft_"==F.substring(0,7)){var J=JSON.parse(u[C].data);null!=J&&"draft"==J.type&&J.aliveCheck!=f&&(null==b&&null==J.fileObject||null!=J.fileObject&&J.fileObject.path==b)&&(J.key=F,t.push(J))}}catch(c){}d()},d))}catch(u){d()}};
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(x,D,G,H,I){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),D,G,H,I,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(x){var D=this.getCurrentFile();EditorUi.debug("storage event",[x],[D]);null!=D&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=D.draftId&&(this.draftAliveCheck=x.newValue,D.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(x){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{this.hideDialog();
+var D=this.getDiagramId(),G=this.getCurrentFile();null!=G&&G.getHash()==D||this.loadFile(D,!0)}catch(H){null!=document.body&&this.handleError(H,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var I=this.getCurrentFile();window.location.hash=null!=I?I.getHash():""}))}}))}"1"==urlParams["live-ui"]&&"sketch"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("sketch",0));if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),
+null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=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 x=mxUtils.bind(this,
+function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var I=urlParams.title;I=null!=I?decodeURIComponent(I):this.defaultFilename;H=new LocalFile(this,H,I,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.getCurrentFile().setModified(!this.editor.chromeless)}),D=window.opener||window.parent;if(D!=window){var G=urlParams.create;null!=G?x(D[decodeURIComponent(G)]):(G=
+urlParams.data,null!=G?x(decodeURIComponent(G)):this.installMessageHandler(mxUtils.bind(this,function(H,I){I.source==D&&x(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)G=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=G;else{G=!1;try{G=null!=window.opener&&null!=window.opener.openFile}catch(H){}G?this.spinner.spin(document.body,mxResources.get("loading")):(G=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||
+"draw.io"!=this.getServiceName()||null!=G&&0!=G.length||this.editor.isChromelessView()?null!=G&&0<G.length?this.loadFile(G,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var I=JSON.parse(H);this.editor.graph.fitWindow(I,I.border)}catch(F){console.error(F)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),
+k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.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"]))}),v=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,x,null));this.editor.graph.setEnabled(!1);
+this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var G=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(H,I){if(null==I){this.hideDialog();var F=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=F}else this.pickFolder(I,mxUtils.bind(this,function(O){this.createFile(H,this.getFileData(!0),null,
+I,null,!0,O)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,G,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,x>G?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?v(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(x){v(x)},mxUtils.bind(this,function(x){this.handleError(x,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!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):
+(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&
+(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(x){this.handleError(x)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,f,k){function d(){k(v)}var v=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var D=0;D<x.length;D++)try{var G=x[D].key;if(null!=G&&".draft_"==G.substring(0,7)){var H=JSON.parse(x[D].data);null!=H&&"draft"==H.type&&H.aliveCheck!=f&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=G,v.push(H))}}catch(I){}d()},d))}catch(x){d()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,t){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=t&&t()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container,
+[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,v){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=v&&v()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container,
640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var t=new SplashDialog(this);this.showDialog(t.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(u){u&&!mxClient.IS_CHROMEAPP&&(u=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=u)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var v=new SplashDialog(this);this.showDialog(v.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x){x&&!mxClient.IS_CHROMEAPP&&(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};
App.prototype.addLanguageMenu=function(b,f,k){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor=
-"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){this.editor.graph.popupMenuHandler.hideMenu();
-var u=new mxPopupMenu(this.menus.get("language").funct);u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var C=mxUtils.getOffset(d);u.popup(C.x,C.y+d.offsetHeight,null,t);this.setCurrentMenu(u)})),b.appendChild(d));return d};
-App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(u){try{if(null!=f){var C=u.target.result;"image/png"==d.type&&(C=this.extractGraphModelFromPng(C));f(new LocalFile(this,C,d.name,null,b,d))}else this.openFileHandle(u.target.result,d.name,d,!1,b)}catch(F){k(F)}});t.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
-"image/svg"===d.type.substring(0,9)?t.readAsText(d):t.readAsDataURL(d)}),k)}catch(d){k(d)}};
-App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var t={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};t.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,
-t):this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,t):f.push(t)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(t){b(d,t)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
-mxUtils.bind(this,function(C){"AbortError"!=C.name&&this.handleError(C)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(C,F){StorageFile.listFiles(this,"F",C,F)});window.openBrowserFile=mxUtils.bind(this,function(C,F,J){StorageFile.getFileContent(this,C,F,J)});window.deleteBrowserFile=mxUtils.bind(this,function(C,F,J){StorageFile.deleteFile(this,C,F,J)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(C,F){var J=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=F.substring(F.length-4)||(F=F.substring(0,F.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,F):new LocalFile(this,C,F))}),c=this.getCurrentFile();null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J()}));var t=this.dialog,u=t.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
-d;u.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(t,u){if(null!=u)try{this.loadLibrary(u)}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&f.getLibrary(t,mxUtils.bind(this,function(C){this.spinner.stop();try{this.loadLibrary(C)}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
-k.files){for(var t=0;t<k.files.length;t++)mxUtils.bind(this,function(u){var C=new FileReader;C.onload=mxUtils.bind(this,function(F){try{this.loadLibrary(new LocalLibrary(this,F.target.result,u.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}});C.readAsText(u)})(k.files[t]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(t,u){StorageFile.listFiles(this,"L",t,u)});window.openBrowserFile=mxUtils.bind(this,function(t,u,C){StorageFile.getFileContent(this,t,u,C)});window.deleteBrowserFile=mxUtils.bind(this,function(t,u,C){StorageFile.deleteFile(this,t,u,C)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(t){this.hideDialog(t)}));window.openFile.setConsumer(mxUtils.bind(this,function(t,u){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,t,u):new LocalLibrary(this,t,u))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,k,d,t,u,C){try{d=null!=d?d:this.mode;t=null!=t?t:!1;u=null!=u?u:!1;var F=this.createLibraryDataFromImages(f),J=mxUtils.bind(this,function(g){this.spinner.stop();null!=C&&C();this.handleError(g,null!=g?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,F,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(g){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,F,g,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_BROWSER?(g=mxUtils.bind(this,function(){var m=new StorageLibrary(this,F,b);m.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(m,f)}),J)}),null==localStorage.getItem(b)?
-g():this.confirm(mxResources.get("replaceIt",[b]),g)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(F);var c=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);u||this.libraryLoaded(k,f);null!=C&&C()}),J)});if(b!=k.getTitle()){var e=k.getHash();k.rename(b,mxUtils.bind(this,function(g){k.constructor!=LocalLibrary&&e!=k.getHash()&&
-(mxSettings.removeCustomLibrary(e),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(e);c()}),J)}else c()}}catch(g){this.handleError(g)}};
+"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(v){this.editor.graph.popupMenuHandler.hideMenu();
+var x=new mxPopupMenu(this.menus.get("language").funct);x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var D=mxUtils.getOffset(d);x.popup(D.x,D.y+d.offsetHeight,null,v);this.setCurrentMenu(x)})),b.appendChild(d));return d};
+App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var v=new FileReader;v.onload=mxUtils.bind(this,function(x){try{if(null!=f){var D=x.target.result;"image/png"==d.type&&(D=this.extractGraphModelFromPng(D));f(new LocalFile(this,D,d.name,null,b,d))}else this.openFileHandle(x.target.result,d.name,d,!1,b)}catch(G){k(G)}});v.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
+"image/svg"===d.type.substring(0,9)?v.readAsText(d):v.readAsDataURL(d)}),k)}catch(d){k(d)}};
+App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var v={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};v.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,
+v):this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,v):f.push(v)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(v){b(d,v)}),f)}),f)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(D){null!=D&&0<D.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(D[0])}),
+mxUtils.bind(this,function(D){"AbortError"!=D.name&&this.handleError(D)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(D,G){StorageFile.listFiles(this,"F",D,G)});window.openBrowserFile=mxUtils.bind(this,function(D,G,H){StorageFile.getFileContent(this,D,G,H)});window.deleteBrowserFile=mxUtils.bind(this,function(D,G,H){StorageFile.deleteFile(this,D,G,H)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(D,G){var H=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=G.substring(G.length-4)||(G=G.substring(0,G.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,D,G):new LocalFile(this,D,G))}),I=this.getCurrentFile();null!=I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()}));var v=this.dialog,x=v.close;this.dialog.close=mxUtils.bind(this,function(D){Editor.useLocalStorage=
+d;x.apply(v,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(D){this.handleError(D)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(v,x){if(null!=x)try{this.loadLibrary(x)}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&f.getLibrary(v,mxUtils.bind(this,function(D){this.spinner.stop();try{this.loadLibrary(D)}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(D){this.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
+k.files){for(var v=0;v<k.files.length;v++)mxUtils.bind(this,function(x){var D=new FileReader;D.onload=mxUtils.bind(this,function(G){try{this.loadLibrary(new LocalLibrary(this,G.target.result,x.name))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}});D.readAsText(x)})(k.files[v]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,"L",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,D){StorageFile.getFileContent(this,v,x,D)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,D){StorageFile.deleteFile(this,v,x,D)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,v,x):new LocalLibrary(this,v,x))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,f,k,d,v,x,D){try{d=null!=d?d:this.mode;v=null!=v?v:!1;x=null!=x?x:!1;var G=this.createLibraryDataFromImages(f),H=mxUtils.bind(this,function(O){this.spinner.stop();null!=D&&D();this.handleError(O,null!=O?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,G,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(O){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,G,O,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_BROWSER?(O=mxUtils.bind(this,function(){var c=new StorageLibrary(this,G,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,f)}),H)}),null==localStorage.getItem(b)?
+O():this.confirm(mxResources.get("replaceIt",[b]),O)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(v||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(G);var I=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(O){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(k,f);null!=D&&D()}),H)});if(b!=k.getTitle()){var F=k.getHash();k.rename(b,mxUtils.bind(this,function(O){k.constructor!=LocalLibrary&&F!=k.getHash()&&
+(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(F);I()}),H)}else I()}}catch(O){this.handleError(O)}};
App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(J,c){k.invalidFileHandle=null;k.fileHandle=J;k.title=c.name;k.desc=c;this.save(c.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var t=null!=k.getTitle()?k.getTitle():this.defaultFilename,u=!mxClient.IS_IOS||!navigator.standalone,C=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var F=4>=b?2:6<b?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(J,c,e){null!=J&&0<J.length&&(/(\.pdf)$/i.test(J)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){e.value=J.split(".").slice(0,-1).join(".");e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==C&&c==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,m){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=m.name;
-k.desc=m;this.setMode(App.MODE_DEVICE);this.save(m.name,d)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(J)):(this.setMode(App.MODE_DEVICE),this.save(J,d)):"download"==c?(new LocalFile(this,null,J)).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)):C!=c?this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(J,
-this.getFileData(/(\.xml)$/i.test(J)||0>J.indexOf(".")||/(\.drawio)$/i.test(J),/(\.svg)$/i.test(J),/(\.html)$/i.test(J)),null,c,d,null==this.mode,g)})):null!=c&&this.save(J,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,u,null,!0,F,null,null,null,this.editor.fileExtensions,!1);this.showDialog(t.container,420,b>F?390:280,!0,!0);t.init()}else this.save(k.getTitle(),d)}};
-App.prototype.loadTemplate=function(b,f,k,d,t){var u=!1,C=b,F=null!=d?d:b,J=/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F);d=/\.png$/i.test(F)||/\.pdf$/i.test(F);this.editor.isCorsEnabledForUrl(C)||(u=d||J,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(u?"&base64=1":""));this.editor.loadUrl(C,mxUtils.bind(this,function(c){try{var e=u?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c;if(J||this.isVisioData(e))J||(F=t?this.isRemoteVisioData(e)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(e)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(g){f(g)},k,F);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,F))this.isExternalDataComms()?this.parseFileData(e,mxUtils.bind(this,function(g){4==g.readyState&&200<=g.status&&299>=g.status&&"<mxGraphModel"==g.responseText.substring(0,13)&&f(g.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
-else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(g){f(g)}),mxUtils.bind(this,function(g){k(g)}));else{if(/(\.png)($|\?)/i.test(F)||Editor.isPngData(e))e=Editor.extractGraphModelFromPng(c);f(e)}}catch(g){k(g)}}),k,/(\.png)($|\?)/i.test(F)||/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F),null,null,u)};
+function(H,I){k.invalidFileHandle=null;k.fileHandle=H;k.title=I.name;k.desc=I;this.save(I.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var v=null!=k.getTitle()?k.getTitle():this.defaultFilename,x=!mxClient.IS_IOS||!navigator.standalone,D=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var G=4>=b?2:6<b?4:3;v=new CreateDialog(this,v,mxUtils.bind(this,function(H,I,F){null!=H&&0<H.length&&(/(\.pdf)$/i.test(H)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){F.value=H.split(".").slice(0,-1).join(".");F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==D&&I==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(O,c){k.fileHandle=O;k.mode=App.MODE_DEVICE;k.title=c.name;
+k.desc=c;this.setMode(App.MODE_DEVICE);this.save(c.name,d)}),mxUtils.bind(this,function(O){"AbortError"!=O.name&&this.handleError(O)}),this.createFileSystemOptions(H)):(this.setMode(App.MODE_DEVICE),this.save(H,d)):"download"==I?(new LocalFile(this,null,H)).save():"_blank"==I?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):D!=I?this.pickFolder(I,mxUtils.bind(this,function(O){this.createFile(H,
+this.getFileData(/(\.xml)$/i.test(H)||0>H.indexOf(".")||/(\.drawio)$/i.test(H),/(\.svg)$/i.test(H),/(\.html)$/i.test(H)),null,I,d,null==this.mode,O)})):null!=I&&this.save(H,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,x,null,!0,G,null,null,null,this.editor.fileExtensions,!1);this.showDialog(v.container,420,b>G?390:280,!0,!0);v.init()}else this.save(k.getTitle(),d)}};
+App.prototype.loadTemplate=function(b,f,k,d,v){var x=!1,D=b,G=null!=d?d:b,H=/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G);d=/\.png$/i.test(G)||/\.pdf$/i.test(G);this.editor.isCorsEnabledForUrl(D)||(x=d||H,D="t="+(new Date).getTime(),D=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+D+(x?"&base64=1":""));this.editor.loadUrl(D,mxUtils.bind(this,function(I){try{var F=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(I):atob(I):I;if(H||this.isVisioData(F))H||(G=v?this.isRemoteVisioData(F)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(F)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(O){f(O)},k,G);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,G))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&"<mxGraphModel"==O.responseText.substring(0,13)&&f(O.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
+else if(this.isLucidChartData(F))this.convertLucidChart(F,mxUtils.bind(this,function(O){f(O)}),mxUtils.bind(this,function(O){k(O)}));else{if(/(\.png)($|\?)/i.test(G)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(I);f(F)}}catch(O){k(O)}}),k,/(\.png)($|\?)/i.test(G)||/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G),null,null,x)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,f,k,d,t,u,C,F,J){d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var c=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(g){c();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),
-this.drive.insertFile(b,f,C,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,
-!1,C):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(c(),this.showSaveFilePicker(mxUtils.bind(this,
-function(g,m){var p=new LocalFile(this,f,m.name,null,g,m);p.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,k,u,t,J)}),e,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&e(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==d),k,u,t,J))}catch(g){c(),this.handleError(g)}}};
-App.prototype.fileCreated=function(b,f,k,d,t){var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=t&&0<t.length&&(u+="?clibs="+t);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var F=window.location.protocol+"//"+window.location.hostname+u,J=C,c=null;null!=C&&/\.svg$/i.test(b.getTitle())&&
-(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),J=this.decodeNodeIntoGraph(J,c));b.setData(this.createFileData(C,c,b,F));null!=c&&c.container.parentNode.removeChild(c.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){e();var m=this.getCurrentFile();null==k&&null!=m&&(k=!m.isModified()&&null==m.getMode());var p=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var z=[],y=t.split(";"),A=0;A<y.length;A++)z.push(decodeURIComponent(y[A]));this.loadLibraries(z)}}),q=mxUtils.bind(this,function(){k||null==m||!m.isModified()?p():this.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?q():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=d&&d(),window.openWindow(u,null,q))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(m){e();null!=m&&"AbortError"==m.name||this.handleError(m)}))}};
-App.prototype.loadFile=function(b,f,k,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var u=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var J=mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();
-window.location.hash=null!=q?q.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(p){null!=p?(this.fileLoaded(new StorageFile(this,p,b)),null!=d&&d()):J({message:mxResources.get("fileNotFound")})}),J)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=p?p.getHash():""}));else if(null!=k)this.spinner.stop(),
-this.fileLoaded(k),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(p,q){this.spinner.stop();this.fileLoaded(new EmbedFile(this,p,q));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var e=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var p=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var q=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+q,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
-!this.editor.editable&&(z.getHash=function(){return"G"+q},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!p()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",p);return!0});this.loadTemplate(e,mxUtils.bind(this,function(p){this.spinner.stop();if(null!=p&&0<p.length){var q=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=e,y=e.lastIndexOf("."),A=z.lastIndexOf("/");y>A&&0<A&&(z=z.substring(A+1,y),y=e.substring(y),
-this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(q=z+y)}p=new LocalFile(this,p,null!=urlParams.title?decodeURIComponent(urlParams.title):q,!0);p.getHash=function(){return b};this.fileLoaded(p,!0)?null!=d&&d():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
-function(){g()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(c=null,"G"==b.charAt(0)?c=this.drive:"D"==b.charAt(0)?c=this.dropbox:"W"==b.charAt(0)?c=this.oneDrive:"H"==b.charAt(0)?c=this.gitHub:"A"==b.charAt(0)?c=this.gitLab:"T"==b.charAt(0)&&(c=this.trello),null==c)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=p?p.getHash():""}));else{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var q=this.getCurrentFile();null==q?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(q.getHash=function(){return m+b},window.location.hash="#"+q.getHash()):p==q&&null==p.getMode()&&
-(p=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+p+'" class="geStatusAlert">'+p+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var q=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,null!=p?mxResources.get("errorLoadingFile"):null,q,null,null,"#"+m+b):q()}))}}),
-C=this.getCurrentFile(),F=mxUtils.bind(this,function(){t||null==C||!C.isModified()?u():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),u,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?F():null==C||f?F():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,F)).container,320,140,!0,!0)};
+App.prototype.createFile=function(b,f,k,d,v,x,D,G,H){d=G?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var I=mxUtils.bind(this,function(){this.spinner.stop()}),F=mxUtils.bind(this,function(O){I();null==O&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=O&&this.handleError(O)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==D&&null!=this.stateArg&&null!=this.stateArg.folderId&&(D=this.stateArg.folderId),
+this.drive.insertFile(b,f,D,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F,!1,D):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F,!1,D):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F,
+!1,D):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F,!1,D):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,v,H)}),F):!G&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(I(),this.showSaveFilePicker(mxUtils.bind(this,
+function(O,c){var e=new LocalFile(this,f,c.name,null,O,c);e.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,k,x,v,H)}),F,!0)}),mxUtils.bind(this,function(O){"AbortError"!=O.name&&F(O)}),this.createFileSystemOptions(b))):(I(),this.fileCreated(new LocalFile(this,f,b,null==d),k,x,v,H))}catch(O){I(),this.handleError(O)}}};
+App.prototype.fileCreated=function(b,f,k,d,v){var x=window.location.pathname;null!=f&&0<f.length&&(x+="?libs="+f);null!=v&&0<v.length&&(x+="?clibs="+v);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var G=window.location.protocol+"//"+window.location.hostname+x,H=D,I=null;null!=D&&/\.svg$/i.test(b.getTitle())&&
+(I=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(I.container),H=this.decodeNodeIntoGraph(H,I));b.setData(this.createFileData(D,I,b,G));null!=I&&I.container.parentNode.removeChild(I.container);var F=mxUtils.bind(this,function(){this.spinner.stop()}),O=mxUtils.bind(this,function(){F();var c=this.getCurrentFile();null==k&&null!=c&&(k=!c.isModified()&&null==c.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
+null!=f&&this.sidebar.showEntries(f);if(null!=v){for(var p=[],n=v.split(";"),t=0;t<n.length;t++)p.push(decodeURIComponent(n[t]));this.loadLibraries(p)}}),g=mxUtils.bind(this,function(){k||null==c||!c.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?g():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=d&&d(),window.openWindow(x,null,g))});b.constructor==LocalFile?O():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){O()}),mxUtils.bind(this,function(c){F();null!=c&&"AbortError"==c.name||this.handleError(c)}))}};
+App.prototype.loadFile=function(b,f,k,d,v){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var H=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();
+window.location.hash=null!=g?g.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=k)this.spinner.stop(),
+this.fileLoaded(k),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var I=decodeURIComponent(b.substring(1));"<"!=I.charAt(0)&&(I=Graph.decompress(I));I=new LocalFile(this,I,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);I.getHash=function(){return b};this.fileLoaded(I);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,g){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,g));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),O=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var g=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+g,f,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&
+!this.editor.editable&&(p.getHash=function(){return"G"+g},window.location.hash="#"+p.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(F,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var g=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var p=F,n=F.lastIndexOf("."),t=p.lastIndexOf("/");n>t&&0<t&&(p=p.substring(t+1,n),n=F.substring(n),
+this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(g=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):g,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+function(){O()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(I=null,"G"==b.charAt(0)?I=this.drive:"D"==b.charAt(0)?I=this.dropbox:"W"==b.charAt(0)?I=this.oneDrive:"H"==b.charAt(0)?I=this.gitHub:"A"==b.charAt(0)?I=this.gitLab:"T"==b.charAt(0)&&(I=this.trello),null==I)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else{var c=b.charAt(0);b=decodeURIComponent(b.substring(1));I.getFile(b,mxUtils.bind(this,function(e){this.spinner.stop();this.fileLoaded(e);var g=this.getCurrentFile();null==g?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(g.getHash=function(){return c+b},window.location.hash="#"+g.getHash()):e==g&&null==e.getMode()&&
+(e=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(e){null!=window.console&&null!=e&&console.log("error in loadFile:",b,e);var g=mxUtils.bind(this,function(){var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):window.location.hash="#"+p.getHash()});null==e||"AbortError"!=e.name?this.handleError(e,null!=e?mxResources.get("errorLoadingFile"):null,g,null,null,"#"+c+b):g()}))}}),
+D=this.getCurrentFile(),G=mxUtils.bind(this,function(){v||null==D||!D.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=D&&(window.location.hash=D.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?G():null==D||f?G():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,G)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(f,k[d])&&f.push(k[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,e){e||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),d=0,t=[],u=0<b.length&&"L.scratchpad"==b[0]?1:0,C=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=t[c]&&this.loadLibrary(t[c],c<=u);null!=f&&f()}});if(null!=b)for(var F=0;F<b.length;F++){var J=encodeURIComponent(decodeURIComponent(b[F]));
-mxUtils.bind(this,function(c,e){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;d++;var g=mxUtils.bind(this,function(A){t[e]=A;d--;C()}),m=mxUtils.bind(this,function(A){k(c,A);d--;C()}),p=c.substring(0,1);if("L"==p)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var A=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,A,mxUtils.bind(this,function(x){".scratchpad"==A&&null==
-x&&(x=this.emptyLibraryXml);null!=x?g(new StorageLibrary(this,x,A)):m()}),m)}catch(x){m()}}),0);else if("U"==p){var q=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(q,mxUtils.bind(this,function(A){null!=A&&0<A.length?g(new UrlLibrary(this,A,q)):m()}),function(){m()},null,!0)}else if("R"==p){p=decodeURIComponent(c.substring(1));try{p=JSON.parse(p);var z={id:p[0],title:p[1],downloadUrl:p[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(A){try{g(new RemoteLibrary(this,
-A,z))}catch(x){m()}}),function(){m()})}catch(A){m()}}else if("S"==p&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(A){g(A)},m)}catch(A){m()}else{var y=null;"G"==p?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==p?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==p?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==p?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==p&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(A){try{g(A)}catch(x){m()}}),function(A){m()}):m(!0)}}})(J,F)}C()}};
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(I,F){F||mxSettings.removeCustomLibrary(I);delete this.loadedLibraries[I]}),d=0,v=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,D=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var I=b.length-1;0<=I;I--)null!=v[I]&&this.loadLibrary(v[I],I<=x);null!=f&&f()}});if(null!=b)for(var G=0;G<b.length;G++){var H=encodeURIComponent(decodeURIComponent(b[G]));
+mxUtils.bind(this,function(I,F){if(null!=I&&0<I.length&&null==this.loadedLibraries[I]&&null==this.sidebar.palettes[I]){this.loadedLibraries[I]=!0;d++;var O=mxUtils.bind(this,function(t){v[F]=t;d--;D()}),c=mxUtils.bind(this,function(t){k(I,t);d--;D()}),e=I.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(I.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(y){".scratchpad"==t&&null==
+y&&(y=this.emptyLibraryXml);null!=y?O(new StorageLibrary(this,y,t)):c()}),c)}catch(y){c()}}),0);else if("U"==e){var g=decodeURIComponent(I.substring(1));this.isOffline()||this.loadTemplate(g,mxUtils.bind(this,function(t){null!=t&&0<t.length?O(new UrlLibrary(this,t,g)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(I.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{O(new RemoteLibrary(this,
+t,p))}catch(y){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(I.substring(1)),function(t){O(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(I.substring(1)),mxUtils.bind(this,function(t){try{O(t)}catch(y){c()}}),function(t){c()}):c(!0)}}})(H,G)}D()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",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":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",
mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=
b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,
"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(t){t=t.filter(function(J){return!J.targets||-1<J.targets.indexOf(b)||null!=f&&-1<J.targets.indexOf(f)});for(var u=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(u)):!0,F=0;F<t.length;F++)t[F].isNew=!C||t[F].timestamp>C;this.showNotification(t,u)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==k||k.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()&&(t=JSON.parse(t.getText()),t.sort(function(u,C){return C.timestamp-u.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:t})),this.fetchingNotif=!1,d(t))}))):d(k.notifs)}};
-App.prototype.showNotification=function(b,f){function k(c){var e=document.querySelector(".geNotification-count");null!=e&&(e.innerHTML=c,e.style.display=0==c?"none":"",e=document.querySelector(".geNotification-bell"),e.style.animation=0==c?"none":"",e.className="geNotification-bell"+(0==c?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==c?"none":"")}var d=b.length;if("min"==uiTheme)for(var t=d=0;t<b.length;t++)b[t].isNew&&d++;if(0==d)null!=this.notificationBtn&&
-(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var u=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),e=0;e<c.length;e++)c[e].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
-(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";t=document.createElement("span");t.className="geBell-top";d.appendChild(t);t=document.createElement("span");t.className="geBell-middle";d.appendChild(t);
-t=document.createElement("span");t.className="geBell-bottom";d.appendChild(t);t=document.createElement("span");t.className="geBell-rad";d.appendChild(t);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);t=document.createElement("div");t.className=
-"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var C=document.createElement("div");C.setAttribute("id","geNotifList");C.style.position="relative";t.appendChild(C);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var c=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=c.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=c.right-this.notificationWin.clientWidth+"px";k(0)}else u()}));mxEvent.addListener(d,"click",u)}else this.notificationBtn.style.display="";var F=0,J=document.getElementById("geNotifList");
-if(null!=J){J.innerHTML='<div class="line"></div>';for(t=0;t<b.length;t++)(function(c,e){e.isNew&&F++;var g=document.createElement("div");g.className="notification";c=c.timeSince(new Date(e.timestamp));null==c&&(c=mxResources.get("lessThanAMinute"));g.innerHTML='<div class="circle'+(e.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[c],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(e.content)+"</p>";e.link&&mxEvent.addListener(g,"click",function(){window.open(e.link,
-"notifWin")});J.appendChild(g)})(this,b[t]);k(F)}}};
-App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),t=mxUtils.bind(this,function(u){k.isModified()&&Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(u,null==u||"AbortError"!=u.name)});try{b==k.getTitle()?k.save(!0,d,
-t):k.saveAs(b,d,t)}catch(u){t(u)}}};
-App.prototype.pickFolder=function(b,f,k,d,t){k=null!=k?k:!0;var u=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){u();if(C.action==google.picker.Action.PICKED){var F=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(F=C.docs[0].id);f(F)}}),t):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){u();null!=C&&null!=C.value&&0<C.value.length&&(C=OneDriveFile.prototype.getIdOf(C.value[0]),
-f(C))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,k,d,t,u){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,u,mxUtils.bind(this,function(C){this.spinner.stop()}),
-mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),k,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,u):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,u,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,u,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
-k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,u):t==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))};
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(v){v=v.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=f&&-1<H.targets.indexOf(f)});for(var x=b+"NotifReadTS",D=isLocalStorage?parseInt(localStorage.getItem(x)):!0,G=0;G<v.length;G++)v[G].isNew=!D||v[G].timestamp>D;this.showNotification(v,x)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(v){}null==k||k.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()&&(v=JSON.parse(v.getText()),v.sort(function(x,D){return D.timestamp-x.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:v})),this.fetchingNotif=!1,d(v))}))):d(k.notifs)}};
+App.prototype.showNotification=function(b,f){function k(I){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=I,F.style.display=0==I?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==I?"none":"",F.className="geNotification-bell"+(0==I?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==I?"none":"")}var d=b.length;if("min"==uiTheme)for(var v=d=0;v<b.length;v++)b[v].isNew&&d++;if(0==d)null!=this.notificationBtn&&
+(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var I=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<I.length;F++)I[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
+(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";v=document.createElement("span");v.className="geBell-top";d.appendChild(v);v=document.createElement("span");v.className="geBell-middle";d.appendChild(v);
+v=document.createElement("span");v.className="geBell-bottom";d.appendChild(v);v=document.createElement("span");v.className="geBell-rad";d.appendChild(v);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);v=document.createElement("div");v.className=
+"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");v.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";v.appendChild(d);this.notificationWin.appendChild(v);v=document.createElement("div");v.className="notifications clearfix";var D=document.createElement("div");D.setAttribute("id","geNotifList");D.style.position="relative";v.appendChild(D);this.notificationWin.appendChild(v);mxEvent.addListener(this.notificationBtn,
+"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var I=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=I.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=I.right-this.notificationWin.clientWidth+"px";k(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var G=0,H=document.getElementById("geNotifList");
+if(null!=H){H.innerHTML='<div class="line"></div>';for(v=0;v<b.length;v++)(function(I,F){F.isNew&&G++;var O=document.createElement("div");O.className="notification";I=I.timeSince(new Date(F.timestamp));null==I&&(I=mxResources.get("lessThanAMinute"));O.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[I],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(O,"click",function(){window.open(F.link,
+"notifWin")});H.appendChild(O)})(this,b[v]);k(G)}}};
+App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),v=mxUtils.bind(this,function(x){k.isModified()&&Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(x,null==x||"AbortError"!=x.name)});try{b==k.getTitle()?k.save(!0,d,
+v):k.saveAs(b,d,v)}catch(x){v(x)}}};
+App.prototype.pickFolder=function(b,f,k,d,v){k=null!=k?k:!0;var x=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(D){x();if(D.action==google.picker.Action.PICKED){var G=null;null!=D.docs&&0<D.docs.length&&"folder"==D.docs[0].type&&(G=D.docs[0].id);f(G)}}),v):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(D){x();null!=D&&null!=D.value&&0<D.value.length&&(D=OneDriveFile.prototype.getIdOf(D.value[0]),
+f(D))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(D){x();f(D)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(D){x();f(D)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(D){x();f(D)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,k,d,v,x){v==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)})):v==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,x,mxUtils.bind(this,function(D){this.spinner.stop()}),
+mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),k,d):v==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,x):v==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,x,d):v==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,x,d):v==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
+k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,x):v==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var k=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,f,k,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(u){try{null!=k&&k(u,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(C){this.editor.setStatus(mxUtils.htmlEntities(C.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(u){null!=d&&d(u);u&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,k,d,t,u,C,F){var J=f;/\.svg$/i.test(J)||(J=J.substring(0,f.lastIndexOf("."))+d);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",b,!0);c||(e.responseType="blob");if(F)for(var g in F)e.setRequestHeader(g,F[g]);e.onload=mxUtils.bind(this,function(){if(200<=
-e.status&&299>=e.status){var p=null;c?(p=JSON.parse(e.responseText),p=this.base64ToBlob(p.content,"application/octet-stream")):p=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(p,mxUtils.bind(this,function(q){t(new LocalFile(this,q,J,!0))}),u,f)}else null!=u&&u({message:mxResources.get("errorLoadingFile")})});e.onerror=u;e.send()}else{var m=mxUtils.bind(this,function(p){try{if(/\.pdf$/i.test(f)){var q=Editor.extractGraphModelFromPdf(p);null!=q&&0<q.length&&t(new LocalFile(this,
-q,J,!0))}else/\.png$/i.test(f)?(q=this.extractGraphModelFromPng(p),null!=q?t(new LocalFile(this,q,J,!0)):t(new LocalFile(this,p,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(p,b)?this.parseFileData(p,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?t(new LocalFile(this,z.responseText,J,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,p,J,!0))}catch(z){null!=u&&u(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){if(null!=t){p=JSON.parse(p.getText());var q=p.content;"base64"===p.encoding&&(q=/\.png$/i.test(f)?"data:image/png;base64,"+q:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+q:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(q):atob(q));m(q)}}else null!=u&&u({code:App.ERROR_UNKNOWN})}),function(){null!=u&&u({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=u&&u({code:App.ERROR_TIMEOUT,retry:fn})},F):null!=C?C(b,m,u,k):this.editor.loadUrl(b,m,u,k,null,null,null,F)}};
+App.prototype.showAuthDialog=function(b,f,k,d){var v=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=k&&k(x,mxUtils.bind(this,function(){this.hideDialog();v()}))}catch(D){this.editor.setStatus(mxUtils.htmlEntities(D.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,f,k,d,v,x,D,G){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.lastIndexOf("."))+d);var I=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(I=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);I||(F.responseType="blob");if(G)for(var O in G)F.setRequestHeader(O,G[O]);F.onload=mxUtils.bind(this,function(){if(200<=
+F.status&&299>=F.status){var e=null;I?(e=JSON.parse(F.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(g){v(new LocalFile(this,g,H,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});F.onerror=x;F.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(f)){var g=Editor.extractGraphModelFromPdf(e);null!=g&&0<g.length&&v(new LocalFile(this,
+g,H,!0))}else/\.png$/i.test(f)?(g=this.extractGraphModelFromPng(e),null!=g?v(new LocalFile(this,g,H,!0)):v(new LocalFile(this,e,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(p){4==p.readyState&&(200<=p.status&&299>=p.status?v(new LocalFile(this,p.responseText,H,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):v(new LocalFile(this,e,H,!0))}catch(p){null!=x&&x(p)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);I?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=v){e=JSON.parse(e.getText());var g=e.content;"base64"===e.encoding&&(g=/\.png$/i.test(f)?"data:image/png;base64,"+g:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+g:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g));c(g)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},G):null!=D?D(b,c,x,k):this.editor.loadUrl(b,c,x,k,null,null,null,G)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
-"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(t){this.appIconClicked(t)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
-mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&(t=t.getMode(),t==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70% 70%"):t==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):t==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
+"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(v){this.appIconClicked(v)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
+mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&(v=v.getMode(),v==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):v==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):v==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70% 70%"):v==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):v==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):v==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";
-this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
-function(t){var u=this.getCurrentFile();null!=u&&u.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(t)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
-this.menubar.container.style.top="34px");f="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding=
-"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(t)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
-k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
-"click",mxUtils.bind(this,function(t){var u=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:u});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(u);u||(d=this.hsplitPosition);this.hsplitPosition=u?d:0;this.toggleFormatPanel(u);this.fullscreenMode=!u;mxEvent.consume(t)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
-this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
-mxUtils.bind(this,function(t){this.actions.get("toggleDarkMode").funct();mxEvent.consume(t)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var d=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
+this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
+function(v){var x=this.getCurrentFile();null!=x&&x.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(v)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
+this.menubar.container.style.top="34px");f="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding="2px";
+this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(v){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(v)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
+k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
+"click",mxUtils.bind(this,function(v){var x=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:x});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(x);x||(d=this.hsplitPosition);this.hsplitPosition=x?d:0;this.toggleFormatPanel(x);this.fullscreenMode=!x;mxEvent.consume(v)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
+this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
+mxUtils.bind(this,function(v){this.actions.get("toggleDarkMode").funct();mxEvent.consume(v)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var d=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat=
-"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(t)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
+"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(v){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(v)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility=
"visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",
this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')");this.compactMode=!b};
-App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";k.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var d=!1;this.userPanel.innerText="";k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.className="geDialogClose";k.style.top="8px";k.style.right="8px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(k);if(null!=this.drive){var t=this.drive.getUsersList();if(0<t.length){var u=mxUtils.bind(this,
-function(J,c){var e=this.getCurrentFile();null!=e&&e.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();J()}),2E3)):J()});k=mxUtils.bind(this,function(J){var c=document.createElement("tr");c.setAttribute("title","User ID: "+J.id);var e=document.createElement("td");e.setAttribute("valig","middle");e.style.height="59px";e.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50");
-g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=J.pictureUrl?J.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";e.appendChild(g);c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.paddingTop="4px";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,J.displayName+(J.isCurrent&&1<t.length?" ("+mxResources.get("default")+
-")":""));null!=J.email&&(mxUtils.br(e),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,J.email),e.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var m=document.createElement("i");mxUtils.write(m,mxResources.get("googleDrive"));g.appendChild(m);e.appendChild(g);c.appendChild(e);J.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(p){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(J);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(q){this.handleError(q)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(p)})));return c});d=!0;var C=document.createElement("table");C.style.borderSpacing="0";C.style.fontSize="10pt";C.style.width="100%";C.style.padding="10px";for(var F=0;F<t.length;F++)C.appendChild(k(t[F]));this.userPanel.appendChild(C);k=document.createElement("div");k.style.textAlign=
-"left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";C=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));C.className="geBtn";C.style.float="right";k.appendChild(C);C=mxUtils.button(mxResources.get("addAccount"),
-mxUtils.bind(this,function(){var J=this.drive.createAuthWin();J.blur();window.focus();u(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(c){this.handleError(c)}),!0,J)}),mxResources.get("closingFile")+"...")}));C.className="geBtn";C.style.margin="0px";k.appendChild(C);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(J,c,e,g){if(null!=J){d&&this.userPanel.appendChild(document.createElement("hr"));
-d=!0;var m=document.createElement("table");m.style.borderSpacing="0";m.style.fontSize="10pt";m.style.width="100%";m.style.padding="10px";var p=document.createElement("tbody"),q=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",c);y.style.marginRight="6px";z.appendChild(y)}q.appendChild(z);
-z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,J.displayName);null!=J.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,J.email),z.appendChild(c));null!=g&&(J=document.createElement("div"),J.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),J.appendChild(c),z.appendChild(J));q.appendChild(z);p.appendChild(q);
-m.appendChild(p);this.userPanel.appendChild(m);J=document.createElement("div");J.style.textAlign="center";J.style.padding="10px";J.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",J.appendChild(e));this.userPanel.appendChild(J)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();
-window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&k(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
-""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&k(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&k(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==GitLabFile){var c=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):
-c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&k(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));"min"==
-uiTheme&&(C=this.getCurrentFile(),null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&(k=document.createElement("div"),k.style.padding="10px",k.style.whiteSpace="nowrap",k.style.borderTop="1px solid rgb(224, 224, 224)",k.style.marginTop="4px",k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",F=C.getRealtimeError(),1!=C.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=F&&null!=F.message?F.message:mxResources.get("disconnected"))),
-this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?
-b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
-this.userElement=null);this.updateUserElementStyle();this.updateUserElementIcon()};
-App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var f=mxResources.get("changeUser");if("none"!=b.style.display){var k=this.getCurrentFile();if(null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()){var d=document.createElement("img");d.setAttribute("border","0");d.style.position="absolute";d.style.left="16px";d.style.top="2px";d.style.width="12px";d.style.height="12px";var t=k.getRealtimeError();k=k.getRealtimeState();f+=" ("+mxResources.get("realtimeCollaboration")+
-": ";1==k?(d.src=Editor.syncImage,f+=mxResources.get("online")):(d.src=Editor.syncProblemImage,f=null!=t&&null!=t.message?f+t.message:f+mxResources.get("disconnected"));f+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(d))}b.setAttribute("title",f)}}};
+App.prototype.updateUserElement=function(){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement));if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){this.userElement.style.display="inline-block";
+var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&
+(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else this.userElement.style.display="none";this.updateUserElementStyle();this.updateUserElementIcon()};
App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("sketch"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.top="3px",b.style.right=""):(b.className="geItem",b.style.backgroundImage=
"url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||"1"!=urlParams["live-ui"]?"8px":"30px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
-App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";return b};
-App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var f=mxResources.get("changeUser");if("none"!=b.style.display){var k=this.getCurrentFile();if(null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()){var d=document.createElement("img");d.setAttribute("border","0");d.style.position="absolute";d.style.left="16px";d.style.top="2px";d.style.width="12px";d.style.height="12px";var v=k.getRealtimeError();k=k.getRealtimeState();f+=" (";1==k?(d.src=Editor.syncImage,f+=mxResources.get("online")):
+(d.src=Editor.syncProblemImage,f=null!=v&&null!=v.message?f+v.message:f+mxResources.get("disconnected"));f+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(d))}b.setAttribute("title",f)}}};
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";
+k.style.top=b.clientTop+b.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var d=!1;this.userPanel.innerText="";k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.className="geDialogClose";k.style.top="8px";k.style.right="8px";
+mxEvent.addListener(k,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(k);if(null!=this.drive){var v=this.drive.getUsersList();if(0<v.length){var x=mxUtils.bind(this,function(H,I){var F=this.getCurrentFile();null!=F&&F.constructor==DriveFile?(this.spinner.spin(document.body,I),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();H()}),2E3)):H()});k=mxUtils.bind(this,
+function(H){var I=document.createElement("tr");I.setAttribute("title","User ID: "+H.id);var F=document.createElement("td");F.setAttribute("valig","middle");F.style.height="59px";F.style.width="66px";var O=document.createElement("img");O.setAttribute("width","50");O.setAttribute("height","50");O.setAttribute("border","0");O.setAttribute("src",null!=H.pictureUrl?H.pictureUrl:this.defaultUserPicture);O.style.borderRadius="50%";O.style.margin="4px 8px 0 8px";F.appendChild(O);I.appendChild(F);F=document.createElement("td");
+F.setAttribute("valign","middle");F.style.whiteSpace="nowrap";F.style.paddingTop="4px";F.style.maxWidth="0";F.style.overflow="hidden";F.style.textOverflow="ellipsis";mxUtils.write(F,H.displayName+(H.isCurrent&&1<v.length?" ("+mxResources.get("default")+")":""));null!=H.email&&(mxUtils.br(F),O=document.createElement("small"),O.style.color="gray",mxUtils.write(O,H.email),F.appendChild(O));O=document.createElement("div");O.style.marginTop="4px";var c=document.createElement("i");mxUtils.write(c,mxResources.get("googleDrive"));
+O.appendChild(c);F.appendChild(O);I.appendChild(F);H.isCurrent||(I.style.cursor="pointer",I.style.opacity="0.3",mxEvent.addListener(I,"click",mxUtils.bind(this,function(e){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(H);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(e)})));return I});d=!0;var D=
+document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";for(var G=0;G<v.length;G++)D.appendChild(k(v[G]));this.userPanel.appendChild(D);k=document.createElement("div");k.style.textAlign="left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";D=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,
+function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));D.className="geBtn";D.style.float="right";k.appendChild(D);D=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var H=this.drive.createAuthWin();H.blur();window.focus();x(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(I){this.handleError(I)}),!0,H)}),mxResources.get("closingFile")+"...")}));D.className="geBtn";D.style.margin="0px";k.appendChild(D);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(H,I,F,O){if(null!=H){d&&this.userPanel.appendChild(document.createElement("hr"));d=!0;var c=document.createElement("table");c.style.borderSpacing="0";c.style.fontSize="10pt";c.style.width="100%";c.style.padding="10px";var e=document.createElement("tbody"),g=document.createElement("tr"),
+p=document.createElement("td");p.setAttribute("valig","top");p.style.width="40px";if(null!=I){var n=document.createElement("img");n.setAttribute("width","40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",I);n.style.marginRight="6px";p.appendChild(n)}g.appendChild(p);p=document.createElement("td");p.setAttribute("valign","middle");p.style.whiteSpace="nowrap";p.style.maxWidth="0";p.style.overflow="hidden";p.style.textOverflow="ellipsis";mxUtils.write(p,H.displayName);
+null!=H.email&&(mxUtils.br(p),I=document.createElement("small"),I.style.color="gray",mxUtils.write(I,H.email),p.appendChild(I));null!=O&&(H=document.createElement("div"),H.style.marginTop="4px",I=document.createElement("i"),mxUtils.write(I,O),H.appendChild(I),p.appendChild(H));g.appendChild(p);e.appendChild(g);c.appendChild(e);this.userPanel.appendChild(c);H=document.createElement("div");H.style.textAlign="center";H.style.padding="10px";H.style.whiteSpace="nowrap";null!=F&&(F=mxUtils.button(mxResources.get("signOut"),
+F),F.className="geBtn",H.appendChild(F));this.userPanel.appendChild(H)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==DropboxFile){var I=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.dropbox.logout()}),mxResources.get("dropbox"));
+null!=this.oneDrive&&k(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==OneDriveFile){var I=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&
+k(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==GitHubFile){var I=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&k(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,
+function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==GitLabFile){var I=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&k(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==
+TrelloFile){var I=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(D=this.getCurrentFile(),null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&(k=document.createElement("div"),k.style.padding="10px",k.style.whiteSpace="nowrap",k.style.borderTop="1px solid rgb(224, 224, 224)",
+k.style.marginTop="4px",k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",G=D.getRealtimeError(),1!=D.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=G&&null!=G.message?G.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||
+this.userPanel.parentNode.removeChild(this.userPanel)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
-var t=document.createElement("img");mxUtils.setOpacity(t,50);t.style.height="16px";t.style.width="16px";t.setAttribute("border","0");t.setAttribute("valign","bottom");t.setAttribute("src",Editor.helpImage);d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(u){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(u)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function k(n,v,D){this.ui=n;this.previousExtFonts=this.extFonts=v;this.prevCustomFonts=this.customFonts=D}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),C=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),F=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),J=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));d.actions.addAction("new...",function(){var n=d.isOffline();if(n||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var v=new NewDialog(d,n,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(v.container,n?350:620,n?70:460,!0,!0,function(H){d.sidebar.hideTooltip();H&&null==d.getCurrentFile()&&d.showSplash()});
-v.init()}else{var D=function(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}};n=new TemplatesDialog(d,function(H,K,G){var N=G.libs,T=G.clibs;d.pickFolder(d.mode,function(V){d.createFile(K,H,null!=N&&0<N.length?N:null,null,function(){d.hideDialog()},null,V,null,null!=T&&0<T.length?T:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(H,K,G){var N=new Date;N.setDate(N.getDate()-
-7);d.drive.listFiles(null,N,G?!0:!1,function(T){for(var V=[],U=0;U<T.items.length;U++)V.push(D(T.items[U]));H(V)},K)},function(H,K,G,N){d.drive.listFiles(H,null,N?!0:!1,function(T){for(var V=[],U=0;U<T.items.length;U++)V.push(D(T.items[U]));K(V)},G)},function(H,K,G){d.drive.getFile(H.id,function(N){K(N.data)},G)},null,null,!1,!1);d.showDialog(n.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){var n=new NewDialog(d,null,!1,function(v){d.hideDialog();if(null!=v){var D=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(v,Math.max(D.x,20),Math.max(D.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(n.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});n.init()}})).isEnabled=u;var e=d.actions.addAction("shareCursor",
-function(){d.setShareCursorPosition(!d.isShareCursorPosition())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShareCursorPosition()});e=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShowRemoteCursors()});e=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==
-mxConstants.POINTS});e=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});e=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});e=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
-e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["points","inches","millimeters","meters"],v)})));e=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});e.setEnabled(d.canvasSupported&&9!=document.documentMode);
-e.setToggleAction(!0);e.setSelectedCallback(function(){return null!=d.ruler});e=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});e.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;e.setToggleAction(!0);e.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});e=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(n){d.setDarkMode(!Editor.isDarkMode());n=mxSettings.getUi();"atlas"!=n&&"min"!=n&&"sketch"!=n&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});d.actions.addAction("properties...",function(){var n=new FilePropertiesDialog(d);d.showDialog(n.container,320,120,!0,!0);n.init()}).isEnabled=
-u;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(t.isEnabled()){if(null==d.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,n?120:84,n)}t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing();d.freehandWindow.window.setVisible(t.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",
-new Action(mxResources.get("formatXml")+"...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var v=null==d.pages||1>=d.pages.length,D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatXml"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(D);var H=d.addCheckbox(n,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),K=d.addCheckbox(n,mxResources.get("compressed"),!0),G=d.addCheckbox(n,mxResources.get("allPages"),
-!v,v);G.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?G.setAttribute("disabled","disabled"):G.removeAttribute("disabled")});n=new CustomDialog(d,n,mxUtils.bind(this,function(){d.downloadFile("xml",!K.checked,null,!H.checked,v||!G.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,
-null,function(n,v,D,H,K,G,N,T,V){N=[];V&&N.push("tags=%7B%7D");n=new EmbedDialog(d,d.createLink(n,v,D,H,K,G,null,!0,N));d.showDialog(n.container,450,240,!0,!0);n.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,n,function(v,D,H,K,G,N,T,V,U,X,l){d.createHtml(v,D,H,K,G,N,T,V,U,
-X,l,mxUtils.bind(this,function(B,L){var P=d.getBaseFilename(T);B='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(P)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+B+"\n"+L+"\n</body>\n</html>";d.saveData(P+(".drawio"==P.substring(P.lenth-7)?"":".drawio")+".html","html",B,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!d.isOffline()&&!d.printPdfExport){var n=null==d.pages||1>=d.pages.length,v=document.createElement("div");v.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatPdf"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(D);var H=function(){T!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!t.pageVisible):(L.setAttribute("disabled","disabled"),L.checked=!1)};D=200;var K=1,G=null;if(d.pdfPageExport&&
-!n){var N=function(){l.value=Math.max(1,Math.min(K,Math.max(parseInt(l.value),parseInt(U.value))));U.value=Math.max(1,Math.min(K,Math.min(parseInt(l.value),parseInt(U.value))))},T=d.addRadiobox(v,"pages",mxResources.get("allPages"),!0),V=d.addRadiobox(v,"pages",mxResources.get("pages")+":",!1,null,!0),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";v.appendChild(U);var X=
-document.createElement("span");mxUtils.write(X,mxResources.get("to"));v.appendChild(X);var l=U.cloneNode(!0);v.appendChild(l);mxEvent.addListener(U,"focus",function(){V.checked=!0});mxEvent.addListener(l,"focus",function(){V.checked=!0});mxEvent.addListener(U,"change",N);mxEvent.addListener(l,"change",N);if(null!=d.pages&&(K=d.pages.length,null!=d.currentPage))for(N=0;N<d.pages.length;N++)if(d.currentPage==d.pages[N]){G=N+1;U.value=G;l.value=G;break}U.setAttribute("max",K);l.setAttribute("max",K);
-mxUtils.br(v);var B=d.addRadiobox(v,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(v,mxResources.get("crop"),!1,!0),P=d.addCheckbox(v,mxResources.get("grid"),!1,!1);mxEvent.addListener(T,"change",H);mxEvent.addListener(V,"change",H);mxEvent.addListener(B,"change",H);D+=64}else B=d.addCheckbox(v,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(v,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),P=d.addCheckbox(v,mxResources.get("grid"),
-!1,!1),d.pdfPageExport||mxEvent.addListener(B,"change",H);H=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var O=null,R=null;if(EditorUi.isElectronApp||H)R=d.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),D+=30;H&&(O=d.addCheckbox(v,mxResources.get("transparentBackground"),!1),D+=30);v=new CustomDialog(d,v,mxUtils.bind(this,function(){var S=null;if(!n){S=parseInt(U.value);var W=parseInt(l.value);S=T.checked||S==G&&W==G?null:{from:Math.max(0,
-Math.min(K-1,S-1)),to:Math.max(0,Math.min(K-1,W-1))}}d.downloadFile("pdf",null,null,!B.checked,n?!0:!T.checked&&null==S,!L.checked,null!=O&&O.checked,null,null,P.checked,null!=R&&R.checked,S)}),null,mxResources.get("export"));d.showDialog(v.container,300,D,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});
-d.actions.addAction("close",function(){function n(){null!=v&&v.removeDraft();d.fileLoaded(null)}var v=d.getCurrentFile();null!=v&&v.isModified()?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var n=t.getSelectionCell(),v=t.view.getState(n);null!=v&&null!=v.shape&&null!=v.shape.stencil&&(n=new EditShapeDialog(d,n,mxResources.get("editShape")+
-":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(n,v){d.spinner.stop();n=new RevisionDialog(d,n,v);d.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,function(n){d.handleError(n)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",
-function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");e=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(e.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var n=d.getCurrentFile();null!=n&&(window.drawdata=d.getFileData(),n=null!=n.getTitle()?n.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
-(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&(e=d.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!d.isMathEnabled();t.model.execute(n)}),e.setToggleAction(!0),e.setSelectedCallback(function(){return d.isMathEnabled()}),e.isEnabled=u);isLocalStorage&&(e=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var n=t.getSelectionCells(),v=[],D=0;D<n.length;D++)t.getModel().isVertex(n[D])&&v.push(n[D]);0<v.length&&(n=new EditGeometryDialog(d,v),d.showDialog(n.container,
-200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");var m=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(m=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=m&&t.pasteStyle(m,t.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var n=
-new BackgroundImageDialog(d,function(v){d.setBackgroundImage(v)});d.showDialog(n.container,400,170,!0,!0);n.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B,L,P){V=parseInt(n);!isNaN(V)&&0<V&&(P?d.downloadFile("remoteSvg",null,null,D,null,T,v,n,N,null,K):d.exportSvg(V/100,v,D,
-H,K,G,N,!T,!1,U,l,B,L))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B){n=parseInt(n);!isNaN(n)&&0<n&&d.exportImage(n/100,v,D,H,K,N,!T,!1,null,X,null,l,B)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,D,H,K){d.downloadFile(v?"xmlpng":"png",null,null,n,null,null,D,H,K)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B){n=parseInt(n);!isNaN(n)&&0<n&&d.exportImage(n/100,!1,
-D,H,!1,N,!T,!1,"jpeg",X,null,l,B)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,D,H,K){d.downloadFile("jpeg",null,null,n,null,null,null,H,K)}),!0,!0)}));e=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),v=mxUtils.getXml(0==n.length?d.editor.getGraphXml():t.encodeCells(n));d.copyImage(n,v)}));e.visible=
-Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;e=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));
+var v=document.createElement("img");mxUtils.setOpacity(v,50);v.style.height="16px";v.style.width="16px";v.setAttribute("border","0");v.setAttribute("valign","bottom");v.setAttribute("src",Editor.helpImage);d.appendChild(v);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(x){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(x)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
+Menus.prototype.init=function(){function k(l,q,B){this.ui=l;this.previousExtFonts=this.extFonts=q;this.prevCustomFonts=this.customFonts=B}f.apply(this,arguments);var d=this.editorUi,v=d.editor.graph,x=mxUtils.bind(v,v.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),G=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),H=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),I="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(l){return"file"!=l}));d.actions.addAction("new...",function(){var l=d.isOffline();if(l||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var q=new NewDialog(d,l,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(q.container,l?350:620,l?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});
+q.init()}else{var B=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};l=new TemplatesDialog(d,function(J,M,E){var L=E.libs,P=E.clibs;d.pickFolder(d.mode,function(S){d.createFile(M,J,null!=L&&0<L.length?L:null,null,function(){d.hideDialog()},null,S,null,null!=P&&0<P.length?P:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,E){var L=new Date;L.setDate(L.getDate()-
+7);d.drive.listFiles(null,L,E?!0:!1,function(P){for(var S=[],V=0;V<P.items.length;V++)S.push(B(P.items[V]));J(S)},M)},function(J,M,E,L){d.drive.listFiles(J,null,L?!0:!1,function(P){for(var S=[],V=0;V<P.items.length;V++)S.push(B(P.items[V]));M(S)},E)},function(J,M,E){d.drive.getFile(J.id,function(L){M(L.data)},E)},null,null,!1,!1);d.showDialog(l.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(v.isEnabled()&&
+!v.isCellLocked(v.getDefaultParent())){var l=new NewDialog(d,null,!1,function(q){d.hideDialog();if(null!=q){var B=d.editor.graph.getFreeInsertPoint();v.setSelectionCells(d.importXml(q,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));v.scrollCellToVisible(v.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(l.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});l.init()}})).isEnabled=x;var F=d.actions.addAction("shareCursor",
+function(){d.setShareCursorPosition(!d.isShareCursorPosition())});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.isShareCursorPosition()});F=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.isShowRemoteCursors()});F=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==
+mxConstants.POINTS});F=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});F=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});F=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
+F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,["points","inches","millimeters","meters"],q)})));F=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});F.setEnabled(d.canvasSupported&&9!=document.documentMode);
+F.setToggleAction(!0);F.setSelectedCallback(function(){return null!=d.ruler});F=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});F.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;F.setToggleAction(!0);F.setSelectedCallback(function(){return"1"==urlParams.embedInline?
+Editor.inlineFullscreen:null!=document.fullscreenElement});F=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(l){d.setDarkMode(!Editor.isDarkMode());l=mxSettings.getUi();"atlas"!=l&&"min"!=l&&"sketch"!=l&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));F.setToggleAction(!0);F.setSelectedCallback(function(){return Editor.isDarkMode()});F=d.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(l){d.setCurrentTheme("sketch"==Editor.currentTheme?
+"":"sketch")}));F.setToggleAction(!0);F.setSelectedCallback(function(){return"sketch"==Editor.currentTheme});F=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(l){d.setSketchMode(!Editor.sketchMode)}));F.setToggleAction(!0);F.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){var l=new FilePropertiesDialog(d);d.showDialog(l.container,320,120,!0,!0);l.init()}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",
+new Action(mxResources.get("freehand")+"...",function(){if(v.isEnabled()){if(null==d.freehandWindow){var l=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,l?120:84,l)}v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing();d.freehandWindow.window.setVisible(v.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",
+function(){var l=document.createElement("div");l.style.whiteSpace="nowrap";var q=null==d.pages||1>=d.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";l.appendChild(B);var J=d.addCheckbox(l,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),M=d.addCheckbox(l,mxResources.get("compressed"),!0),E=d.addCheckbox(l,mxResources.get("allPages"),!q,q);E.style.marginBottom="16px";mxEvent.addListener(J,
+"change",function(){J.checked?E.setAttribute("disabled","disabled"):E.removeAttribute("disabled")});l=new CustomDialog(d,l,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,q||!E.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(l,q,B,J,M,E,L,P,S){L=[];S&&L.push("tags=%7B%7D");
+l=new EmbedDialog(d,d.createLink(l,q,B,J,M,E,null,!0,L));d.showDialog(l.container,450,240,!0,!0);l.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,l,function(q,B,J,M,E,L,P,S,V,X,m){d.createHtml(q,B,J,M,E,L,P,S,V,X,m,mxUtils.bind(this,function(z,K){var Q=d.getBaseFilename(P);
+z='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(Q)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+z+"\n"+K+"\n</body>\n</html>";d.saveData(Q+(".drawio"==Q.substring(Q.lenth-7)?"":".drawio")+".html","html",z,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var l=null==d.pages||
+1>=d.pages.length,q=document.createElement("div");q.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var J=function(){P!=this&&this.checked?(K.removeAttribute("disabled"),K.checked=!v.pageVisible):(K.setAttribute("disabled","disabled"),K.checked=!1)};B=200;var M=1,E=null;if(d.pdfPageExport&&!l){var L=function(){m.value=Math.max(1,Math.min(M,Math.max(parseInt(m.value),
+parseInt(V.value))));V.value=Math.max(1,Math.min(M,Math.min(parseInt(m.value),parseInt(V.value))))},P=d.addRadiobox(q,"pages",mxResources.get("allPages"),!0),S=d.addRadiobox(q,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");V.setAttribute("min","1");V.style.width="50px";q.appendChild(V);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));q.appendChild(X);
+var m=V.cloneNode(!0);q.appendChild(m);mxEvent.addListener(V,"focus",function(){S.checked=!0});mxEvent.addListener(m,"focus",function(){S.checked=!0});mxEvent.addListener(V,"change",L);mxEvent.addListener(m,"change",L);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(L=0;L<d.pages.length;L++)if(d.currentPage==d.pages[L]){E=L+1;V.value=E;m.value=E;break}V.setAttribute("max",M);m.setAttribute("max",M);mxUtils.br(q);var z=d.addRadiobox(q,"pages",mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),
+K=d.addCheckbox(q,mxResources.get("crop"),!1,!0),Q=d.addCheckbox(q,mxResources.get("grid"),!1,!1);mxEvent.addListener(P,"change",J);mxEvent.addListener(S,"change",J);mxEvent.addListener(z,"change",J);B+=64}else z=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,v.isSelectionEmpty()),K=d.addCheckbox(q,mxResources.get("crop"),!v.pageVisible||!d.pdfPageExport,!d.pdfPageExport),Q=d.addCheckbox(q,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(z,"change",J);J=!mxClient.IS_CHROMEAPP&&
+!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var N=null,U=null;if(EditorUi.isElectronApp||J)U=d.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;J&&(N=d.addCheckbox(q,mxResources.get("transparentBackground"),!1),B+=30);q=new CustomDialog(d,q,mxUtils.bind(this,function(){var T=null;if(!l){T=parseInt(V.value);var W=parseInt(m.value);T=P.checked||T==E&&W==E?null:{from:Math.max(0,Math.min(M-1,T-1)),to:Math.max(0,Math.min(M-1,W-1))}}d.downloadFile("pdf",
+null,null,!z.checked,l?!0:!P.checked&&null==T,!K.checked,null!=N&&N.checked,null,null,Q.checked,null!=U&&U.checked,T)}),null,mxResources.get("export"));d.showDialog(q.container,300,B,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function l(){null!=q&&q.removeDraft();
+d.fileLoaded(null)}var q=d.getCurrentFile();null!=q&&q.isModified()?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){v.getSelectionCells();if(1==v.getSelectionCount()){var l=v.getSelectionCell(),q=v.view.getState(l);null!=q&&null!=q.shape&&null!=q.shape.stencil&&(l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,
+!1),l.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(l,q){d.spinner.stop();l=new RevisionDialog(d,l,q);d.showDialog(l.container,640,480,!0,!0);l.init()}),mxUtils.bind(this,function(l){d.handleError(l)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},
+null,null,Editor.ctrlKey+"+S");F=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(F.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var l=d.getCurrentFile();null!=l&&(window.drawdata=d.getFileData(),l=null!=l.getTitle()?l.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":
+"")+"title="+encodeURIComponent(l),null,!0))});"undefined"!==typeof MathJax&&(F=d.actions.addAction("mathematicalTypesetting",function(){var l=new ChangePageSetup(d);l.ignoreColor=!0;l.ignoreImage=!0;l.mathEnabled=!d.isMathEnabled();v.model.execute(l)}),F.setToggleAction(!0),F.setSelectedCallback(function(){return d.isMathEnabled()}),F.isEnabled=x);isLocalStorage&&(F=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),
+F.setToggleAction(!0),F.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var O=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});O.setToggleAction(!0);O.setSelectedCallback(function(){return O.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var l=v.getSelectionCells(),q=[],B=0;B<l.length;B++)v.getModel().isVertex(l[B])&&q.push(l[B]);0<q.length&&(l=new EditGeometryDialog(d,q),d.showDialog(l.container,200,
+270,!0,!0),l.init())},null,null,Editor.ctrlKey+"+Shift+M");var c=null;d.actions.addAction("copyStyle",function(){v.isEnabled()&&!v.isSelectionEmpty()&&(c=v.copyStyle(v.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){v.isEnabled()&&!v.isSelectionEmpty()&&null!=c&&v.pasteStyle(c,v.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var l=
+new BackgroundImageDialog(d,function(q){d.setBackgroundImage(q)});d.showDialog(l.container,400,170,!0,!0);l.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,q,B,J,M,E,L,P,S,V,X,m,z,K,Q){S=parseInt(l);!isNaN(S)&&0<S&&(Q?d.downloadFile("remoteSvg",null,null,B,null,P,q,l,L,null,M):d.exportSvg(S/100,q,B,
+J,M,E,L,!P,!1,V,m,z,K))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,q,B,J,M,E,L,P,S,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,q,B,J,M,L,!P,!1,null,X,null,m,z)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,q,B,J,M){d.downloadFile(q?"xmlpng":"png",null,null,l,null,null,B,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,q,B,J,M,E,L,P,S,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,!1,
+B,J,!1,L,!P,!1,"jpeg",X,null,m,z)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,q,B,J,M){d.downloadFile("jpeg",null,null,l,null,null,null,J,M)}),!0,!0)}));F=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var l=mxUtils.sortCells(v.model.getTopmostCells(v.getSelectionCells())),q=mxUtils.getXml(0==l.length?d.editor.getGraphXml():v.encodeCells(l));d.copyImage(l,q)}));F.visible=
+Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;F=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){v.setShadowVisible(!v.shadowVisible)}));F.setToggleAction(!0);F.setSelectedCallback(function(){return v.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));
d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var n=new FeedbackDialog(d);d.showDialog(n.container,610,360,!0,!1);n.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});e=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,
-212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));e=d.actions.addAction("findReplace",mxUtils.bind(this,function(n,v){var D=(n=t.isEnabled()&&(null==v||!mxEvent.isShiftDown(v)))?"findReplace":"find";v=D+"Window";if(null==this[v]){var H=n?"min"==uiTheme?330:300:240;this[v]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,n?"min"==uiTheme?304:288:170,n);this[v].window.addListener("show",function(){d.fireEvent(new mxEventObject(D))});this[v].window.addListener("hide",function(){d.fireEvent(new mxEventObject(D))});
-this[v].window.setVisible(!0)}else this[v].window.setVisible(!this[v].window.isVisible())}),null,null,Editor.ctrlKey+"+F");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){var n=t.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[n]&&this[n].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var n=null==d.pages||1>=d.pages.length;if(n)d.exportVisio();else{var v=document.createElement("div");v.style.whiteSpace=
-"nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(D);var H=d.addCheckbox(v,mxResources.get("allPages"),!n,n);H.style.marginBottom="16px";n=new CustomDialog(d,v,mxUtils.bind(this,function(){d.exportVisio(!H.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
-function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="4px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var v=document.createElement("span");v.style["float"]="right";v.style.cursor="pointer";v.style.userSelect="none";v.style.marginTop="-4px";v.appendChild(n);mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,"click",function(K){mxEvent.getSource(K)!=n&&
-(n.checked=!n.checked)});header=v}var D=localStorage.getItem(Editor.configurationKey);v=[[mxResources.get("reset"),function(K,G){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(K)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(N){d.handleError(N)}})},"Shift+Click to Reset Settings"]];var H=d.actions.get("plugins");
-null!=H&&"1"==urlParams.sketch&&v.push([mxResources.get("plugins"),H.funct]);EditorUi.isElectronApp||v.push([mxResources.get("share"),function(K,G){if(0<G.value.length)try{var N=JSON.parse(G.value),T=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),V=new EmbedDialog(d,T);d.showDialog(V.container,450,240,!0);V.init()}catch(U){d.handleError(U)}else d.handleError({message:mxResources.get("invalidInput")})}]);v=new TextareaDialog(d,mxResources.get("configuration")+
-":",null!=D?JSON.stringify(JSON.parse(D),null,2):"",function(K){if(null!=K)try{if(null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save()),K==D)d.hideDialog();else{if(0<K.length){var G=JSON.parse(K);localStorage.setItem(Editor.configurationKey,JSON.stringify(G))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(N){d.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-v,n.parentNode);d.showDialog(v.container,620,460,!0,!1);v.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(n,v){var D=mxUtils.bind(this,function(K){var G=""==K?mxResources.get("automatic"):mxLanguageMap[K],N=null;""!=G&&(N=n.addItem(G,null,mxUtils.bind(this,function(){mxSettings.setLanguage(K);mxSettings.save();mxClient.language=K;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
-v),(K==mxLanguage||""==K&&null==mxLanguage)&&n.addCheckmark(N,Editor.checkmarkImage));return N});D("");n.addSeparator(v);for(var H in mxLanguageMap)D(H)})));var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(n){var v=p.apply(this,arguments);if(null!=v&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var D=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=D){var H=v.addMenu("",D.funct);H.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
-"theme":"language"));H.className="geToolbarButton geAdaptiveAsset";H.style.backgroundImage="url("+Editor.globeImage+")";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";H.style.backgroundSize="100% 100%";H.style.display="inline-block";H.style.verticalAlign="top";H.style.marginLeft="2px";H.style.cursor="pointer";H.style.zIndex="1";H.style.position="absolute";H.style.height="18px";H.style.width="18px";"atlas"==Editor.currentTheme?(H.style.filter="invert(100%)",H.style.right=
-"11px",H.style.top="10px"):(H.style.right="14px",H.style.top="5px");"1"==urlParams.winCtrls&&(H.style.right="95px",H.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(H);v.langIcon=H;"1"==urlParams["live-ui"]?(D=mxUtils.bind(this,function(){H.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",D),D()):mxUtils.setOpacity(H,40);this.editorUi.switchThemeElt=
-H}}return v}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var n=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(v){if(0<v.length)try{var D=JSON.parse(v);d.executeLayouts(t.createLayouts(D));d.customLayoutConfig=D;d.hideDialog()}catch(H){d.handleError(H)}},null,null,null,null,function(v,
-D){var H=mxUtils.button(mxResources.get("copy"),function(){try{var K=D.value;D.value=JSON.stringify(JSON.parse(K));D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));D.value=K}catch(G){d.handleError(G)}});H.setAttribute("title","copy");H.className="geBtn";v.appendChild(H)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(n.container,
-620,460,!0,!0);n.init()});e=this.get("viewZoom");var q=e.funct;e.funct=mxUtils.bind(this,function(n,v){q.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(n,["-","outline","fullscreen"],v)});e=this.get("layout");var z=e.funct;e.funct=function(n,v){z.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var D=null,H=20,K=20,G=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=D){var L=d.editor.graph,P=new mxOrgChartLayout(L,
-D,H,K),O=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(O=L.getSelectionCell());P.execute(O)}},N=document.createElement("div"),T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,mxResources.get("orgChartType")+": ");N.appendChild(T);var V=document.createElement("select");V.style.width="200px";V.style.boxSizing="border-box";T=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
-mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<T.length;U++){var X=document.createElement("option");mxUtils.write(X,T[U]);X.value=U;2==U&&X.setAttribute("selected","selected");V.appendChild(X)}mxEvent.addListener(V,"change",function(){D=V.value});N.appendChild(V);T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,
-mxResources.get("parentChildSpacing")+": ");N.appendChild(T);var l=document.createElement("input");l.type="number";l.value=H;l.style.width="200px";l.style.boxSizing="border-box";N.appendChild(l);mxEvent.addListener(l,"change",function(){H=l.value});T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,mxResources.get("siblingSpacing")+": ");N.appendChild(T);var B=document.createElement("input");B.type="number";B.value=K;B.style.width=
-"200px";B.style.boxSizing="border-box";N.appendChild(B);mxEvent.addListener(B,"change",function(){K=B.value});N=new CustomDialog(d,N,function(){null==D&&(D=2);d.loadOrgChartLayouts(G)});d.showDialog(N.container,355,140,!0,!0)},v,null,u());n.addSeparator(v);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(t);D.checkOverlap=!0;d.prompt(mxResources.get("spacing"),D.spacing,mxUtils.bind(this,function(H){D.spacing=H;d.executeLayout(function(){D.execute(t.getDefaultParent(),
-t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),v);n.addSeparator(v);d.menus.addMenuItem(n,"runLayout",v,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,v){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(n,["about"],v);else{var D=n.addItem("Search:",null,null,v,null,null,!1);D.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";D.style.cursor="default";var H=document.createElement("input");H.setAttribute("type","text");
-H.setAttribute("size","25");H.style.marginLeft="8px";mxEvent.addListener(H,"keydown",mxUtils.bind(this,function(K){var G=mxUtils.trim(H.value);13==K.keyCode&&0<G.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(G)),H.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:G}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
-K.keyCode&&(H.value="")}));D.firstChild.nextSibling.appendChild(H);mxEvent.addGestureListeners(H,function(K){document.activeElement!=H&&H.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){H.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),
-v),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates"],v),this.addMenuItems(n,["openDevTools","-","about"],v)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),v)}"1"==urlParams.test&&(n.addSeparator(v),this.addSubmenu("testDevelop",n,v))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var n=prompt("Language Code",Graph.diagramLanguage||"");null!=n&&(Graph.diagramLanguage=0<n.length?n:null,
-t.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
-mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!t.isSelectionEmpty()){var n=t.cloneCells(t.getSelectionCells()),v=t.getBoundingBoxFromGeometry(n);n=t.moveCells(n,-v.x,-v.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+v.width+", "+v.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(n)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var n=
-t.getGraphBounds(),v=t.view.translate,D=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",n.x/D-v.x,n.y/D-v.y,n.width/D,n.height/D,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(v){if(0<v.length)try{var D=function(T){function V(W){if(null==S[W]){if(S[W]=!0,null!=l[W]){for(;0<l[W].length;){var aa=
-l[W].pop();V(aa)}delete l[W]}}else mxLog.debug(U+": Visited: "+W)}var U=T.parentNode.id,X=T.childNodes;T={};for(var l={},B=null,L={},P=0;P<X.length;P++){var O=X[P];if(null!=O.id&&0<O.id.length)if(null==T[O.id]){T[O.id]=O.id;var R=O.getAttribute("parent");null==R?null!=B?mxLog.debug(U+": Multiple roots: "+O.id):B=O.id:(null==l[R]&&(l[R]=[]),l[R].push(O.id))}else L[O.id]=O.id}X=Object.keys(L);0<X.length?(X=U+": "+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(U+": Checked");
-var S={};null==B?mxLog.debug(U+": No root"):(V(B),Object.keys(S).length!=Object.keys(T).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",l)))};"<"!=v.charAt(0)&&(v=Graph.decompress(v),mxLog.debug("See console for uncompressed XML"),console.log("xml",v));var H=mxUtils.parseXml(v),K=d.getPagesForNode(H.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var G=d.getHashValueForPages(K);mxLog.debug("Checksum: ",G)}catch(T){mxLog.debug("Error: ",T.message)}else mxLog.debug("No pages found for checksum");
-var N=H.getElementsByTagName("root");for(v=0;v<N.length;v++)D(N[v]);mxLog.show()}catch(T){d.handleError(T),null!=window.console&&console.error(T)}});d.showDialog(n.container,620,460,!0,!0);n.init()}));var y=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var n=new TextareaDialog(d,"Diff/Sync:","",function(v){var D=d.getCurrentFile();if(0<v.length&&null!=D)try{var H=JSON.parse(v);D.patch([H],null,!0);d.hideDialog()}catch(K){d.handleError(K)}},null,"Close",null,null,
-null,!0,null,"Patch",null,[["Snapshot",function(v,D){y=d.getPagesForXml(d.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(y)}],["Diff",function(v,D){try{n.textarea.value=JSON.stringify(d.diffPages(y,d.pages),null,2)}catch(H){d.handleError(H)}}]]);null==y?(y=d.getPagesForXml(d.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(y)):n.textarea.value=JSON.stringify(d.diffPages(y,
-d.pages),null,2);d.showDialog(n.container,620,460,!0,!0);n.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var n=d.getCurrentFile();console.log("editorUi",d,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",d.diffPages(n.ownPages,n.theirPages));var v=n.getShadowPages();null!=v&&
-(console.log("Checksum shadowPages",d.getHashValueForPages(v)),console.log("diff shadowPages/ownPages",d.diffPages(v,n.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(n.ownPages,v)),console.log("diff theirPages/shadowPages",d.diffPages(n.theirPages,v)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(n.theirPages,
-n.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(n.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(n.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(n.theirPages,d.pages)))}null!=n&&console.log("Shadow pages",[d.getXmlForPages(n.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
-d);var n=d.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([d.diffPages(n.shadowPages,d.pages)])),n.ownPages=d.clonePages(d.pages),n.theirPages=d.clonePages(d.pages),n.shadowPages=d.clonePages(d.pages),null!=n.sync&&(n.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){t.model.beginUpdate();try{var n=t.model.cells,v=0,D=[],H=[],K;for(K in n){var G=n[K],N=t.getCurrentCellStyle(G)[mxConstants.STYLE_IMAGE];
-null!=N&&"data:"==N.substring(0,5)&&(null==D[N]&&(D[N]=(D[N]||0)+1,v++),H.push(G))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,H);console.log("Removed",v,"image(s) from",H.length,"cell(s): ",[H,D])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,v=t.getGraphBounds(),D=t.view.scale,H=mxUtils.createXmlDocument(),K=H.createElement("output");
-H.appendChild(K);H=new mxXmlCanvas2D(K);H.translate(Math.floor((1-v.x)/D),Math.floor((1-v.y)/D));H.scale(1/D);var G=0,N=H.save;H.save=function(){G++;N.apply(this,arguments)};var T=H.restore;H.restore=function(){G--;T.apply(this,arguments)};var V=n.drawShape;n.drawShape=function(U){mxLog.debug("entering shape",U,G);V.apply(this,arguments);mxLog.debug("leaving shape",U,G)};n.drawState(t.getView().getState(t.model.root),H);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",G)}));
-d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),v)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?
-d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(n){t.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),
-n.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",n,function(v,D,H,K,G,N,T,V,U,X,l){d.createHtml(v,D,H,K,G,N,T,V,U,X,l,mxUtils.bind(this,function(B,L){var P=new EmbedDialog(d,B+"\n"+L,null,null,function(){var O=window.open(),R=O.document;
-if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(B);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&R.writeln(L);R.writeln("</body>");R.writeln("</html>");R.close();if(!S){var W=O.document.createElement("div");W.marginLeft="26px";W.marginTop="26px";mxUtils.write(W,mxResources.get("updatingDocument"));
-S=O.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";W.appendChild(S);O.document.body.insertBefore(W,O.document.body.firstChild);window.setTimeout(function(){var aa=document.createElement("script");aa.type="text/javascript";aa.src=/<script.*?src="(.*?)"/.exec(L)[1];R.body.appendChild(aa);W.parentNode.removeChild(W)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});
-d.showDialog(P.container,450,240,!0,!0);P.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(v){d.spinner.stop();null!=v?(v=new EmbedDialog(d,'<img src="'+(n.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+n.getId())+'"/>'),d.showDialog(v.container,450,240,!0,!0),v.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));
-d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(n,v,D,H,K,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(n,v,D,H,K,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){d.showEmbedImageDialog(function(n,v,D,H,K,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(n,v,D,H,K,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var n=t.getGraphBounds();
-d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(n.height/t.view.scale)+2,function(v,D,H,K,G,N,T,V,U){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var l=[];U&&l.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+T+";height:"+V+';" src="'+d.createLink(v,D,H,K,G,N,X,null,l)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",
-new Action(mxResources.get("notion")+"...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var v=document.createElement("a");v.setAttribute("href","javascript:void(0);");v.setAttribute("target","_blank");v.style.cursor="pointer";mxUtils.write(v,mxResources.get("getNotionChromeExtension"));n.appendChild(v);mxEvent.addListener(v,"click",function(D){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
-mxEvent.consume(D)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(D,H,K,G,N,T,V,U,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();var B=["border=0"];X&&B.push("tags=%7B%7D");l=new EmbedDialog(d,d.createLink(D,H,K,G,N,T,l,null,B,!0));d.showDialog(l.container,450,240,!0,!0);l.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",n)}));d.actions.put("publishLink",new Action(mxResources.get("link")+
-"...",function(){d.showPublishLinkDialog(null,null,null,null,function(n,v,D,H,K,G,N,T,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var X=[];V&&X.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(n,v,D,H,K,G,U,null,X));d.showDialog(U.container,450,240,!0,!0);U.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});
-d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();n=new GoogleSitesDialog(d,n);d.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)e=d.actions.addAction("scratchpad",
-function(){d.toggleScratchpad()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});e=d.actions.addAction("search",function(){var n=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!n);isLocalStorage&&(mxSettings.settings.search=!n,mxSettings.save())});e.label=mxResources.get("searchShapes");e.setToggleAction(!0);e.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(d.actions.get("save").funct=function(n){t.isEditing()&&t.stopEditing();var v="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var D=d.createLoadMessage("save");D.xml=v;n&&(D.exit=!0);v=JSON.stringify(D)}(window.opener||window.parent).postMessage(v,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));n=d.getCurrentFile();null==n||n.constructor==
-EmbedFile||n.constructor==LocalFile&&null==n.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var n=function(){d.editor.modified=!1;var v="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
-"";(window.opener||window.parent).postMessage(v,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){d.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],v),d.jpgSupported&&this.addMenuItems(n,["exportJpg"],v)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],v);this.addMenuItems(n,["exportSvg",
-"-"],v);d.isOffline()||d.printPdfExport?this.addMenuItems(n,["exportPdf"],v):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],v);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(n,["exportVsdx"],v);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],v);d.isOffline()||(n.addSeparator(v),this.addMenuItem(n,"export",v).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
-function(n,v){function D(G){G.pickFile(function(N){d.spinner.spin(document.body,mxResources.get("loading"))&&G.getFile(N,function(T){var V="data:image/"==T.getData().substring(0,11)?K(T.getTitle()):"text/xml";/\.svg$/i.test(T.getTitle())&&!d.editor.isDataSvg(T.getData())&&(T.setData(Editor.createSvgDataUri(T.getData())),V="image/svg+xml");H(T.getData(),V,T.getTitle())},function(T){d.handleError(T,null!=T?mxResources.get("errorLoadingFile"):null)},G==d.drive)},!0)}var H=mxUtils.bind(this,function(G,
-N,T){var V=t.view,U=t.getGraphBounds(),X=t.snap(Math.ceil(Math.max(0,U.x/V.scale-V.translate.x)+4*t.gridSize)),l=t.snap(Math.ceil(Math.max(0,(U.y+U.height)/V.scale-V.translate.y)+4*t.gridSize));"data:image/"==G.substring(0,11)?d.loadImage(G,mxUtils.bind(this,function(B){var L=!0,P=mxUtils.bind(this,function(){d.resizeImage(B,G,mxUtils.bind(this,function(O,R,S){O=L?Math.min(1,Math.min(d.maxImageSize/R,d.maxImageSize/S)):1;d.importFile(G,N,X,l,Math.round(R*O),Math.round(S*O),T,function(W){d.spinner.stop();
-t.setSelectionCells(W);t.scrollCellToVisible(t.getSelectionCell())})}),L)});G.length>d.resampleThreshold?d.confirmImageResize(function(O){L=O;P()}):P()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(G,N,X,l,0,0,T,function(B){d.spinner.stop();t.setSelectionCells(B);t.scrollCellToVisible(t.getSelectionCell())})}),K=mxUtils.bind(this,function(G){var N="text/xml";/\.png$/i.test(G)?N="image/png":/\.jpe?g$/i.test(G)?N="image/jpg":/\.gif$/i.test(G)?
-N="image/gif":/\.pdf$/i.test(G)&&(N="application/pdf");return N});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){D(d.drive)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){D(d.oneDrive)},v):J&&"function"===typeof window.OneDriveClient&&
-n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){D(d.dropbox)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){D(d.gitHub)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+
-"...",null,function(){D(d.gitLab)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){D(d.trello)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},
-v);d.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(d,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var T=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(N),function(V){H(V,T,N)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==T)}},mxResources.get("url"));
-d.showDialog(G.container,300,80,!0,!0);G.init()},v))}))).isEnabled=u;this.put("appearance",new Menu(mxUtils.bind(this,function(n,v){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(n,["toggleDarkMode"],v);v=n.addItem(mxResources.get("simple"),null,function(){d.setCurrentTheme("sketch"==Editor.currentTheme?"":"sketch")},v);"sketch"==Editor.currentTheme&&n.addCheckmark(v,Editor.checkmarkImage)})));this.put("theme",new Menu(mxUtils.bind(this,function(n,v){var D="1"==urlParams.sketch?
-"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(n,["toggleDarkMode"],v);n.addSeparator(v);var H=n.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},v);"kennedy"!=D&&"atlas"!=D&&"dark"!=D&&"min"!=D&&"sketch"!=D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},v);"kennedy"!=D&&"dark"!=D||n.addCheckmark(H,Editor.checkmarkImage);
-H=n.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},v);"sketch"==D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},v);"min"==D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},v);"atlas"==D&&n.addCheckmark(H,Editor.checkmarkImage)})));e=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();
-if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(D,H){n.invalidFileHandle=null;n.fileHandle=D;n.title=H.name;n.desc=H;d.save(H.name)}),null,d.createFileSystemOptions(n.getTitle()));else{var v=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;v=new FilenameDialog(this.editorUi,v,mxResources.get("rename"),mxUtils.bind(this,function(D){null!=D&&0<D.length&&null!=n&&D!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
-n.rename(D,mxUtils.bind(this,function(H){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(H){this.editorUi.handleError(H,null!=H?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==StorageFile?mxResources.get("diagramName"):null,function(D){if(null!=D&&0<D.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(v.container,
-340,96,!0,!0);v.init()}}));e.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};e.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(null!=n){var v=d.getCopyFilename(n);n.constructor==DriveFile?(v=new CreateDialog(d,v,mxUtils.bind(this,function(D,H){"_blank"==H?d.editor.editAsNew(d.getFileData(),D):("download"==H&&(H=App.MODE_GOOGLE),null!=D&&0<D.length&&(H==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&
-n.saveAs(D,mxUtils.bind(this,function(K){n.desc=K;n.save(!1,mxUtils.bind(this,function(){d.spinner.stop();n.setModified(!1);n.addAllSavedStatus()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),mxUtils.bind(this,function(K){d.handleError(K)})):d.createFile(D,d.getFileData(!0),null,H)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(v.container,420,380,!0,!0),
-v.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),v)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(n,v){d.appIconClicked(v)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var v=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var D=0;D<n.desc.parents.length;D++)if(n.desc.parents[D].isRoot){v=!0;break}d.pickFolder(n.getMode(),
-mxUtils.bind(this,function(H){d.spinner.spin(document.body,mxResources.get("moving"))&&n.move(H,mxUtils.bind(this,function(K){d.spinner.stop()}),mxUtils.bind(this,function(K){d.handleError(K)}))}),null,!0,v)}}));this.put("publish",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["publishLink"],v)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var n=
-d.getCurrentFile();null!=n&&n.share()}catch(v){d.handleError(v)}}));this.put("embed",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();null==D||D.getMode()!=App.MODE_GOOGLE&&D.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(D.getTitle())||this.addMenuItems(n,["liveImage","-"],v);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],v);navigator.standalone||d.isOffline()||this.addMenuItems(n,["embedIframe"],v);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
-v)})));d.addInsertItem=function(n,v,D,H){("plantUml"!=H||EditorUi.enablePlantUml&&!d.isOffline())&&n.addItem(D,null,mxUtils.bind(this,function(){if("fromText"==H||"formatSql"==H||"plantUml"==H||"mermaid"==H){var K=new ParseDialog(d,D,H);d.showDialog(K.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else K=new CreateGraphDialog(d,D,H),d.showDialog(K.container,620,420,!0,!1);K.init()}),v,null,u())};var A=function(n){t.getModel().beginUpdate();try{n=t.addCell(n),t.fireEvent(new mxEventObject("cellsInserted",
-"cells",[n]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(n);t.setSelectionCell(n);t.container.focus();t.editAfterInsert&&t.startEditing(n);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(n))},0);return n},x=function(n,v,D,H,K){n=new mxCell(n,new mxGeometry(0,0,v,D),H);n.vertex=!0;null==K&&(K=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=K.x;n.geometry.y=K.y;return A(n)};d.actions.put("insertText",new Action(mxResources.get("text"),
-function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(x("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=u;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",
-120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"D")).isEnabled=u;d.actions.put("insertNote",new Action(mxResources.get("note"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"S")).isEnabled=u;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"F")).isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
-x("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())})).isEnabled=u;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(n){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var v=t.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint();null==n&&(n=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([D],!0)));var D=new mxCell("",new mxGeometry(0,0,v,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-D.geometry.setTerminalPoint(n,!0);D.geometry.setTerminalPoint(new mxPoint(n.x+D.geometry.width,n.y),!1);D.geometry.points=[];D.geometry.relative=!0;D.edge=!0;A(D)}},null,null,"C")).isEnabled=u;e=d.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){null!=d.formatWindow&&d.formatWindow.window.setVisible(!d.formatWindow.window.isVisible())}));e.shortcut=d.actions.get("formatPanel").shortcut;e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-d.formatWindow&&d.formatWindow.window.isVisible()}));e=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow&&d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible())}));e.shortcut=d.actions.get("formatPanel").shortcut;e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()}));d.addInsertMenuItems=mxUtils.bind(this,function(n,v,D){for(var H=0;H<D.length;H++)"-"==
-D[H]?n.addSeparator(v):d.addInsertItem(n,v,mxResources.get(D[H])+"...",D[H])});this.put("insert",new Menu(mxUtils.bind(this,function(n,v){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(d.menus.addMenuItems(n,["toggleShapes"],v),d.menus.addSubmenu("table",n,v),n.addSeparator(v),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(n,["insertTemplate"],v),d.menus.addMenuItems(n,["insertImage","insertLink","-"],v),d.menus.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),d.menus.addSubmenu("layout",
-n,v)):(this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),v),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(n,["insertTemplate"],v),n.addSeparator(v),this.addSubmenu("insertLayout",n,v,mxResources.get("layout")),this.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",n,v))})));this.put("table",new Menu(mxUtils.bind(this,
-function(n,v){d.menus.addInsertTableCellItem(n,v)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){d.addInsertMenuItems(n,v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,v){d.addInsertMenuItems(n,v,["fromText","plantUml","mermaid","-","formatSql"]);n.addItem(mxResources.get("csv")+"...",null,function(){t.popupMenuHandler.hideMenu();d.showImportCsvDialog()},
-v,null,u());"min"==uiTheme&&this.addMenuItems(n,["-","createShape","editDiagram"],v)})));this.put("openRecent",new Menu(function(n,v){var D=d.getRecent();if(null!=D){for(var H=0;H<D.length;H++)(function(K){var G=K.mode;G==App.MODE_GOOGLE?G="googleDrive":G==App.MODE_ONEDRIVE&&(G="oneDrive");n.addItem(K.title+" ("+mxResources.get(G)+")",null,function(){d.loadFile(K.id)},v)})(D[H]);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},v)}));this.put("openFrom",new Menu(function(n,
-v){null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
-function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},
-v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},
-v);d.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(H){null!=H&&0<H.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(H):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(H)))},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},v))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=
-d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},v)})),this.put("openLibraryFrom",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+
-"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+
-"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",
-null,function(){d.pickLibrary(App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},v);d.isOffline()||(n.addSeparator(v),
-n.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(H){if(null!=H&&0<H.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var K=H;d.editor.isCorsEnabledForUrl(H)||(K=PROXY_URL+"?url="+encodeURIComponent(H));mxUtils.get(K,function(G){if(200<=G.getStatus()&&299>=G.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,G.getText(),H))}catch(N){d.handleError(N,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
-d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},v));"1"==urlParams.confLib&&(n.addSeparator(v),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},v))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-e=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));e=this.get("viewPanels");var I=e.funct;e.funct=
-function(n,v){I.apply(this,arguments);d.menus.addMenuItems(n,["tags"],v);d.commentsSupported()&&d.menus.addMenuItems(n,["comments"],v)};this.put("view",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP){var D=this.addMenuItem(n,"scratchpad",v);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(n,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",n,v);this.addMenuItems(n,"- scrollbars tooltips ruler - grid guides".split(" "),v);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(n,"shadowVisible",v);this.addMenuItems(n,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),v);"1"!=urlParams.sketch&&this.addMenuItems(n,
-["-","fullscreen"],v)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;e=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();M=!M;d.alert(mxResources.get("restartForChangeRequired"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return M});var E="1"==urlParams.enableStoreBkp;e=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();E=!E});e.setToggleAction(!0);e.setSelectedCallback(function(){return E});d.actions.addAction("openDevTools",function(){d.openDevTools()});
-d.actions.addAction("drafts...",function(){var n=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(v){v=parseInt(v);0<=v&&(EditorUi.draftSaveDelay=1E3*v,EditorUi.enableDrafts=0<v,mxSettings.setDraftSaveDelay(v),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(n.container,320,80,!0,!0);n.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(n,v){var D="sketch"==
-Editor.currentTheme||"1"==urlParams.sketch;if(D||"min"==uiTheme){null==Q||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",n,v);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",n,v);d.menus.addSubmenu("units",n,v);n.addSeparator(v);D||d.menus.addMenuItems(n,["scrollbars","-","tooltips","copyConnect","collapseExpand"],v);"1"==urlParams.embedInline||D||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||d.mode==App.MODE_ATLAS||
-d.menus.addMenuItems(n,["-","showStartScreen","search","scratchpad"],v);n.addSeparator(v);D&&d.menus.addMenuItems(n,["copyConnect","collapseExpand","tooltips","-"],v);EditorUi.isElectronApp&&d.menus.addMenuItems(n,["-","spellCheck","autoBkp","drafts","-"],v);var H=d.getCurrentFile();null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()&&this.addMenuItems(n,["-","showRemoteCursors","shareCursor","-"],v);Graph.translateDiagram&&d.menus.addMenuItems(n,["diagramLanguage"],v);d.mode!=App.MODE_ATLAS&&
-d.menus.addMenuItem(n,"configuration",v);D||!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(n,"plugins",v);n.addSeparator(v)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",n,v),"1"!=urlParams.embed&&this.addSubmenu("theme",n,v),n.addSeparator(v),"undefined"!==typeof MathJax&&(D=this.addMenuItem(n,"mathematicalTypesetting",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/math-typesetting")),
-EditorUi.isElectronApp&&this.addMenuItems(n,["spellCheck","autoBkp","drafts"],v),this.addMenuItems(n,["copyConnect","collapseExpand","-"],v),"1"!=urlParams.embed&&(H=d.getCurrentFile(),null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors","shareCursor"],v),this.addMenuItems(n,["autosave"],v)),n.addSeparator(v),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,"plugins",v),this.addMenuItems(n,["-","editDiagram"],v),Graph.translateDiagram&&this.addMenuItems(n,
-["diagramLanguage"]),n.addSeparator(v),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],v),this.addMenuItems(n,["configuration"],v),n.addSeparator(v),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function K(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(d,function(N){console.log(arguments)},null,
-null,null,"user",function(N,T,V){var U=new Date;U.setDate(U.getDate()-7);d.drive.listFiles(null,U,V?!0:!1,function(X){for(var l=[],B=0;B<X.items.length;B++)l.push(K(X.items[B]));N(l)},T)},function(N,T,V,U){d.drive.listFiles(N,null,U?!0:!1,function(X){for(var l=[],B=0;B<X.items.length;B++)l.push(K(X.items[B]));T(l)},V)},function(N,T,V){d.drive.getFile(N.id,function(U){T(U.data)},V)},null,function(N){N({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
-!0)}),this.addMenuItem(n,"templates",v))})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();d.menus.addSubmenu("extras",n,v,mxResources.get("preferences"));n.addSeparator(v);var H="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(n,"new open - synchronize - save saveAs -".split(" "),v);else if("1"==urlParams.embed||d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
-d.menus.addMenuItems(n,["-","save"],v);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(n,["saveAndExit"],v),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],v);n.addSeparator(v)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(n,["save","synchronize","-"],v):"1"!=urlParams.noFileMenu&&(H?d.menus.addSubmenu("file",n,v):(d.menus.addMenuItems(n,["new"],v),d.menus.addSubmenu("openFrom",
-n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),n.addSeparator(v),null!=D&&(D.constructor==DriveFile&&d.menus.addMenuItems(n,["share"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.constructor==LocalFile||d.menus.addMenuItems(n,["synchronize"],v)),n.addSeparator(v),d.menus.addSubmenu("save",n,v)));d.menus.addSubmenu("exportAs",n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(n,["import"],v):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",n,v);d.menus.addMenuItems(n,
-["-","findReplace"],v);d.commentsSupported()&&d.menus.addMenuItems(n,["comments","-"],v);d.menus.addMenuItems(n,["toggleFormat","layers","tags","-","pageSetup"],v);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(n,["print"],v);H||null==D||null==d.fileNode||"1"==urlParams.embedInline||(D=null!=D.getTitle()?D.getTitle():d.defaultFilename,/(\.html)$/i.test(D)||/(\.svg)$/i.test(D)||this.addMenuItems(n,["-","properties"]));n.addSeparator(v);d.menus.addSubmenu("help",
-n,v);"1"==urlParams.embed||d.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||d.mode==App.MODE_ATLAS)&&d.menus.addMenuItems(n,["-","exit"],v):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(n,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();null!=D&&D.constructor==DriveFile?d.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],v):(d.menus.addMenuItems(n,["save","saveAs","-","rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):d.menus.addMenuItems(n,["makeCopy"],v));d.menus.addMenuItems(n,["-","autosave"],v);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],v)})));this.put("file",new Menu(mxUtils.bind(this,function(n,v){var D="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,v),this.addSubmenu("exportAs",n,v),this.addSubmenu("embed",n,v),"1"==urlParams.libraries&&
-(this.addMenuItems(n,["-"],v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v)),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),this.addMenuItems(n,["-","pageSetup","print","-","rename"],v),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v):(this.addMenuItems(n,["save"],v),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,
-["exit"],v);else if(D){D=d.getCurrentFile();d.menus.addMenuItems(n,["new"],v);d.menus.addSubmenu("openFrom",n,v);isLocalStorage&&this.addSubmenu("openRecent",n,v);n.addSeparator(v);d.menus.addMenuItems(n,["-","save"],v);null!=D&&D.constructor==DriveFile||d.menus.addMenuItems(n,["saveAs"],v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||d.menus.addMenuItems(n,["synchronize"],v);null!=D&&D.constructor==DriveFile?d.menus.addMenuItems(n,"- rename makeCopy - moveToFolder openFolder".split(" "),
-v):(d.menus.addMenuItems(n,["-","rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):d.menus.addMenuItems(n,["makeCopy"],v));null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],v);if(null!=D){if(null!=d.fileNode&&"1"!=urlParams.embedInline){var H=null!=D.getTitle()?D.getTitle():d.defaultFilename;(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&
-this.addMenuItems(n,["properties"],v)}D.constructor==DriveFile&&d.menus.addMenuItems(n,["share"],v)}d.menus.addMenuItems(n,["-","autosave"],v)}else D=this.editorUi.getCurrentFile(),null!=D&&D.constructor==DriveFile?(D.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],v),this.addMenuItems(n,["save","-","share"],v),H=this.addMenuItem(n,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize"),n.addSeparator(v)):
-this.addMenuItems(n,["new"],v),this.addSubmenu("openFrom",n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),null!=D&&D.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),v):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||(n.addSeparator(v),H=this.addMenuItem(n,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize")),
-this.addMenuItems(n,["-","save","saveAs","-"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==D||this.addMenuItems(n,["share","-"],v),this.addMenuItems(n,["rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):(this.addMenuItems(n,["makeCopy"],v),null!=D&&D.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],v))),n.addSeparator(v),this.addSubmenu("importFrom",
-n,v),this.addSubmenu("exportAs",n,v),n.addSeparator(v),this.addSubmenu("embed",n,v),this.addSubmenu("publish",n,v),n.addSeparator(v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(H=null!=D.getTitle()?D.getTitle():d.defaultFilename,(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&
-this.addMenuItems(n,["-","properties"])),this.addMenuItems(n,["-","pageSetup"],v),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],v),this.addMenuItems(n,["-","close"])})));k.prototype.execute=function(){var n=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var v=n.extFonts,D=0;null!=v&&D<v.length;D++){var H=
-document.getElementById("extFont_"+v[D].name);null!=H&&H.parentNode.removeChild(H)}n.extFonts=[];for(D=0;null!=this.previousExtFonts&&D<this.previousExtFonts.length;D++)this.ui.editor.graph.addExtFont(this.previousExtFonts[D].name,this.previousExtFonts[D].url);this.previousExtFonts=v};this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,v){for(var D=mxUtils.bind(this,function(l,B,L,P,O){var R=d.editor.graph;P=this.styleChange(n,P||l,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
-"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[l,null!=B?encodeURIComponent(B):null,null]:[l],null,v,function(){"1"!=urlParams["ext-fonts"]?R.setFont(l,B):(document.execCommand("fontname",!1,l),R.addExtFont(l,B));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[l,null!=B?encodeURIComponent(B):null,null]:[l],"cells",
-[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&R.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(l,B)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",P.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
-function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[l.toLowerCase()];for(var W=0;W<this.customFonts.length;W++)if(this.customFonts[W].name==l&&this.customFonts[W].url==B){this.customFonts.splice(W,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var aa=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=aa&&0<aa.length)for(W=0;W<aa.length;W++)if(aa[W].name==l){aa.splice(W,1);break}var Y=mxUtils.clone(this.customFonts);for(W=0;W<Y.length;W++)if(Y[W].name==
-l){Y.splice(W,1);break}W=new k(this.editorUi,aa,Y);this.editorUi.editor.graph.model.execute(W)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(l,B);P.firstChild.nextSibling.style.fontFamily=l;null!=O&&P.setAttribute("title",O)}),H={},K=0;K<this.defaultFonts.length;K++){var G=this.defaultFonts[K];"string"===typeof G?D(G):null!=G.fontFamily&&null!=G.fontUrl&&(H[encodeURIComponent(G.fontFamily)+"@"+encodeURIComponent(G.fontUrl)]=!0,D(G.fontFamily,G.fontUrl))}n.addSeparator(v);if("1"!=
-urlParams["ext-fonts"]){G=function(l){var B=encodeURIComponent(l.name)+(null==l.url?"":"@"+encodeURIComponent(l.url));if(!H[B]){for(var L=l.name,P=0;null!=T[L.toLowerCase()];)L=l.name+" ("+ ++P+")";null==N[B]&&(V.push({name:l.name,url:l.url,label:L,title:l.url}),T[L.toLowerCase()]=l,N[B]=l)}};var N={},T={},V=[];for(K=0;K<this.customFonts.length;K++)G(this.customFonts[K]);for(var U in Graph.recentCustomFonts)G(Graph.recentCustomFonts[U]);V.sort(function(l,B){return l.label<B.label?-1:l.label>B.label?
-1:0});if(0<V.length){for(K=0;K<V.length;K++)D(V[K].name,V[K].url,!0,V[K].label,V[K].url);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),v);n.addSeparator(v)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){G={};var X=!1;for(K=0;K<this.customFonts.length;K++)G[this.customFonts[K].name]=!0;for(K=0;K<U.length;K++)G[U[K].name]||(this.customFonts.push(U[K]),
-X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(K=0;K<this.customFonts.length;K++)U=this.customFonts[K].name,G=this.customFonts[K].url,D(U,G,!0),this.editorUi.editor.graph.addExtFont(U,G,!0);n.addSeparator(v);n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var l=new k(this.editorUi,[],[]);d.editor.graph.model.execute(l)}),v);n.addSeparator(v)}}n.addItem(mxResources.get("custom")+"...",null,
-mxUtils.bind(this,function(){var l=this.editorUi.editor.graph,B=l.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",P=null;if("1"!=urlParams["ext-fonts"]&&l.isEditing()){var O=l.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(B=Graph.stripQuotes(O.fontFamily),P=Graph.getFontUrl(B,null),null!=P&&(Graph.isGoogleFontUrl(P)?(P=null,L="g"):L="w")))}else O=l.getView().getState(l.getSelectionCell()),null!=O&&(B=O.style[mxConstants.STYLE_FONTFAMILY]||
-B,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?L="g":(L="w",P=O))):(L=O.style.FType||L,"w"==L&&(P=this.editorUi.editor.graph.extFonts,O=null,null!=P&&(O=P.find(function(S){return S.name==B})),P=null!=O?O.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=P&&P.substring(0,PROXY_URL.length)==PROXY_URL&&(P=decodeURIComponent(P.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==l.cellEditor.textarea&&(R=
-l.cellEditor.saveSelection());L=new FontDialog(this.editorUi,B,P,L,mxUtils.bind(this,function(S,W,aa){null!=R&&(l.cellEditor.restoreSelection(R),R=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&l.isEditing())l.setFont(S,W);else{l.getModel().beginUpdate();try{l.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(l.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),l.setCellStyles("fontSource",null!=W?encodeURIComponent(W):null),l.setCellStyles("FType",null)):(l.setCellStyles(mxConstants.STYLE_FONTFAMILY,
-S),"s"!=aa&&(l.setCellStyles("FType",aa),0==W.indexOf("http://")&&(W=PROXY_URL+"?url="+encodeURIComponent(W)),this.editorUi.editor.graph.addExtFont(S,W)));aa=!0;for(var Y=0;Y<this.customFonts.length;Y++)if(this.customFonts[Y].name==S){aa=!1;break}aa&&(this.customFonts.push({name:S,url:W}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{l.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);
-L.init()}),v,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var l=new FeedbackDialog(d);d.showDialog(l.container,610,360,!0,!1);l.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});F=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,
+212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));F=d.actions.addAction("findReplace",mxUtils.bind(this,function(l,q){var B=(l=v.isEnabled()&&(null==q||!mxEvent.isShiftDown(q)))?"findReplace":"find";q=B+"Window";if(null==this[q]){var J=l?"min"==uiTheme?330:300:240;this[q]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,l?"min"==uiTheme?304:288:170,l);this[q].window.addListener("show",function(){d.fireEvent(new mxEventObject(B))});this[q].window.addListener("hide",function(){d.fireEvent(new mxEventObject(B))});
+this[q].window.setVisible(!0)}else this[q].window.setVisible(!this[q].window.isVisible())}),null,null,Editor.ctrlKey+"+F");F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,function(){var l=v.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[l]&&this[l].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var l=null==d.pages||1>=d.pages.length;if(l)d.exportVisio();else{var q=document.createElement("div");q.style.whiteSpace=
+"nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var J=d.addCheckbox(q,mxResources.get("allPages"),!l,l);J.style.marginBottom="16px";l=new CustomDialog(d,q,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
+function(){var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginRight="4px";l.checked=mxSettings.getShowStartScreen();l.defaultChecked=l.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var q=document.createElement("span");q.style["float"]="right";q.style.cursor="pointer";q.style.userSelect="none";q.style.marginTop="-4px";q.appendChild(l);mxUtils.write(q,mxResources.get("showStartScreen"));mxEvent.addListener(q,"click",function(M){mxEvent.getSource(M)!=l&&
+(l.checked=!l.checked)});header=q}var B=localStorage.getItem(Editor.configurationKey);q=[[mxResources.get("reset"),function(M,E){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(L){d.handleError(L)}})},"Shift+Click to Reset Settings"]];var J=d.actions.get("plugins");
+null!=J&&"1"==urlParams.sketch&&q.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||q.push([mxResources.get("share"),function(M,E){if(0<E.value.length)try{var L=JSON.parse(E.value),P=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(L)),S=new EmbedDialog(d,P);d.showDialog(S.container,450,240,!0);S.init()}catch(V){d.handleError(V)}else d.handleError({message:mxResources.get("invalidInput")})}]);q=new TextareaDialog(d,mxResources.get("configuration")+
+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(M){if(null!=M)try{if(null!=l.parentNode&&(mxSettings.setShowStartScreen(l.checked),mxSettings.save()),M==B)d.hideDialog();else{if(0<M.length){var E=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(E))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(L){d.handleError(L)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+q,l.parentNode);d.showDialog(q.container,620,460,!0,!1);q.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(l,q){var B=mxUtils.bind(this,function(M){var E=""==M?mxResources.get("automatic"):mxLanguageMap[M],L=null;""!=E&&(L=l.addItem(E,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
+q),(M==mxLanguage||""==M&&null==mxLanguage)&&l.addCheckmark(L,Editor.checkmarkImage));return L});B("");l.addSeparator(q);for(var J in mxLanguageMap)B(J)})));var e=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var q=e.apply(this,arguments);if(null!=q&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var B=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=B){var J=q.addMenu("",B.funct);J.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
+"theme":"language"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundImage="url("+Editor.globeImage+")";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";J.style.display="inline-block";J.style.verticalAlign="top";J.style.marginLeft="2px";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right=
+"11px",J.style.top="10px"):(J.style.right="14px",J.style.top="5px");"1"==urlParams.winCtrls&&(J.style.right="95px",J.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(J);q.langIcon=J;"1"==urlParams["live-ui"]?(B=mxUtils.bind(this,function(){J.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",B),B()):mxUtils.setOpacity(J,40);this.editorUi.switchThemeElt=
+J}}return q}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var l=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(q){if(0<q.length)try{var B=JSON.parse(q);d.executeLayouts(v.createLayouts(B));d.customLayoutConfig=B;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(q,
+B){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=B.value;B.value=JSON.stringify(JSON.parse(M));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));B.value=M}catch(E){d.handleError(E)}});J.setAttribute("title","copy");J.className="geBtn";q.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(l.container,
+620,460,!0,!0);l.init()});F=this.get("viewZoom");var g=F.funct;F.funct=mxUtils.bind(this,function(l,q){g.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(l,["-","outline","fullscreen"],q)});F=this.get("layout");var p=F.funct;F.funct=function(l,q){p.apply(this,arguments);l.addItem(mxResources.get("orgChart"),null,function(){var B=null,J=20,M=20,E=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=B){var K=d.editor.graph,Q=new mxOrgChartLayout(K,
+B,J,M),N=K.getDefaultParent();1<K.model.getChildCount(K.getSelectionCell())&&(N=K.getSelectionCell());Q.execute(N)}},L=document.createElement("div"),P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,mxResources.get("orgChartType")+": ");L.appendChild(P);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";P=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var V=0;V<P.length;V++){var X=document.createElement("option");mxUtils.write(X,P[V]);X.value=V;2==V&&X.setAttribute("selected","selected");S.appendChild(X)}mxEvent.addListener(S,"change",function(){B=S.value});L.appendChild(S);P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,
+mxResources.get("parentChildSpacing")+": ");L.appendChild(P);var m=document.createElement("input");m.type="number";m.value=J;m.style.width="200px";m.style.boxSizing="border-box";L.appendChild(m);mxEvent.addListener(m,"change",function(){J=m.value});P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,mxResources.get("siblingSpacing")+": ");L.appendChild(P);var z=document.createElement("input");z.type="number";z.value=M;z.style.width=
+"200px";z.style.boxSizing="border-box";L.appendChild(z);mxEvent.addListener(z,"change",function(){M=z.value});L=new CustomDialog(d,L,function(){null==B&&(B=2);d.loadOrgChartLayouts(E)});d.showDialog(L.container,355,140,!0,!0)},q,null,x());l.addSeparator(q);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(v);B.checkOverlap=!0;d.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(J){B.spacing=J;d.executeLayout(function(){B.execute(v.getDefaultParent(),
+v.isSelectionEmpty()?null:v.getSelectionCells())},!1)}))}),q);l.addSeparator(q);d.menus.addMenuItem(l,"runLayout",q,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(l,q){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(l,["about"],q);else{var B=l.addItem("Search:",null,null,q,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";B.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");
+J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(M){var E=mxUtils.trim(J.value);13==M.keyCode&&0<E.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(E)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:E}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
+M.keyCode&&(J.value="")}));B.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(M){document.activeElement!=J&&J.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(l,"- keyboardShortcuts quickStart website support -".split(" "),
+q),"1"!=urlParams.disableUpdate&&this.addMenuItems(l,["check4Updates"],q),this.addMenuItems(l,["openDevTools","-","about"],q)):this.addMenuItems(l,"- keyboardShortcuts quickStart support - about".split(" "),q)}"1"==urlParams.test&&(l.addSeparator(q),this.addSubmenu("testDevelop",l,q))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var l=prompt("Language Code",Graph.diagramLanguage||"");null!=l&&(Graph.diagramLanguage=0<l.length?l:null,
+v.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
+mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!v.isSelectionEmpty()){var l=v.cloneCells(v.getSelectionCells()),q=v.getBoundingBoxFromGeometry(l);l=v.moveCells(l,-q.x,-q.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+q.width+", "+q.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(v.encodeCells(l)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var l=
+v.getGraphBounds(),q=v.view.translate,B=v.view.scale;v.insertVertex(v.getDefaultParent(),null,"",l.x/B-q.x,l.y/B-q.y,l.width/B,l.height/B,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var l=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";l=new TextareaDialog(d,"Paste Data:",l,function(q){if(0<q.length)try{var B=function(P){function S(W){if(null==T[W]){if(T[W]=!0,null!=m[W]){for(;0<m[W].length;){var Z=
+m[W].pop();S(Z)}delete m[W]}}else mxLog.debug(V+": Visited: "+W)}var V=P.parentNode.id,X=P.childNodes;P={};for(var m={},z=null,K={},Q=0;Q<X.length;Q++){var N=X[Q];if(null!=N.id&&0<N.id.length)if(null==P[N.id]){P[N.id]=N.id;var U=N.getAttribute("parent");null==U?null!=z?mxLog.debug(V+": Multiple roots: "+N.id):z=N.id:(null==m[U]&&(m[U]=[]),m[U].push(N.id))}else K[N.id]=N.id}X=Object.keys(K);0<X.length?(X=V+": "+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(V+": Checked");
+var T={};null==z?mxLog.debug(V+": No root"):(S(z),Object.keys(T).length!=Object.keys(P).length&&(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",m)))};"<"!=q.charAt(0)&&(q=Graph.decompress(q),mxLog.debug("See console for uncompressed XML"),console.log("xml",q));var J=mxUtils.parseXml(q),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var E=d.getHashValueForPages(M);mxLog.debug("Checksum: ",E)}catch(P){mxLog.debug("Error: ",P.message)}else mxLog.debug("No pages found for checksum");
+var L=J.getElementsByTagName("root");for(q=0;q<L.length;q++)B(L[q]);mxLog.show()}catch(P){d.handleError(P),null!=window.console&&console.error(P)}});d.showDialog(l.container,620,460,!0,!0);l.init()}));var n=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var l=new TextareaDialog(d,"Diff/Sync:","",function(q){var B=d.getCurrentFile();if(0<q.length&&null!=B)try{var J=JSON.parse(q);B.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,
+null,!0,null,"Patch",null,[["Snapshot",function(q,B){n=d.getPagesForXml(d.getFileData(!0));l.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(n)}],["Diff",function(q,B){try{l.textarea.value=JSON.stringify(d.diffPages(n,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==n?(n=d.getPagesForXml(d.getFileData(!0)),l.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(n)):l.textarea.value=JSON.stringify(d.diffPages(n,
+d.pages),null,2);d.showDialog(l.container,620,460,!0,!0);l.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var l=d.getCurrentFile();console.log("editorUi",d,"file",l);if(null!=l&&l.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(l.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(l.theirPages));console.log("diff ownPages/theirPages",d.diffPages(l.ownPages,l.theirPages));var q=l.getShadowPages();null!=q&&
+(console.log("Checksum shadowPages",d.getHashValueForPages(q)),console.log("diff shadowPages/ownPages",d.diffPages(q,l.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(l.ownPages,q)),console.log("diff theirPages/shadowPages",d.diffPages(l.theirPages,q)));null!=l.sync&&null!=l.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(l.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(l.ownPages,l.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(l.theirPages,
+l.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(l.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(l.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(l.theirPages,d.pages)))}null!=l&&console.log("Shadow pages",[d.getXmlForPages(l.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
+d);var l=d.getCurrentFile();null!=l&&l.isRealtime()&&null!=l.shadowPages&&(console.log("patching actualPages to shadowPages",l.patch([d.diffPages(l.shadowPages,d.pages)])),l.ownPages=d.clonePages(d.pages),l.theirPages=d.clonePages(d.pages),l.shadowPages=d.clonePages(d.pages),null!=l.sync&&(l.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){v.model.beginUpdate();try{var l=v.model.cells,q=0,B=[],J=[],M;for(M in l){var E=l[M],L=v.getCurrentCellStyle(E)[mxConstants.STYLE_IMAGE];
+null!=L&&"data:"==L.substring(0,5)&&(null==B[L]&&(B[L]=(B[L]||0)+1,q++),J.push(E))}v.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",q,"image(s) from",J.length,"cell(s): ",[J,B])}finally{v.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,v.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var l=new mxImageExport,q=v.getGraphBounds(),B=v.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");
+J.appendChild(M);J=new mxXmlCanvas2D(M);J.translate(Math.floor((1-q.x)/B),Math.floor((1-q.y)/B));J.scale(1/B);var E=0,L=J.save;J.save=function(){E++;L.apply(this,arguments)};var P=J.restore;J.restore=function(){E--;P.apply(this,arguments)};var S=l.drawShape;l.drawShape=function(V){mxLog.debug("entering shape",V,E);S.apply(this,arguments);mxLog.debug("leaving shape",V,E)};l.drawState(v.getView().getState(v.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",E)}));
+d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),q)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?
+d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(l){v.isEnabled()&&(l=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),l.vertex=!0,l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,!1),
+l.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",l,function(q,B,J,M,E,L,P,S,V,X,m){d.createHtml(q,B,J,M,E,L,P,S,V,X,m,mxUtils.bind(this,function(z,K){var Q=new EmbedDialog(d,z+"\n"+K,null,null,function(){var N=window.open(),U=N.document;
+if(null!=U){"CSS1Compat"===document.compatMode&&U.writeln("<!DOCTYPE html>");U.writeln("<html>");U.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');U.writeln("<body>");U.writeln(z);var T=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;T&&U.writeln(K);U.writeln("</body>");U.writeln("</html>");U.close();if(!T){var W=N.document.createElement("div");W.marginLeft="26px";W.marginTop="26px";mxUtils.write(W,mxResources.get("updatingDocument"));
+T=N.document.createElement("img");T.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");T.style.marginLeft="6px";W.appendChild(T);N.document.body.insertBefore(W,N.document.body.firstChild);window.setTimeout(function(){var Z=document.createElement("script");Z.type="text/javascript";Z.src=/<script.*?src="(.*?)"/.exec(K)[1];U.body.appendChild(Z);W.parentNode.removeChild(W)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});
+d.showDialog(Q.container,450,240,!0,!0);Q.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var l=d.getCurrentFile();null!=l&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();null!=q?(q=new EmbedDialog(d,'<img src="'+(l.constructor!=DriveFile?q:"https://drive.google.com/uc?id="+l.getId())+'"/>'),d.showDialog(q.container,450,240,!0,!0),q.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));
+d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(l,q,B,J,M,E){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(l,q,B,J,M,E,function(L){d.spinner.stop();L=new EmbedDialog(d,L);d.showDialog(L.container,450,240,!0,!0);L.init()},function(L){d.spinner.stop();d.handleError(L)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){d.showEmbedImageDialog(function(l,q,B,J,M,E){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(l,q,B,J,M,E,function(L){d.spinner.stop();L=new EmbedDialog(d,L);d.showDialog(L.container,450,240,!0,!0);L.init()},function(L){d.spinner.stop();d.handleError(L)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var l=v.getGraphBounds();
+d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(l.height/v.view.scale)+2,function(q,B,J,M,E,L,P,S,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var m=[];V&&m.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+P+";height:"+S+';" src="'+d.createLink(q,B,J,M,E,L,X,null,m)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",
+new Action(mxResources.get("notion")+"...",function(){var l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.textAlign="center";l.style.width="100%";l.style.left="0px";var q=document.createElement("a");q.setAttribute("href","javascript:void(0);");q.setAttribute("target","_blank");q.style.cursor="pointer";mxUtils.write(q,mxResources.get("getNotionChromeExtension"));l.appendChild(q);mxEvent.addListener(q,"click",function(B){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(B)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,J,M,E,L,P,S,V,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(m){d.spinner.stop();var z=["border=0"];X&&z.push("tags=%7B%7D");m=new EmbedDialog(d,d.createLink(B,J,M,E,L,P,m,null,z,!0));d.showDialog(m.container,450,240,!0,!0);m.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",l)}));d.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(l,q,B,J,M,E,L,P,S){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(V){d.spinner.stop();var X=[];S&&X.push("tags=%7B%7D");V=new EmbedDialog(d,d.createLink(l,q,B,J,M,E,V,null,X));d.showDialog(V.container,450,240,!0,!0);V.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});
+d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();l=new GoogleSitesDialog(d,l);d.showDialog(l.container,420,256,!0,!0);l.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)F=d.actions.addAction("scratchpad",
+function(){d.toggleScratchpad()}),F.setToggleAction(!0),F.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});F=d.actions.addAction("search",function(){var l=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!l);isLocalStorage&&(mxSettings.settings.search=!l,mxSettings.save())});F.label=mxResources.get("searchShapes");F.setToggleAction(!0);F.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(d.actions.get("save").funct=function(l){v.isEditing()&&v.stopEditing();var q="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var B=d.createLoadMessage("save");B.xml=q;l&&(B.exit=!0);q=JSON.stringify(B)}(window.opener||window.parent).postMessage(q,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));l=d.getCurrentFile();null==l||l.constructor==
+EmbedFile||l.constructor==LocalFile&&null==l.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var l=function(){d.editor.modified=!1;var q="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
+"";(window.opener||window.parent).postMessage(q,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(l,q){d.isExportToCanvas()?(this.addMenuItems(l,["exportPng"],q),d.jpgSupported&&this.addMenuItems(l,["exportJpg"],q)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPng","exportJpg"],q);this.addMenuItems(l,["exportSvg",
+"-"],q);d.isOffline()||d.printPdfExport?this.addMenuItems(l,["exportPdf"],q):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPdf"],q);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(l,["exportVsdx"],q);this.addMenuItems(l,["-","exportHtml","exportXml","exportUrl"],q);d.isOffline()||(l.addSeparator(q),this.addMenuItem(l,"export",q).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
+function(l,q){function B(E){E.pickFile(function(L){d.spinner.spin(document.body,mxResources.get("loading"))&&E.getFile(L,function(P){var S="data:image/"==P.getData().substring(0,11)?M(P.getTitle()):"text/xml";/\.svg$/i.test(P.getTitle())&&!d.editor.isDataSvg(P.getData())&&(P.setData(Editor.createSvgDataUri(P.getData())),S="image/svg+xml");J(P.getData(),S,P.getTitle())},function(P){d.handleError(P,null!=P?mxResources.get("errorLoadingFile"):null)},E==d.drive)},!0)}var J=mxUtils.bind(this,function(E,
+L,P){var S=v.view,V=v.getGraphBounds(),X=v.snap(Math.ceil(Math.max(0,V.x/S.scale-S.translate.x)+4*v.gridSize)),m=v.snap(Math.ceil(Math.max(0,(V.y+V.height)/S.scale-S.translate.y)+4*v.gridSize));"data:image/"==E.substring(0,11)?d.loadImage(E,mxUtils.bind(this,function(z){var K=!0,Q=mxUtils.bind(this,function(){d.resizeImage(z,E,mxUtils.bind(this,function(N,U,T){N=K?Math.min(1,Math.min(d.maxImageSize/U,d.maxImageSize/T)):1;d.importFile(E,L,X,m,Math.round(U*N),Math.round(T*N),P,function(W){d.spinner.stop();
+v.setSelectionCells(W);v.scrollCellToVisible(v.getSelectionCell())})}),K)});E.length>d.resampleThreshold?d.confirmImageResize(function(N){K=N;Q()}):Q()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(E,L,X,m,0,0,P,function(z){d.spinner.stop();v.setSelectionCells(z);v.scrollCellToVisible(v.getSelectionCell())})}),M=mxUtils.bind(this,function(E){var L="text/xml";/\.png$/i.test(E)?L="image/png":/\.jpe?g$/i.test(E)?L="image/jpg":/\.gif$/i.test(E)?
+L="image/gif":/\.pdf$/i.test(E)&&(L="application/pdf");return L});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){B(d.drive)},q):D&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){B(d.oneDrive)},q):H&&"function"===typeof window.OneDriveClient&&
+l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){B(d.dropbox)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){B(d.gitHub)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+
+"...",null,function(){B(d.gitLab)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){B(d.trello)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},
+q);d.isOffline()||(l.addSeparator(q),l.addItem(mxResources.get("url")+"...",null,function(){var E=new FilenameDialog(d,"",mxResources.get("import"),function(L){if(null!=L&&0<L.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var P=/(\.png)($|\?)/i.test(L)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(L),function(S){J(S,P,L)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==P)}},mxResources.get("url"));
+d.showDialog(E.container,300,80,!0,!0);E.init()},q))}))).isEnabled=x;this.put("appearance",new Menu(mxUtils.bind(this,function(l,q){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(l,["toggleDarkMode"],q);this.addMenuItems(l,["toggleSimpleMode","toggleSketchMode","fullscreen"],q)})));this.put("theme",new Menu(mxUtils.bind(this,function(l,q){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&
+this.addMenuItems(l,["toggleDarkMode"],q);l.addSeparator(q);var J=l.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},q);"kennedy"!=B&&"atlas"!=B&&"dark"!=B&&"min"!=B&&"sketch"!=B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},q);"kennedy"!=B&&"dark"!=B||l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},q);"sketch"==B&&l.addCheckmark(J,
+Editor.checkmarkImage);J=l.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},q);"min"==B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},q);"atlas"==B&&l.addCheckmark(J,Editor.checkmarkImage)})));F=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var l=this.editorUi.getCurrentFile();if(null!=l)if(l.constructor==LocalFile&&null!=l.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,
+function(B,J){l.invalidFileHandle=null;l.fileHandle=B;l.title=J.name;l.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(l.getTitle()));else{var q=null!=l.getTitle()?l.getTitle():this.editorUi.defaultFilename;q=new FilenameDialog(this.editorUi,q,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=l&&B!=l.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&l.rename(B,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,
+function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),l.constructor==DriveFile||l.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(q.container,340,96,!0,!0);q.init()}}));F.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};
+F.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(null!=l){var q=d.getCopyFilename(l);l.constructor==DriveFile?(q=new CreateDialog(d,q,mxUtils.bind(this,function(B,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),B):("download"==J&&(J=App.MODE_GOOGLE),null!=B&&0<B.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&l.saveAs(B,mxUtils.bind(this,function(M){l.desc=M;l.save(!1,mxUtils.bind(this,
+function(){d.spinner.stop();l.setModified(!1);l.addAllSavedStatus()}),mxUtils.bind(this,function(E){d.handleError(E)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(B,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(q.container,420,380,!0,!0),q.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),q)}}));d.actions.put("openFolder",
+new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(l,q){d.appIconClicked(q)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(l.getMode()==App.MODE_GOOGLE||l.getMode()==App.MODE_ONEDRIVE){var q=!1;if(l.getMode()==App.MODE_GOOGLE&&null!=l.desc.parents)for(var B=0;B<l.desc.parents.length;B++)if(l.desc.parents[B].isRoot){q=!0;break}d.pickFolder(l.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&
+l.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,q)}}));this.put("publish",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,["publishLink"],q)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var l=d.getCurrentFile();null!=l&&l.share()}catch(q){d.handleError(q)}}));
+this.put("embed",new Menu(mxUtils.bind(this,function(l,q){var B=d.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(l,["liveImage","-"],q);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],q);navigator.standalone||d.isOffline()||this.addMenuItems(l,["embedIframe"],q);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
+q)})));d.addInsertItem=function(l,q,B,J){("plantUml"!=J||EditorUi.enablePlantUml&&!d.isOffline())&&l.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,B,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,B,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),q,null,x())};var t=function(l){v.getModel().beginUpdate();try{l=v.addCell(l),v.fireEvent(new mxEventObject("cellsInserted",
+"cells",[l]))}finally{v.getModel().endUpdate()}v.scrollCellToVisible(l);v.setSelectionCell(l);v.container.focus();v.editAfterInsert&&v.startEditing(l);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(v.view.getState(l))},0);return l},y=function(l,q,B,J,M){l=new mxCell(l,new mxGeometry(0,0,q,B),J);l.vertex=!0;null==M&&(M=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([l],!0)));l.geometry.x=M.x;l.geometry.y=M.y;return t(l)};d.actions.put("insertText",new Action(mxResources.get("text"),
+function(l){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&v.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=x;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(l){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&y("",
+120,60,"whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action(mxResources.get("note"),function(l){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&y("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(l){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())&&
+y("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint())})).isEnabled=x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(v.isEnabled()&&!v.isCellLocked(v.getDefaultParent())){var q=v.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:v.getInsertPoint();null==l&&(l=v.getCenterInsertPoint(v.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,q,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+B.geometry.setTerminalPoint(l,!0);B.geometry.setTerminalPoint(new mxPoint(l.x+B.geometry.width,l.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;t(B)}},null,null,"C")).isEnabled=x;F=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):(d.hsplitPosition=0==d.hsplitPosition?EditorUi.prototype.hsplitPosition:0,d.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));F.setToggleAction(!0);
+F.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()}));d.addInsertMenuItems=mxUtils.bind(this,function(l,q,B){for(var J=0;J<B.length;J++)"-"==B[J]?l.addSeparator(q):d.addInsertItem(l,q,mxResources.get(B[J])+"...",B[J])});this.put("insert",new Menu(mxUtils.bind(this,function(l,q){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(d.menus.addMenuItems(l,["toggleShapes"],q),d.menus.addSubmenu("table",l,q),l.addSeparator(q),d.insertTemplateEnabled&&
+!d.isOffline()&&d.menus.addMenuItems(l,["insertTemplate"],q),d.menus.addMenuItems(l,["insertImage","insertLink","-"],q),d.menus.addSubmenu("insertAdvanced",l,q,mxResources.get("advanced")),d.menus.addSubmenu("layout",l,q)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),q),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(l,["insertTemplate"],q),l.addSeparator(q),this.addSubmenu("insertLayout",
+l,q,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,q,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",l,q))})));this.put("table",new Menu(mxUtils.bind(this,function(l,q){d.menus.addInsertTableCellItem(l,q)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,q){d.addInsertMenuItems(l,q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(l,
+q){d.addInsertMenuItems(l,q,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){v.popupMenuHandler.hideMenu();d.showImportCsvDialog()},q,null,x());"min"==uiTheme&&this.addMenuItems(l,["-","createShape","editDiagram"],q)})));this.put("openRecent",new Menu(function(l,q){var B=d.getRecent();if(null!=B){for(var J=0;J<B.length;J++)(function(M){var E=M.mode;E==App.MODE_GOOGLE?E="googleDrive":E==App.MODE_ONEDRIVE&&(E="oneDrive");l.addItem(M.title+" ("+
+mxResources.get(E)+")",null,function(){d.loadFile(M.id)},q)})(B[J]);l.addSeparator(q)}l.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},q)}));this.put("openFrom",new Menu(function(l,q){null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},q):D&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+
+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+
+"...",null,function(){d.pickFile(App.MODE_GITHUB)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+
+"...",null,function(){d.pickFile(App.MODE_BROWSER)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},q);d.isOffline()||(l.addSeparator(q),l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},q))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(l,q){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},q):D&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+
+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},q):G&&"function"===
+typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
+q)})),this.put("openLibraryFrom",new Menu(function(l,q){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},q):D&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},q):H&&
+"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},
+q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},
+q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},q);d.isOffline()||(l.addSeparator(q),l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(E){if(200<=E.getStatus()&&299>=E.getStatus()){d.spinner.stop();
+try{d.loadLibrary(new UrlLibrary(this,E.getText(),J))}catch(L){d.handleError(L,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},q));"1"==urlParams.confLib&&(l.addSeparator(q),l.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},
+q))})));this.put("edit",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));F=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
+function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var l=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(l);this.commentsWindow.refreshCommentsTime();l&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));F=this.get("viewPanels");var A=F.funct;F.funct=function(l,q){A.apply(this,arguments);d.menus.addMenuItems(l,["tags"],q);d.commentsSupported()&&d.menus.addMenuItems(l,["comments"],q)};this.put("view",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,(null!=
+this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(l,["-","search"],q);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(l,"scratchpad",q);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(l,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",l,q);this.addMenuItems(l,"- scrollbars tooltips ruler - grid guides".split(" "),
+q);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(l,"shadowVisible",q);this.addMenuItems(l,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),q);"1"!=urlParams.sketch&&this.addMenuItems(l,["-","fullscreen"],q)})));if(EditorUi.isElectronApp){var C="1"==urlParams.enableSpellCheck;F=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();C=!C;d.alert(mxResources.get("restartForChangeRequired"))});F.setToggleAction(!0);F.setSelectedCallback(function(){return C});
+var u="1"==urlParams.enableStoreBkp;F=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();u=!u});F.setToggleAction(!0);F.setSelectedCallback(function(){return u});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var l=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(q){q=parseInt(q);0<=q&&(EditorUi.draftSaveDelay=1E3*q,EditorUi.enableDrafts=0<q,mxSettings.setDraftSaveDelay(q),
+mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(l.container,320,80,!0,!0);l.init()})}var R=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(l,q){var B="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(B||"min"==uiTheme){null==R||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",l,q);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",l,q);d.menus.addSubmenu("units",
+l,q);l.addSeparator(q);B||d.menus.addMenuItems(l,["scrollbars","-","tooltips","copyConnect","collapseExpand"],q);"1"==urlParams.embedInline||B||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||d.mode==App.MODE_ATLAS||d.menus.addMenuItems(l,["-","showStartScreen","search","scratchpad"],q);l.addSeparator(q);B&&d.menus.addMenuItems(l,["copyConnect","collapseExpand","tooltips","-"],q);EditorUi.isElectronApp&&d.menus.addMenuItems(l,["-","spellCheck","autoBkp","drafts","-"],q);var J=d.getCurrentFile();
+null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["-","showRemoteCursors","shareCursor","-"],q);Graph.translateDiagram&&d.menus.addMenuItems(l,["diagramLanguage"],q);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(l,"configuration",q);B||!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(l,"plugins",q);l.addSeparator(q)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",l,q),"1"!=urlParams.embed&&this.addSubmenu("theme",l,
+q),l.addSeparator(q),"undefined"!==typeof MathJax&&(B=this.addMenuItem(l,"mathematicalTypesetting",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(l,["spellCheck","autoBkp","drafts"],q),this.addMenuItems(l,["copyConnect","collapseExpand","-"],q),"1"!=urlParams.embed&&(J=d.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,
+["showRemoteCursors","shareCursor"],q),this.addMenuItems(l,["autosave"],q)),l.addSeparator(q),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",q),this.addMenuItems(l,["-","editDiagram"],q),Graph.translateDiagram&&this.addMenuItems(l,["diagramLanguage"]),l.addSeparator(q),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],q),this.addMenuItems(l,["configuration"],q),l.addSeparator(q),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",
+function(){function M(L){return{id:L.id,isExt:!0,url:L.downloadUrl,title:L.title,imgUrl:L.thumbnailLink,changedBy:L.lastModifyingUserName,lastModifiedOn:L.modifiedDate}}var E=new TemplatesDialog(d,function(L){console.log(arguments)},null,null,null,"user",function(L,P,S){var V=new Date;V.setDate(V.getDate()-7);d.drive.listFiles(null,V,S?!0:!1,function(X){for(var m=[],z=0;z<X.items.length;z++)m.push(M(X.items[z]));L(m)},P)},function(L,P,S,V){d.drive.listFiles(L,null,V?!0:!1,function(X){for(var m=[],
+z=0;z<X.items.length;z++)m.push(M(X.items[z]));P(m)},S)},function(L,P,S){d.drive.getFile(L.id,function(V){P(V.data)},S)},null,function(L){L({Test:[]},1)},!0,!1);d.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(l,"templates",q))})));this.put("diagram",new Menu(mxUtils.bind(this,function(l,q){var B=d.getCurrentFile();d.menus.addSubmenu("extras",l,q,mxResources.get("preferences"));l.addSeparator(q);var J="sketch"==Editor.currentTheme||"1"==urlParams.sketch;
+if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(l,"new open - synchronize - save saveAs -".split(" "),q);else if("1"==urlParams.embed||d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(l,["-","save"],q);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(l,["saveAndExit"],q),null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["revisionHistory"],
+q);l.addSeparator(q)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(l,["save","synchronize","-"],q):"1"!=urlParams.noFileMenu&&(J?d.menus.addSubmenu("file",l,q):(d.menus.addMenuItems(l,["new"],q),d.menus.addSubmenu("openFrom",l,q),isLocalStorage&&this.addSubmenu("openRecent",l,q),l.addSeparator(q),null!=B&&(B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],q),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.constructor==LocalFile||d.menus.addMenuItems(l,["synchronize"],q)),l.addSeparator(q),
+d.menus.addSubmenu("save",l,q)));d.menus.addSubmenu("exportAs",l,q);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(l,["import"],q):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",l,q);d.menus.addMenuItems(l,["-","findReplace"],q);d.commentsSupported()&&d.menus.addMenuItems(l,["comments","-"],q);d.menus.addMenuItems(l,["format","layers","tags","-","pageSetup"],q);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(l,["print"],q);J||
+null==B||null==d.fileNode||"1"==urlParams.embedInline||(B=null!=B.getTitle()?B.getTitle():d.defaultFilename,/(\.html)$/i.test(B)||/(\.svg)$/i.test(B)||this.addMenuItems(l,["-","properties"]));l.addSeparator(q);d.menus.addSubmenu("help",l,q);"1"==urlParams.embed||d.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||d.mode==App.MODE_ATLAS)&&d.menus.addMenuItems(l,["-","exit"],q):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(l,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(l,q){var B=
+d.getCurrentFile();null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,["save","makeCopy","-","rename","moveToFolder"],q):(d.menus.addMenuItems(l,["save","saveAs","-","rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):d.menus.addMenuItems(l,["makeCopy"],q));d.menus.addMenuItems(l,["-","autosave"],q);null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["-","revisionHistory"],q)})));this.put("file",new Menu(mxUtils.bind(this,
+function(l,q){var B="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",l,q),this.addSubmenu("exportAs",l,q),this.addSubmenu("embed",l,q),"1"==urlParams.libraries&&(this.addMenuItems(l,["-"],q),this.addSubmenu("newLibrary",l,q),this.addSubmenu("openLibraryFrom",l,q)),d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],q),this.addMenuItems(l,["-","pageSetup","print","-","rename"],q),"1"!=urlParams.embedInline&&
+("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],q):(this.addMenuItems(l,["save"],q),"1"==urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],q))),"1"!=urlParams.noExitBtn&&this.addMenuItems(l,["exit"],q);else if(B){B=d.getCurrentFile();d.menus.addMenuItems(l,["new"],q);d.menus.addSubmenu("openFrom",l,q);isLocalStorage&&this.addSubmenu("openRecent",l,q);l.addSeparator(q);d.menus.addMenuItems(l,["-","save"],q);null!=B&&B.constructor==DriveFile||d.menus.addMenuItems(l,
+["saveAs"],q);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||d.menus.addMenuItems(l,["synchronize"],q);null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,"- rename makeCopy - moveToFolder openFolder".split(" "),q):(d.menus.addMenuItems(l,["-","rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):d.menus.addMenuItems(l,["makeCopy"],q));null!=B&&B.isRevisionHistorySupported()&&
+d.menus.addMenuItems(l,["-","revisionHistory"],q);if(null!=B){if(null!=d.fileNode&&"1"!=urlParams.embedInline){var J=null!=B.getTitle()?B.getTitle():d.defaultFilename;(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(l,["properties"],q)}B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],q)}d.menus.addMenuItems(l,["-","autosave"],q)}else B=this.editorUi.getCurrentFile(),null!=B&&B.constructor==DriveFile?(B.isRestricted()&&
+this.addMenuItems(l,["exportOptionsDisabled"],q),this.addMenuItems(l,["save","-","share"],q),J=this.addMenuItem(l,"synchronize",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize"),l.addSeparator(q)):this.addMenuItems(l,["new"],q),this.addSubmenu("openFrom",l,q),isLocalStorage&&this.addSubmenu("openRecent",l,q),null!=B&&B.constructor==DriveFile?this.addMenuItems(l,"new - rename makeCopy openFolder moveToFolder".split(" "),
+q):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(l.addSeparator(q),J=this.addMenuItem(l,"synchronize",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(l,["-","save","saveAs","-"],q),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==B||this.addMenuItems(l,["share","-"],q),this.addMenuItems(l,
+["rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):(this.addMenuItems(l,["makeCopy"],q),null!=B&&B.constructor==OneDriveFile&&this.addMenuItems(l,["moveToFolder"],q))),l.addSeparator(q),this.addSubmenu("importFrom",l,q),this.addSubmenu("exportAs",l,q),l.addSeparator(q),this.addSubmenu("embed",l,q),this.addSubmenu("publish",l,q),l.addSeparator(q),this.addSubmenu("newLibrary",l,q),this.addSubmenu("openLibraryFrom",l,q),
+d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],q),null!=B&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=B.getTitle()?B.getTitle():d.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(l,["-","properties"])),this.addMenuItems(l,["-","pageSetup"],q),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["print"],q),this.addMenuItems(l,["-","close"])})));k.prototype.execute=
+function(){var l=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var q=l.extFonts,B=0;null!=q&&B<q.length;B++){var J=document.getElementById("extFont_"+q[B].name);null!=J&&J.parentNode.removeChild(J)}l.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,
+this.previousExtFonts[B].url);this.previousExtFonts=q};this.put("fontFamily",new Menu(mxUtils.bind(this,function(l,q){for(var B=mxUtils.bind(this,function(m,z,K,Q,N){var U=d.editor.graph;Q=this.styleChange(l,Q||m,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],null,q,function(){"1"!=urlParams["ext-fonts"]?U.setFont(m,z):(document.execCommand("fontname",!1,m),U.addExtFont(m,
+z));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],"cells",[U.cellEditor.getEditingCell()]))},function(){U.updateLabelElements(U.getSelectionCells(),function(T){T.removeAttribute("face");T.style.fontFamily=null;"PRE"==T.nodeName&&U.replaceElement(T,"div")});"1"==urlParams["ext-fonts"]&&U.addExtFont(m,
+z)});K&&(K=document.createElement("span"),K.className="geSprite geSprite-delete",K.style.cursor="pointer",K.style.display="inline-block",Q.firstChild.nextSibling.nextSibling.appendChild(K),mxEvent.addListener(K,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(T){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[m.toLowerCase()];for(var W=0;W<this.customFonts.length;W++)if(this.customFonts[W].name==m&&this.customFonts[W].url==z){this.customFonts.splice(W,1);d.fireEvent(new mxEventObject("customFontsChanged"));
+break}}else{var Z=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Z&&0<Z.length)for(W=0;W<Z.length;W++)if(Z[W].name==m){Z.splice(W,1);break}var ca=mxUtils.clone(this.customFonts);for(W=0;W<ca.length;W++)if(ca[W].name==m){ca.splice(W,1);break}W=new k(this.editorUi,Z,ca);this.editorUi.editor.graph.model.execute(W)}this.editorUi.hideCurrentMenu();mxEvent.consume(T)})));Graph.addFont(m,z);Q.firstChild.nextSibling.style.fontFamily=m;null!=N&&Q.setAttribute("title",N)}),J={},M=0;M<this.defaultFonts.length;M++){var E=
+this.defaultFonts[M];"string"===typeof E?B(E):null!=E.fontFamily&&null!=E.fontUrl&&(J[encodeURIComponent(E.fontFamily)+"@"+encodeURIComponent(E.fontUrl)]=!0,B(E.fontFamily,E.fontUrl))}l.addSeparator(q);if("1"!=urlParams["ext-fonts"]){E=function(m){var z=encodeURIComponent(m.name)+(null==m.url?"":"@"+encodeURIComponent(m.url));if(!J[z]){for(var K=m.name,Q=0;null!=P[K.toLowerCase()];)K=m.name+" ("+ ++Q+")";null==L[z]&&(S.push({name:m.name,url:m.url,label:K,title:m.url}),P[K.toLowerCase()]=m,L[z]=m)}};
+var L={},P={},S=[];for(M=0;M<this.customFonts.length;M++)E(this.customFonts[M]);for(var V in Graph.recentCustomFonts)E(Graph.recentCustomFonts[V]);S.sort(function(m,z){return m.label<z.label?-1:m.label>z.label?1:0});if(0<S.length){for(M=0;M<S.length;M++)B(S[M].name,S[M].url,!0,S[M].label,S[M].url);l.addSeparator(q)}l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),q);l.addSeparator(q)}else{V=
+this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){E={};var X=!1;for(M=0;M<this.customFonts.length;M++)E[this.customFonts[M].name]=!0;for(M=0;M<V.length;M++)E[V[M].name]||(this.customFonts.push(V[M]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=0;M<this.customFonts.length;M++)V=this.customFonts[M].name,E=this.customFonts[M].url,B(V,E,!0),this.editorUi.editor.graph.addExtFont(V,E,!0);l.addSeparator(q);
+l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var m=new k(this.editorUi,[],[]);d.editor.graph.model.execute(m)}),q);l.addSeparator(q)}}l.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var m=this.editorUi.editor.graph,z=m.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],K="s",Q=null;if("1"!=urlParams["ext-fonts"]&&m.isEditing()){var N=m.getSelectedEditingElement();null!=N&&(N=mxUtils.getCurrentStyle(N),null!=N&&(z=Graph.stripQuotes(N.fontFamily),
+Q=Graph.getFontUrl(z,null),null!=Q&&(Graph.isGoogleFontUrl(Q)?(Q=null,K="g"):K="w")))}else N=m.getView().getState(m.getSelectionCell()),null!=N&&(z=N.style[mxConstants.STYLE_FONTFAMILY]||z,"1"!=urlParams["ext-fonts"]?(N=N.style.fontSource,null!=N&&(N=decodeURIComponent(N),Graph.isGoogleFontUrl(N)?K="g":(K="w",Q=N))):(K=N.style.FType||K,"w"==K&&(Q=this.editorUi.editor.graph.extFonts,N=null,null!=Q&&(N=Q.find(function(T){return T.name==z})),Q=null!=N?N.url:mxResources.get("urlNotFound",null,"URL not found"))));
+null!=Q&&Q.substring(0,PROXY_URL.length)==PROXY_URL&&(Q=decodeURIComponent(Q.substr((PROXY_URL+"?url=").length)));var U=null;document.activeElement==m.cellEditor.textarea&&(U=m.cellEditor.saveSelection());K=new FontDialog(this.editorUi,z,Q,K,mxUtils.bind(this,function(T,W,Z){null!=U&&(m.cellEditor.restoreSelection(U),U=null);if(null!=T&&0<T.length)if("1"!=urlParams["ext-fonts"]&&m.isEditing())m.setFont(T,W);else{m.getModel().beginUpdate();try{m.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+T),m.setCellStyles("fontSource",null!=W?encodeURIComponent(W):null),m.setCellStyles("FType",null)):(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,T),"s"!=Z&&(m.setCellStyles("FType",Z),0==W.indexOf("http://")&&(W=PROXY_URL+"?url="+encodeURIComponent(W)),this.editorUi.editor.graph.addExtFont(T,W)));Z=!0;for(var ca=0;ca<this.customFonts.length;ca++)if(this.customFonts[ca].name==T){Z=!1;break}Z&&(this.customFonts.push({name:T,url:W}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
+this.customFonts)))}finally{m.getModel().endUpdate()}}}));this.editorUi.showDialog(K.container,380,Editor.enableWebFonts?250:180,!0,!0);K.init()}),q,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,f,k){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=k&&(f.viewState=k,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,d=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,d);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,f,k,d,t){SelectPage.call(this,b,k);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=t}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,f,k,d,v){SelectPage.call(this,b,k);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=v}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){f=k;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var k=0;k<f.length;k++)if(f[k].getId()==b)return f[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,k){var d=b.indexOf(","),t=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(t=this.getImageForPage(d,f,k),t.originalSrc=b));null==t&&(t={originalSrc:b});return t};
-EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,t=this.createTemporaryGraph(k.getStylesheet());t.defaultPageBackgroundColor=k.defaultPageBackgroundColor;t.shapeBackgroundColor=k.shapeBackgroundColor;t.shapeForegroundColor=k.shapeForegroundColor;var u=this.getPageIndex(null!=f?f:this.currentPage);t.getGlobalVariable=function(F){return"pagenumber"==F?u+1:"page"==F&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(t.container);
-this.updatePageRoot(b);t.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=t.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var C=t.getGraphBounds();document.body.removeChild(t.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),C.width,C.height,C.x,C.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var t=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";t!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var t=this.currentPage;null!=t&&t!=k&&(null==t.viewState||null==t.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+t.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+t.viewState.scrollTop),k=t);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,
-u){t=u.getProperty("edit").changes;for(u=0;u<t.length;u++)if(t[u]instanceof SelectPage||t[u]instanceof RenamePage||t[u]instanceof MovePage||t[u]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.createImageForPageLink=function(b,f,k){var d=b.indexOf(","),v=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(v=this.getImageForPage(d,f,k),v.originalSrc=b));null==v&&(v={originalSrc:b});return v};
+EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,v=this.createTemporaryGraph(k.getStylesheet());v.defaultPageBackgroundColor=k.defaultPageBackgroundColor;v.shapeBackgroundColor=k.shapeBackgroundColor;v.shapeForegroundColor=k.shapeForegroundColor;var x=this.getPageIndex(null!=f?f:this.currentPage);v.getGlobalVariable=function(G){return"pagenumber"==G?x+1:"page"==G&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(v.container);
+this.updatePageRoot(b);v.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=v.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var D=v.getGraphBounds();document.body.removeChild(v.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),D.width,D.height,D.x,D.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var v=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";v!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var v=this.currentPage;null!=v&&v!=k&&(null==v.viewState||null==v.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+v.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+v.viewState.scrollTop),k=v);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,
+x){v=x.getProperty("edit").changes;for(x=0;x<v.length;x++)if(v[x]instanceof SelectPage||v[x]instanceof RenamePage||v[x]instanceof MovePage||v[x]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),u=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(J){J=J.split("^");return{name:J[0],url:J[1]}})}catch(J){console.log("ExtFonts format error: "+J.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=u&&0<u.length?u:null,backgroundImage:C,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,d,t),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:F||[]}};
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),D=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:D,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,d,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
Graph.prototype.saveViewState=function(b,f,k,d){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
-JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(t){return t.name+"^"+t.url}).join("|"))};
+JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(v){return v.name+"^"+v.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
@@ -12490,220 +12493,219 @@ this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.conn
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var t=document.createElement("style");t.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));t.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(t)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(t=0;t<k.length;t++)if(k[t].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}};
+Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var v=document.createElement("style");v.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));v.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(v)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(v=0;v<k.length;v++)if(k[v].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}};
EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var k=Editor.extractParserError(f);if(k)throw Error(k);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),k=new mxCodec(f.ownerDocument),b.root=k.decode(f).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(f))throw Error(k);null!=f&&(b.graphModelNode=
f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var t=new SelectPage(this,b,k);t.execute();d.add(t);d.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(u){this.handleError(u)}};
+EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var v=new SelectPage(this,b,k);v.execute();d.add(v);d.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(x){this.handleError(x)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var k=this.pages[f].getName();null!=k&&0<k.length&&(b[k]=k)}f=this.pages.length;do k=mxResources.get("pageWithNumber",[++f]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(t){this.handleError(t)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var u={},C=d.createCellLookup([d.model.root]);k=new DiagramPage(t);k.root=d.cloneCell(d.model.root,null,u);var F=new mxGraphModel;F.prefix=Editor.guid()+"-";F.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(u,C),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(J){this.handleError(J)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
+EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(v){this.handleError(v)}return b};
+EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var x={},D=d.createCellLookup([d.model.root]);k=new DiagramPage(v);k.root=d.cloneCell(d.model.root,null,x);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(x,D),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(H){this.handleError(H)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
EditorUi.prototype.clonePages=function(b){for(var f=[],k=0;k<b.length;k++)f.push(this.clonePage(b[k]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),t=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(c,e){this.pages[c]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),t=c):mxEvent.consume(g)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(g){t=null;g.stopPropagation();
-g.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(g){null!=t&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(g){null!=t&&c!=t&&this.movePage(t,c);g.stopPropagation();g.preventDefault()}));f.appendChild(e)})(u,this.createTabForPage(this.pages[u],d,this.pages[u]!=this.currentPage,u+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var C=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");C.style.position="absolute";C.style.right=this.editor.chromeless?"29px":"55px";C.style.fontSize="13pt";this.tabContainer.appendChild(C);var F=this.createControlTab(4,"&nbsp;&#10095;");F.style.position="absolute";
-F.style.right=this.editor.chromeless?"0px":"29px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var J=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=J+"px";mxEvent.addListener(C,"click",mxUtils.bind(this,function(c){f.scrollLeft-=Math.max(20,J-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}));mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,
-f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(F,"click",mxUtils.bind(this,function(c){f.scrollLeft+=Math.max(20,J-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+1),v=null,x=0;x<this.pages.length;x++)mxUtils.bind(this,function(I,F){this.pages[I]==this.currentPage?(F.className="geActivePage",F.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):F.className="geInactivePage";F.setAttribute("draggable","true");mxEvent.addListener(F,"dragstart",mxUtils.bind(this,function(O){b.isEnabled()?(mxClient.IS_FF&&O.dataTransfer.setData("Text","<diagram/>"),v=I):mxEvent.consume(O)}));mxEvent.addListener(F,"dragend",mxUtils.bind(this,function(O){v=null;O.stopPropagation();
+O.preventDefault()}));mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null!=v&&(O.dataTransfer.dropEffect="move");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=v&&I!=v&&this.movePage(v,I);O.stopPropagation();O.preventDefault()}));f.appendChild(F)})(x,this.createTabForPage(this.pages[x],d,this.pages[x]!=this.currentPage,x+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
+d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var D=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");D.style.position="absolute";D.style.right=this.editor.chromeless?"29px":"55px";D.style.fontSize="13pt";this.tabContainer.appendChild(D);var G=this.createControlTab(4,"&nbsp;&#10095;");G.style.position="absolute";
+G.style.right=this.editor.chromeless?"0px":"29px";G.style.fontSize="13pt";this.tabContainer.appendChild(G);var H=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=H+"px";mxEvent.addListener(D,"click",mxUtils.bind(this,function(I){f.scrollLeft-=Math.max(20,H-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(I)}));mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,
+f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(G,"click",mxUtils.bind(this,function(I){f.scrollLeft+=Math.max(20,H-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(I)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor=
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(k){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return f};
EditorUi.prototype.createControlTab=function(b,f,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=f;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var t=new mxPopupMenu(mxUtils.bind(this,function(F,J){var c=mxUtils.bind(this,function(){for(var p=0;p<this.pages.length;p++)mxUtils.bind(this,function(q){var z=F.addItem(this.getShortPageName(this.pages[q]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[q])}),J),y=this.pages[q].getId();z.setAttribute("title",this.pages[q].getName()+" ("+(q+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[q]==this.currentPage&&F.addCheckmark(z,Editor.checkmarkImage)})(p)}),e=mxUtils.bind(this,
-function(){F.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),J)});f||c();if(this.editor.graph.isEnabled()){f||(F.addSeparator(J),e());var g=this.currentPage;if(null!=g){F.addSeparator(J);var m=this.getShortPageName(g);F.addItem(mxResources.get("removeIt",[m]),null,mxUtils.bind(this,function(){this.removePage(g)}),J);F.addItem(mxResources.get("renameIt",[m]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),J);f||F.addSeparator(J);F.addItem(mxResources.get("duplicateIt",
-[m]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),J)}}f&&(F.addSeparator(J),e(),F.addSeparator(J),c())}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var u=mxEvent.getClientX(d),C=mxEvent.getClientY(d);t.popup(u,C,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));return b};
+var v=new mxPopupMenu(mxUtils.bind(this,function(G,H){var I=mxUtils.bind(this,function(){for(var e=0;e<this.pages.length;e++)mxUtils.bind(this,function(g){var p=G.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),H),n=this.pages[g].getId();p.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=n?" ["+n+"]":""));this.pages[g]==this.currentPage&&G.addCheckmark(p,Editor.checkmarkImage)})(e)}),F=mxUtils.bind(this,
+function(){G.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),H)});f||I();if(this.editor.graph.isEnabled()){f||(G.addSeparator(H),F());var O=this.currentPage;if(null!=O){G.addSeparator(H);var c=this.getShortPageName(O);G.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(O)}),H);G.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(O,O.getName())}),H);f||G.addSeparator(H);G.addItem(mxResources.get("duplicateIt",
+[c]),null,mxUtils.bind(this,function(){this.duplicatePage(O,mxResources.get("copyOf",[O.getName()]))}),H)}}f&&(G.addSeparator(H),F(),G.addSeparator(H),I())}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});var x=mxEvent.getClientX(d),D=mxEvent.getClientY(d);v.popup(x,D,null,d);this.setCurrentMenu(v);mxEvent.consume(d)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,f,k,d){k=this.createTab(k);var t=b.getName()||mxResources.get("untitled"),u=b.getId();k.setAttribute("title",t+(null!=u?" ("+u+")":"")+" ["+d+"]");mxUtils.write(k,t);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(u){this.renamePage(b);mxEvent.consume(u)}));var d=!1,t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(u){d=null!=this.currentMenu;t=b==this.currentPage;k.isMouseDown||t||this.selectPage(b)}),null,mxUtils.bind(this,function(u){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(u)&&t||mxEvent.isPopupTrigger(u))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!d){var C=new mxPopupMenu(this.createPageMenu(b));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);this.resetCurrentMenu();C.destroy()});var F=mxEvent.getClientX(u),J=mxEvent.getClientY(u);C.popup(F,J,null,u);this.setCurrentMenu(C,f)}mxEvent.consume(u)}}))};
-EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var t=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));t+=(0==t.length?"?":"&")+"page-id="+b.getId();null!=f&&(t+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+t+"#"+d.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,d){var t=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(u,C,F,J,c,e){u=this.createUrlParameters(u,C,F,J,c,e);F||u.push("hide-pages=1");t.isSelectionEmpty()||(F=t.getBoundingBox(t.getSelectionCells()),C=t.view.translate,c=t.view.scale,F.width/=c,F.height/=c,F.x=F.x/c-C.x,F.y=F.y/c-C.y,u.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(F.x),y:Math.round(F.y),width:Math.round(F.width),height:Math.round(F.height),border:100}))));
-J=new EmbedDialog(this,this.getLinkForPage(b,u,J));this.showDialog(J.container,450,240,!0,!0);J.init()}))})));k.addSeparator(d);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(d),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+EditorUi.prototype.createTabForPage=function(b,f,k,d){k=this.createTab(k);var v=b.getName()||mxResources.get("untitled"),x=b.getId();k.setAttribute("title",v+(null!=x?" ("+x+")":"")+" ["+d+"]");mxUtils.write(k,v);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(x){this.renamePage(b);mxEvent.consume(x)}));var d=!1,v=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(x){d=null!=this.currentMenu;v=b==this.currentPage;k.isMouseDown||v||this.selectPage(b)}),null,mxUtils.bind(this,function(x){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(x)&&v||mxEvent.isPopupTrigger(x))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!d){var D=new mxPopupMenu(this.createPageMenu(b));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);D.popup(G,H,null,x);this.setCurrentMenu(D,f)}mxEvent.consume(x)}}))};
+EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var v=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));v+=(0==v.length?"?":"&")+"page-id="+b.getId();null!=f&&(v+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+v+"#"+d.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,d){var v=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(x,D,G,H,I,F){x=this.createUrlParameters(x,D,G,H,I,F);G||x.push("hide-pages=1");v.isSelectionEmpty()||(G=v.getBoundingBox(v.getSelectionCells()),D=v.view.translate,I=v.view.scale,G.width/=I,G.height/=I,G.x=G.x/I-D.x,G.y=G.y/I-D.y,x.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(G.x),y:Math.round(G.y),width:Math.round(G.width),height:Math.round(G.height),border:100}))));
+H=new EmbedDialog(this,this.getLinkForPage(b,x,H));this.showDialog(H.container,450,240,!0,!0);H.init()}))})));k.addSeparator(d);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(d),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(t,u){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?u:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root,
-d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var t=k.ownerDocument.createElement("diagram");t.setAttribute("id",k.getAttribute("relatedPage"));t.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=k.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),k.removeAttribute("viewState"));k=k.cloneNode(!0);t=k.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,
-!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var u=t.getAttribute("id");null==f.lookup(u)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,u,C,F){t=null!=t?t:!1;null==u&&(u=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var J=u.slice(),c=0;c<u.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(u[c]),"treeFolding","0")&&this.foldTreeCell(d,u[c]);u=J;u=b.apply(this,arguments)}finally{this.model.endUpdate()}return u};Graph.prototype.foldTreeCell=
-function(d,t){this.model.beginUpdate();try{var u=[];this.traverse(t,!0,mxUtils.bind(this,function(F,J){var c=null!=J&&this.isTreeEdge(J);c&&u.push(J);F==t||null!=J&&!c||u.push(F);return(null==J||c)&&(F==t||!this.model.isCollapsed(F))}));this.model.setCollapsed(t,d);for(var C=0;C<u.length;C++)this.model.setVisible(u[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,u,C,F,J){return this.model.filterCells(this.getEdges(d,
-t,u,C,F,J),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};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 d(G){return z.isVertex(G)&&u(G)}function t(G){var N=
-!1;null!=G&&(N="1"==q.getCurrentCellStyle(G).treeMoving);return N}function u(G){var N=!1;null!=G&&(G=z.getParent(G),N=q.view.getState(G),N="tree"==(null!=N?N.style:q.getCellStyle(G)).containerType);return N}function C(G){var N=!1;null!=G&&(G=z.getParent(G),N=q.view.getState(G),q.view.getState(G),N=null!=(null!=N?N.style:q.getCellStyle(G)).childLayout);return N}function F(G){G=q.view.getState(G);if(null!=G){var N=q.getIncomingTreeEdges(G.cell);if(0<N.length&&(N=q.view.getState(N[0]),null!=N&&(N=N.absolutePoints,
-null!=N&&0<N.length&&(N=N[N.length-1],null!=N)))){if(N.y==G.y&&Math.abs(N.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_SOUTH;if(N.y==G.y+G.height&&Math.abs(N.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_NORTH;if(N.x>G.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function J(G,N){N=null!=N?N:!0;q.model.beginUpdate();try{var T=q.model.getParent(G),V=q.getIncomingTreeEdges(G),U=q.cloneCells([V[0],G]);q.model.setTerminal(U[0],q.model.getTerminal(V[0],
-!0),!0);var X=F(G),l=T.geometry;X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=N?G.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=N?G.geometry.height+10:-U[1].geometry.height-10;q.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var B=q.view.getState(G),L=q.view.scale;if(null!=B){var P=mxRectangle.fromRectangle(B);X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?P.x+=(N?G.geometry.width+10:-U[1].geometry.width-10)*L:P.y+=(N?
-G.geometry.height+10:-U[1].geometry.height-10)*L;var O=q.getOutgoingTreeEdges(q.model.getTerminal(V[0],!0));if(null!=O){for(var R=X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH,S=l=V=0;S<O.length;S++){var W=q.model.getTerminal(O[S],!1);if(X==F(W)){var aa=q.view.getState(W);W!=G&&null!=aa&&(R&&N!=aa.getCenterX()<B.getCenterX()||!R&&N!=aa.getCenterY()<B.getCenterY())&&mxUtils.intersects(P,aa)&&(V=10+Math.max(V,(Math.min(P.x+P.width,aa.x+aa.width)-Math.max(P.x,aa.x))/L),l=10+Math.max(l,
-(Math.min(P.y+P.height,aa.y+aa.height)-Math.max(P.y,aa.y))/L))}}R?l=0:V=0;for(S=0;S<O.length;S++)if(W=q.model.getTerminal(O[S],!1),X==F(W)&&(aa=q.view.getState(W),W!=G&&null!=aa&&(R&&N!=aa.getCenterX()<B.getCenterX()||!R&&N!=aa.getCenterY()<B.getCenterY()))){var Y=[];q.traverse(aa.cell,!0,function(Z,ba){var fa=null!=ba&&q.isTreeEdge(ba);fa&&Y.push(ba);(null==ba||fa)&&Y.push(Z);return null==ba||fa});q.moveCells(Y,(N?1:-1)*V,(N?1:-1)*l)}}}return q.addCells(U,T)}finally{q.model.endUpdate()}}function c(G){q.model.beginUpdate();
-try{var N=F(G),T=q.getIncomingTreeEdges(G),V=q.cloneCells([T[0],G]);q.model.setTerminal(T[0],V[1],!1);q.model.setTerminal(V[0],V[1],!0);q.model.setTerminal(V[0],G,!1);var U=q.model.getParent(G),X=U.geometry,l=[];q.view.currentRoot!=U&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);q.traverse(G,!0,function(P,O){var R=null!=O&&q.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(P);return null==O||R});var B=G.geometry.width+40,L=G.geometry.height+40;N==mxConstants.DIRECTION_SOUTH?B=0:N==mxConstants.DIRECTION_NORTH?
-(B=0,L=-L):N==mxConstants.DIRECTION_WEST?(B=-B,L=0):N==mxConstants.DIRECTION_EAST&&(L=0);q.moveCells(l,B,L);return q.addCells(V,U)}finally{q.model.endUpdate()}}function e(G,N){q.model.beginUpdate();try{var T=q.model.getParent(G),V=q.getIncomingTreeEdges(G),U=F(G);0==V.length&&(V=[q.createEdge(T,null,"",null,null,q.createCurrentEdgeStyle())],U=N);var X=q.cloneCells([V[0],G]);q.model.setTerminal(X[0],G,!0);if(null==q.model.getTerminal(X[0],!1)){q.model.setTerminal(X[0],X[1],!1);var l=q.getCellStyle(X[1]).newEdgeStyle;
-if(null!=l)try{var B=JSON.parse(l),L;for(L in B)q.setCellStyles(L,B[L],[X[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==B[L]&&q.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[X[0]])}catch(aa){}}V=q.getOutgoingTreeEdges(G);var P=T.geometry;N=[];q.view.currentRoot==T&&(P=new mxRectangle);for(l=0;l<V.length;l++){var O=q.model.getTerminal(V[l],!1);null!=O&&N.push(O)}var R=q.view.getBounds(N),S=q.view.translate,W=q.view.scale;U==mxConstants.DIRECTION_SOUTH?
-(X[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-X[1].geometry.width)/2:(R.x+R.width)/W-S.x-P.x+10,X[1].geometry.y+=X[1].geometry.height-P.y+40):U==mxConstants.DIRECTION_NORTH?(X[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-X[1].geometry.width)/2:(R.x+R.width)/W-S.x+-P.x+10,X[1].geometry.y-=X[1].geometry.height+P.y+40):(X[1].geometry.x=U==mxConstants.DIRECTION_WEST?X[1].geometry.x-(X[1].geometry.width+P.x+40):X[1].geometry.x+(X[1].geometry.width-P.x+40),X[1].geometry.y=null==R?G.geometry.y+
-(G.geometry.height-X[1].geometry.height)/2:(R.y+R.height)/W-S.y+-P.y+10);return q.addCells(X,T)}finally{q.model.endUpdate()}}function g(G,N,T){G=q.getOutgoingTreeEdges(G);T=q.view.getState(T);var V=[];if(null!=T&&null!=G){for(var U=0;U<G.length;U++){var X=q.view.getState(q.model.getTerminal(G[U],!1));null!=X&&(!N&&Math.min(X.x+X.width,T.x+T.width)>=Math.max(X.x,T.x)||N&&Math.min(X.y+X.height,T.y+T.height)>=Math.max(X.y,T.y))&&V.push(X)}V.sort(function(l,B){return N?l.x+l.width-B.x-B.width:l.y+l.height-
-B.y-B.height})}return V}function m(G,N){var T=F(G),V=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==V&&T!=N?p.actions.get("selectParent").funct():T==N?(N=q.getOutgoingTreeEdges(G),null!=N&&0<N.length&&q.setSelectionCell(q.model.getTerminal(N[0],!1))):(T=q.getIncomingTreeEdges(G),null!=T&&0<T.length&&(V=g(q.model.getTerminal(T[0],!0),V,G),G=q.view.getState(G),null!=G&&(G=mxUtils.indexOf(V,G),0<=G&&(G+=N==mxConstants.DIRECTION_NORTH||
-N==mxConstants.DIRECTION_WEST?-1:1,0<=G&&G<=V.length-1&&q.setSelectionCell(V[G].cell)))))}var p=this,q=p.editor.graph,z=q.getModel(),y=p.menus.createPopupMenu;p.menus.createPopupMenu=function(G,N,T){y.apply(this,arguments);if(1==q.getSelectionCount()){N=q.getSelectionCell();var V=q.getOutgoingTreeEdges(N);G.addSeparator();0<V.length&&(d(q.getSelectionCell())&&this.addMenuItems(G,["selectChildren"],null,T),this.addMenuItems(G,["selectDescendants"],null,T));d(q.getSelectionCell())?(G.addSeparator(),
-0<q.getIncomingTreeEdges(N).length&&this.addMenuItems(G,["selectSiblings","selectParent"],null,T)):0<q.model.getEdgeCount(N)&&this.addMenuItems(G,["selectConnections"],null,T)}};p.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getOutgoingTreeEdges(G);if(null!=G){for(var N=[],T=0;T<G.length;T++)N.push(q.model.getTerminal(G[T],!1));q.setSelectionCells(N)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&
-1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getIncomingTreeEdges(G);if(null!=G&&0<G.length&&(G=q.getOutgoingTreeEdges(q.model.getTerminal(G[0],!0)),null!=G)){for(var N=[],T=0;T<G.length;T++)N.push(q.model.getTerminal(G[T],!1));q.setSelectionCells(N)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getIncomingTreeEdges(G);null!=G&&0<G.length&&q.setSelectionCell(q.model.getTerminal(G[0],
-!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(G,N){G=q.getSelectionCell();if(q.isEnabled()&&q.model.isVertex(G)){if(null!=N&&mxEvent.isAltDown(N))q.setSelectionCells(q.model.getTreeEdges(G,null==N||!mxEvent.isShiftDown(N),null==N||!mxEvent.isControlDown(N)));else{var T=[];q.traverse(G,!0,function(V,U){var X=null!=U&&q.isTreeEdge(U);X&&T.push(U);null!=U&&!X||null!=N&&mxEvent.isShiftDown(N)||T.push(V);return null==U||X})}q.setSelectionCells(T)}},null,null,"Alt+Shift+D");
-var A=q.removeCells;q.removeCells=function(G,N){N=null!=N?N:!0;null==G&&(G=this.getDeletableCells(this.getSelectionCells()));N&&(G=this.getDeletableCells(this.addAllEdges(G)));for(var T=[],V=0;V<G.length;V++){var U=G[V];z.isEdge(U)&&u(U)&&(T.push(U),U=z.getTerminal(U,!1));if(d(U)){var X=[];q.traverse(U,!0,function(l,B){var L=null!=B&&q.isTreeEdge(B);L&&X.push(B);(null==B||L)&&X.push(l);return null==B||L});0<X.length&&(T=T.concat(X),U=q.getIncomingTreeEdges(G[V]),G=G.concat(U))}else null!=U&&T.push(G[V])}G=
-T;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(G,N,T){return d(G.cell)?null:this.graph.view.getState(this.graph.getCellAt(N,T))};var x=q.duplicateCells;q.duplicateCells=function(G,N){G=null!=G?G:this.getSelectionCells();for(var T=G.slice(0),V=0;V<T.length;V++){var U=q.view.getState(T[V]);if(null!=U&&d(U.cell)){var X=q.getIncomingTreeEdges(U.cell);for(U=0;U<X.length;U++)mxUtils.remove(X[U],G)}}this.model.beginUpdate();try{var l=x.call(this,G,N);if(l.length==G.length)for(V=0;V<G.length;V++)if(d(G[V])){var B=
-q.getIncomingTreeEdges(l[V]);X=q.getIncomingTreeEdges(G[V]);if(0==B.length&&0<X.length){var L=this.cloneCell(X[0]);this.addEdge(L,q.getDefaultParent(),this.model.getTerminal(X[0],!0),l[V])}}}finally{this.model.endUpdate()}return l};var I=q.moveCells;q.moveCells=function(G,N,T,V,U,X,l){var B=null;this.model.beginUpdate();try{var L=U,P=this.getCurrentCellStyle(U);if(null!=G&&d(U)&&"1"==mxUtils.getValue(P,"treeFolding","0")){for(var O=0;O<G.length;O++)if(d(G[O])||q.model.isEdge(G[O])&&null==q.model.getTerminal(G[O],
-!0)){U=q.model.getParent(G[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(G[0])){var R=q.getIncomingTreeEdges(G[0]);if(0<R.length){var S=q.view.getState(q.model.getTerminal(R[0],!0));if(null!=S){var W=q.view.getState(L);null!=W&&(N=(W.getCenterX()-S.getCenterX())/q.view.scale,T=(W.getCenterY()-S.getCenterY())/q.view.scale)}}}}B=I.apply(this,arguments);if(null!=B&&null!=G&&B.length==G.length)for(O=0;O<B.length;O++)if(this.model.isEdge(B[O]))d(L)&&0>mxUtils.indexOf(B,this.model.getTerminal(B[O],
-!0))&&this.model.setTerminal(B[O],L,!0);else if(d(G[O])&&(R=q.getIncomingTreeEdges(G[O]),0<R.length))if(!V)d(L)&&0>mxUtils.indexOf(G,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==q.getIncomingTreeEdges(B[O]).length){P=L;if(null==P||P==q.model.getParent(G[O]))P=q.model.getTerminal(R[0],!0);V=this.cloneCell(R[0]);this.addEdge(V,q.getDefaultParent(),P,B[O])}}finally{this.model.endUpdate()}return B};if(null!=p.sidebar){var M=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=
-function(G,N,T,V){var U=q.model,X=null;U.beginUpdate();try{if(X=M.apply(this,arguments),d(G))for(var l=0;l<X.length;l++)if(U.isEdge(X[l])&&null==U.getTerminal(X[l],!0)){U.setTerminal(X[l],G,!0);var B=q.getCellGeometry(X[l]);B.points=null;null!=B.getTerminalPoint(!0)&&B.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return X}}var E={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},Q=p.onKeyDown;p.onKeyDown=function(G){try{if(q.isEnabled()&&
-!q.isEditing()&&d(q.getSelectionCell())&&1==q.getSelectionCount()){var N=null;0<q.getIncomingTreeEdges(q.getSelectionCell()).length&&(9==G.which?N=mxEvent.isShiftDown(G)?c(q.getSelectionCell()):e(q.getSelectionCell()):13==G.which&&(N=J(q.getSelectionCell(),!mxEvent.isShiftDown(G))));if(null!=N&&0<N.length)1==N.length&&q.model.isEdge(N[0])?q.setSelectionCell(q.model.getTerminal(N[0],!1)):q.setSelectionCell(N[N.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(q.view.getState(q.getSelectionCell())),
-q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(G);else if(mxEvent.isAltDown(G)&&mxEvent.isShiftDown(G)){var T=E[G.keyCode];null!=T&&(T.funct(G),mxEvent.consume(G))}else 37==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(G)):38==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(G)):39==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(G)):40==G.keyCode&&(m(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(G))}}catch(V){p.handleError(V)}mxEvent.isConsumed(G)||Q.apply(this,arguments)};var n=q.connectVertex;q.connectVertex=function(G,N,T,V,U,X,l){var B=q.getIncomingTreeEdges(G);if(d(G)){var L=F(G),P=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;return L==N||0==B.length?e(G,N):P==O?c(G):J(G,N!=mxConstants.DIRECTION_NORTH&&N!=mxConstants.DIRECTION_WEST)}return n.apply(this,arguments)};q.getSubtree=function(G){var N=
-[G];!t(G)&&!d(G)||C(G)||q.traverse(G,!0,function(T,V){var U=null!=V&&q.isTreeEdge(V);U&&0>mxUtils.indexOf(N,V)&&N.push(V);(null==V||U)&&0>mxUtils.indexOf(N,T)&&N.push(T);return null==V||U});return N};var v=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){v.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
-"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(G){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(G);
-this.graph.isMouseDown=!0;p.hoverIcons.reset();mxEvent.consume(G)})))};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.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.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(G){H.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=G?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(G,N){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
-function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var C=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var F=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!1);u.insert(J);u.insert(C);u.insert(F);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-u.vertex=!0;var C=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');C.vertex=!0;var F=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-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;C.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");m.geometry.relative=!0;m.edge=!0;C.insertEdge(m,!0);g.insertEdge(m,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.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;C.insertEdge(q,!0);p.insertEdge(q,!1);u.insert(J);u.insert(e);u.insert(m);u.insert(q);u.insert(C);u.insert(F);u.insert(c);u.insert(g);u.insert(p);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var u=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-u.vertex=!0;var C=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var F=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-e.geometry.relative=!0;e.edge=!0;C.insertEdge(e,!0);c.insertEdge(e,!1);u.insert(J);u.insert(e);u.insert(C);u.insert(F);u.insert(c);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(u,"treeRoot",
-"1");u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);var F=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=
-!0;J.edge=!0;F.insertEdge(J,!1);return sb.createVertexTemplateFromCells([C,J,u,F],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(y,A){if(EditorUi.windowed){var x=y.editor.graph;x.popupMenuHandler.hideMenu();if(null==y.formatWindow){A="1"==urlParams.sketch?Math.max(10,y.diagramContainer.clientWidth-241):Math.max(10,y.diagramContainer.clientWidth-248);var I="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;x="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,x.container.clientHeight-10);y.formatWindow=new WrapperWindow(y,mxResources.get("format"),A,I,240,x,
-function(M){y.createFormat(M).init()});y.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){y.formatWindow.window.fit()}));y.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else y.formatWindow.window.setVisible(null!=A?A:!y.formatWindow.window.isVisible())}else null==y.formatElt&&(y.formatElt=y.createSidebarContainer(),y.createFormat(y.formatElt).init(),y.formatElt.style.border="none",y.formatElt.style.width="240px",y.formatElt.style.borderLeft="1px solid gray",
-y.formatElt.style.right="0px"),x=y.diagramContainer.parentNode,null!=y.formatElt.parentNode?(y.formatElt.parentNode.removeChild(y.formatElt),x.style.right="0px"):(x.parentNode.appendChild(y.formatElt),x.style.right=y.formatElt.style.width)}function f(y,A){function x(Q,n){var v=y.menus.get(Q);Q=E.addMenu(n,mxUtils.bind(this,function(){v.funct.apply(this,arguments)}));Q.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-Q.className="geTitle";A.appendChild(Q);return Q}var I=document.createElement("div");I.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";I.className="geTitle";var M=document.createElement("span");M.style.fontSize="18px";M.style.marginRight="5px";M.innerHTML="+";I.appendChild(M);mxUtils.write(I,mxResources.get("moreShapes"));A.appendChild(I);mxEvent.addListener(I,"click",function(){y.actions.get("shapes").funct()});
-var E=new Menubar(y,A);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?I.style.bottom="0":null!=y.actions.get("newLibrary")?(I=document.createElement("div"),I.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("newLibrary")),I.appendChild(M),
-A.appendChild(I),mxEvent.addListener(I,"click",y.actions.get("newLibrary").funct),I=document.createElement("div"),I.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("openLibrary")),I.appendChild(M),A.appendChild(I),mxEvent.addListener(I,
-"click",y.actions.get("openLibrary").funct)):(I=x("newLibrary",mxResources.get("newLibrary")),I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="0",I=x("openLibraryFrom",mxResources.get("openLibraryFrom")),I.style.borderLeft="1px solid lightgray",I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="50%");A.appendChild(y.sidebar.container);A.style.overflow="hidden"}
-function k(y,A){if(EditorUi.windowed){var x=y.editor.graph;x.popupMenuHandler.hideMenu();if(null==y.sidebarWindow){A=Math.min(x.container.clientWidth-10,218);var I="1"==urlParams.embedInline?650:Math.min(x.container.clientHeight-40,650);y.sidebarWindow=new WrapperWindow(y,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(x.container.clientHeight-I)/2):56,A-6,I-6,function(M){f(y,M)});y.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){y.sidebarWindow.window.fit()}));y.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);y.sidebarWindow.window.setVisible(!0);isLocalStorage&&y.getLocalData("sidebar",function(M){y.sidebar.showEntries(M,null,!0)});y.restoreLibraries()}else y.sidebarWindow.window.setVisible(null!=A?A:!y.sidebarWindow.window.isVisible())}else null==y.sidebarElt&&(y.sidebarElt=y.createSidebarContainer(),f(y,y.sidebarElt),y.sidebarElt.style.border="none",y.sidebarElt.style.width="210px",
-y.sidebarElt.style.borderRight="1px solid gray"),x=y.diagramContainer.parentNode,null!=y.sidebarElt.parentNode?(y.sidebarElt.parentNode.removeChild(y.sidebarElt),x.style.left="0px"):(x.parentNode.appendChild(y.sidebarElt),x.style.left=y.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(y){}Editor.checkmarkImage=
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(v,x){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?x:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root,
+d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var v=k.ownerDocument.createElement("diagram");v.setAttribute("id",k.getAttribute("relatedPage"));v.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(v);v=k.getAttribute("viewState");null!=v&&(d.relatedPage.viewState=JSON.parse(v),k.removeAttribute("viewState"));k=k.cloneNode(!0);v=k.firstChild;if(null!=v)for(d.relatedPage.root=f.decodeCell(v,
+!1),d=v.nextSibling,v.parentNode.removeChild(v),v=d;null!=v;){d=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var x=v.getAttribute("id");null==f.lookup(x)&&f.decodeCell(v)}v.parentNode.removeChild(v);v=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,v,x,D,G){v=null!=v?v:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var H=x.slice(),I=0;I<x.length;I++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[I]),"treeFolding","0")&&this.foldTreeCell(d,x[I]);x=H;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=
+function(d,v){this.model.beginUpdate();try{var x=[];this.traverse(v,!0,mxUtils.bind(this,function(G,H){var I=null!=H&&this.isTreeEdge(H);I&&x.push(H);G==v||null!=H&&!I||x.push(G);return(null==H||I)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,d);for(var D=0;D<x.length;D++)this.model.setVisible(x[D],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,v,x,D,G,H){return this.model.filterCells(this.getEdges(d,
+v,x,D,G,H),mxUtils.bind(this,function(I){return this.isTreeEdge(I)}))};Graph.prototype.getIncomingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,v){return this.getTreeEdges(d,v,!1,!0,!1)};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 d(E){return p.isVertex(E)&&x(E)}function v(E){var L=
+!1;null!=E&&(L="1"==g.getCurrentCellStyle(E).treeMoving);return L}function x(E){var L=!1;null!=E&&(E=p.getParent(E),L=g.view.getState(E),L="tree"==(null!=L?L.style:g.getCellStyle(E)).containerType);return L}function D(E){var L=!1;null!=E&&(E=p.getParent(E),L=g.view.getState(E),g.view.getState(E),L=null!=(null!=L?L.style:g.getCellStyle(E)).childLayout);return L}function G(E){E=g.view.getState(E);if(null!=E){var L=g.getIncomingTreeEdges(E.cell);if(0<L.length&&(L=g.view.getState(L[0]),null!=L&&(L=L.absolutePoints,
+null!=L&&0<L.length&&(L=L[L.length-1],null!=L)))){if(L.y==E.y&&Math.abs(L.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_SOUTH;if(L.y==E.y+E.height&&Math.abs(L.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_NORTH;if(L.x>E.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(E,L){L=null!=L?L:!0;g.model.beginUpdate();try{var P=g.model.getParent(E),S=g.getIncomingTreeEdges(E),V=g.cloneCells([S[0],E]);g.model.setTerminal(V[0],g.model.getTerminal(S[0],
+!0),!0);var X=G(E),m=P.geometry;X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=L?E.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=L?E.geometry.height+10:-V[1].geometry.height-10;g.view.currentRoot!=P&&(V[1].geometry.x-=m.x,V[1].geometry.y-=m.y);var z=g.view.getState(E),K=g.view.scale;if(null!=z){var Q=mxRectangle.fromRectangle(z);X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?Q.x+=(L?E.geometry.width+10:-V[1].geometry.width-10)*K:Q.y+=(L?
+E.geometry.height+10:-V[1].geometry.height-10)*K;var N=g.getOutgoingTreeEdges(g.model.getTerminal(S[0],!0));if(null!=N){for(var U=X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH,T=m=S=0;T<N.length;T++){var W=g.model.getTerminal(N[T],!1);if(X==G(W)){var Z=g.view.getState(W);W!=E&&null!=Z&&(U&&L!=Z.getCenterX()<z.getCenterX()||!U&&L!=Z.getCenterY()<z.getCenterY())&&mxUtils.intersects(Q,Z)&&(S=10+Math.max(S,(Math.min(Q.x+Q.width,Z.x+Z.width)-Math.max(Q.x,Z.x))/K),m=10+Math.max(m,(Math.min(Q.y+
+Q.height,Z.y+Z.height)-Math.max(Q.y,Z.y))/K))}}U?m=0:S=0;for(T=0;T<N.length;T++)if(W=g.model.getTerminal(N[T],!1),X==G(W)&&(Z=g.view.getState(W),W!=E&&null!=Z&&(U&&L!=Z.getCenterX()<z.getCenterX()||!U&&L!=Z.getCenterY()<z.getCenterY()))){var ca=[];g.traverse(Z.cell,!0,function(ba,fa){var Y=null!=fa&&g.isTreeEdge(fa);Y&&ca.push(fa);(null==fa||Y)&&ca.push(ba);return null==fa||Y});g.moveCells(ca,(L?1:-1)*S,(L?1:-1)*m)}}}return g.addCells(V,P)}finally{g.model.endUpdate()}}function I(E){g.model.beginUpdate();
+try{var L=G(E),P=g.getIncomingTreeEdges(E),S=g.cloneCells([P[0],E]);g.model.setTerminal(P[0],S[1],!1);g.model.setTerminal(S[0],S[1],!0);g.model.setTerminal(S[0],E,!1);var V=g.model.getParent(E),X=V.geometry,m=[];g.view.currentRoot!=V&&(S[1].geometry.x-=X.x,S[1].geometry.y-=X.y);g.traverse(E,!0,function(Q,N){var U=null!=N&&g.isTreeEdge(N);U&&m.push(N);(null==N||U)&&m.push(Q);return null==N||U});var z=E.geometry.width+40,K=E.geometry.height+40;L==mxConstants.DIRECTION_SOUTH?z=0:L==mxConstants.DIRECTION_NORTH?
+(z=0,K=-K):L==mxConstants.DIRECTION_WEST?(z=-z,K=0):L==mxConstants.DIRECTION_EAST&&(K=0);g.moveCells(m,z,K);return g.addCells(S,V)}finally{g.model.endUpdate()}}function F(E,L){g.model.beginUpdate();try{var P=g.model.getParent(E),S=g.getIncomingTreeEdges(E),V=G(E);0==S.length&&(S=[g.createEdge(P,null,"",null,null,g.createCurrentEdgeStyle())],V=L);var X=g.cloneCells([S[0],E]);g.model.setTerminal(X[0],E,!0);if(null==g.model.getTerminal(X[0],!1)){g.model.setTerminal(X[0],X[1],!1);var m=g.getCellStyle(X[1]).newEdgeStyle;
+if(null!=m)try{var z=JSON.parse(m),K;for(K in z)g.setCellStyles(K,z[K],[X[0]]),"edgeStyle"==K&&"elbowEdgeStyle"==z[K]&&g.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[X[0]])}catch(Z){}}S=g.getOutgoingTreeEdges(E);var Q=P.geometry;L=[];g.view.currentRoot==P&&(Q=new mxRectangle);for(m=0;m<S.length;m++){var N=g.model.getTerminal(S[m],!1);null!=N&&L.push(N)}var U=g.view.getBounds(L),T=g.view.translate,W=g.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(X[1].geometry.x=null==U?E.geometry.x+(E.geometry.width-X[1].geometry.width)/2:(U.x+U.width)/W-T.x-Q.x+10,X[1].geometry.y+=X[1].geometry.height-Q.y+40):V==mxConstants.DIRECTION_NORTH?(X[1].geometry.x=null==U?E.geometry.x+(E.geometry.width-X[1].geometry.width)/2:(U.x+U.width)/W-T.x+-Q.x+10,X[1].geometry.y-=X[1].geometry.height+Q.y+40):(X[1].geometry.x=V==mxConstants.DIRECTION_WEST?X[1].geometry.x-(X[1].geometry.width+Q.x+40):X[1].geometry.x+(X[1].geometry.width-Q.x+40),X[1].geometry.y=null==U?E.geometry.y+
+(E.geometry.height-X[1].geometry.height)/2:(U.y+U.height)/W-T.y+-Q.y+10);return g.addCells(X,P)}finally{g.model.endUpdate()}}function O(E,L,P){E=g.getOutgoingTreeEdges(E);P=g.view.getState(P);var S=[];if(null!=P&&null!=E){for(var V=0;V<E.length;V++){var X=g.view.getState(g.model.getTerminal(E[V],!1));null!=X&&(!L&&Math.min(X.x+X.width,P.x+P.width)>=Math.max(X.x,P.x)||L&&Math.min(X.y+X.height,P.y+P.height)>=Math.max(X.y,P.y))&&S.push(X)}S.sort(function(m,z){return L?m.x+m.width-z.x-z.width:m.y+m.height-
+z.y-z.height})}return S}function c(E,L){var P=G(E),S=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==S&&P!=L?e.actions.get("selectParent").funct():P==L?(L=g.getOutgoingTreeEdges(E),null!=L&&0<L.length&&g.setSelectionCell(g.model.getTerminal(L[0],!1))):(P=g.getIncomingTreeEdges(E),null!=P&&0<P.length&&(S=O(g.model.getTerminal(P[0],!0),S,E),E=g.view.getState(E),null!=E&&(E=mxUtils.indexOf(S,E),0<=E&&(E+=L==mxConstants.DIRECTION_NORTH||
+L==mxConstants.DIRECTION_WEST?-1:1,0<=E&&E<=S.length-1&&g.setSelectionCell(S[E].cell)))))}var e=this,g=e.editor.graph,p=g.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(E,L,P){n.apply(this,arguments);if(1==g.getSelectionCount()){L=g.getSelectionCell();var S=g.getOutgoingTreeEdges(L);E.addSeparator();0<S.length&&(d(g.getSelectionCell())&&this.addMenuItems(E,["selectChildren"],null,P),this.addMenuItems(E,["selectDescendants"],null,P));d(g.getSelectionCell())?(E.addSeparator(),
+0<g.getIncomingTreeEdges(L).length&&this.addMenuItems(E,["selectSiblings","selectParent"],null,P)):0<g.model.getEdgeCount(L)&&this.addMenuItems(E,["selectConnections"],null,P)}};e.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getOutgoingTreeEdges(E);if(null!=E){for(var L=[],P=0;P<E.length;P++)L.push(g.model.getTerminal(E[P],!1));g.setSelectionCells(L)}}},null,null,"Alt+Shift+X");e.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&
+1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getIncomingTreeEdges(E);if(null!=E&&0<E.length&&(E=g.getOutgoingTreeEdges(g.model.getTerminal(E[0],!0)),null!=E)){for(var L=[],P=0;P<E.length;P++)L.push(g.model.getTerminal(E[P],!1));g.setSelectionCells(L)}}},null,null,"Alt+Shift+S");e.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getIncomingTreeEdges(E);null!=E&&0<E.length&&g.setSelectionCell(g.model.getTerminal(E[0],
+!0))}},null,null,"Alt+Shift+P");e.actions.addAction("selectDescendants",function(E,L){E=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(E)){if(null!=L&&mxEvent.isAltDown(L))g.setSelectionCells(g.model.getTreeEdges(E,null==L||!mxEvent.isShiftDown(L),null==L||!mxEvent.isControlDown(L)));else{var P=[];g.traverse(E,!0,function(S,V){var X=null!=V&&g.isTreeEdge(V);X&&P.push(V);null!=V&&!X||null!=L&&mxEvent.isShiftDown(L)||P.push(S);return null==V||X})}g.setSelectionCells(P)}},null,null,"Alt+Shift+D");
+var t=g.removeCells;g.removeCells=function(E,L){L=null!=L?L:!0;null==E&&(E=this.getDeletableCells(this.getSelectionCells()));L&&(E=this.getDeletableCells(this.addAllEdges(E)));for(var P=[],S=0;S<E.length;S++){var V=E[S];p.isEdge(V)&&x(V)&&(P.push(V),V=p.getTerminal(V,!1));if(d(V)){var X=[];g.traverse(V,!0,function(m,z){var K=null!=z&&g.isTreeEdge(z);K&&X.push(z);(null==z||K)&&X.push(m);return null==z||K});0<X.length&&(P=P.concat(X),V=g.getIncomingTreeEdges(E[S]),E=E.concat(V))}else null!=V&&P.push(E[S])}E=
+P;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(E,L,P){return d(E.cell)?null:this.graph.view.getState(this.graph.getCellAt(L,P))};var y=g.duplicateCells;g.duplicateCells=function(E,L){E=null!=E?E:this.getSelectionCells();for(var P=E.slice(0),S=0;S<P.length;S++){var V=g.view.getState(P[S]);if(null!=V&&d(V.cell)){var X=g.getIncomingTreeEdges(V.cell);for(V=0;V<X.length;V++)mxUtils.remove(X[V],E)}}this.model.beginUpdate();try{var m=y.call(this,E,L);if(m.length==E.length)for(S=0;S<E.length;S++)if(d(E[S])){var z=
+g.getIncomingTreeEdges(m[S]);X=g.getIncomingTreeEdges(E[S]);if(0==z.length&&0<X.length){var K=this.cloneCell(X[0]);this.addEdge(K,g.getDefaultParent(),this.model.getTerminal(X[0],!0),m[S])}}}finally{this.model.endUpdate()}return m};var A=g.moveCells;g.moveCells=function(E,L,P,S,V,X,m){var z=null;this.model.beginUpdate();try{var K=V,Q=this.getCurrentCellStyle(V);if(null!=E&&d(V)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var N=0;N<E.length;N++)if(d(E[N])||g.model.isEdge(E[N])&&null==g.model.getTerminal(E[N],
+!0)){V=g.model.getParent(E[N]);break}if(null!=K&&V!=K&&null!=this.view.getState(E[0])){var U=g.getIncomingTreeEdges(E[0]);if(0<U.length){var T=g.view.getState(g.model.getTerminal(U[0],!0));if(null!=T){var W=g.view.getState(K);null!=W&&(L=(W.getCenterX()-T.getCenterX())/g.view.scale,P=(W.getCenterY()-T.getCenterY())/g.view.scale)}}}}z=A.apply(this,arguments);if(null!=z&&null!=E&&z.length==E.length)for(N=0;N<z.length;N++)if(this.model.isEdge(z[N]))d(K)&&0>mxUtils.indexOf(z,this.model.getTerminal(z[N],
+!0))&&this.model.setTerminal(z[N],K,!0);else if(d(E[N])&&(U=g.getIncomingTreeEdges(E[N]),0<U.length))if(!S)d(K)&&0>mxUtils.indexOf(E,this.model.getTerminal(U[0],!0))&&this.model.setTerminal(U[0],K,!0);else if(0==g.getIncomingTreeEdges(z[N]).length){Q=K;if(null==Q||Q==g.model.getParent(E[N]))Q=g.model.getTerminal(U[0],!0);S=this.cloneCell(U[0]);this.addEdge(S,g.getDefaultParent(),Q,z[N])}}finally{this.model.endUpdate()}return z};if(null!=e.sidebar){var C=e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=
+function(E,L,P,S){var V=g.model,X=null;V.beginUpdate();try{if(X=C.apply(this,arguments),d(E))for(var m=0;m<X.length;m++)if(V.isEdge(X[m])&&null==V.getTerminal(X[m],!0)){V.setTerminal(X[m],E,!0);var z=g.getCellGeometry(X[m]);z.points=null;null!=z.getTerminalPoint(!0)&&z.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return X}}var u={88:e.actions.get("selectChildren"),84:e.actions.get("selectSubtree"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},R=e.onKeyDown;e.onKeyDown=function(E){try{if(g.isEnabled()&&
+!g.isEditing()&&d(g.getSelectionCell())&&1==g.getSelectionCount()){var L=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==E.which?L=mxEvent.isShiftDown(E)?I(g.getSelectionCell()):F(g.getSelectionCell()):13==E.which&&(L=H(g.getSelectionCell(),!mxEvent.isShiftDown(E))));if(null!=L&&0<L.length)1==L.length&&g.model.isEdge(L[0])?g.setSelectionCell(g.model.getTerminal(L[0],!1)):g.setSelectionCell(L[L.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(g.getSelectionCell())),
+g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(E);else if(mxEvent.isAltDown(E)&&mxEvent.isShiftDown(E)){var P=u[E.keyCode];null!=P&&(P.funct(E),mxEvent.consume(E))}else 37==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(E)):38==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(E)):39==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(E)):40==E.keyCode&&(c(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(E))}}catch(S){e.handleError(S)}mxEvent.isConsumed(E)||R.apply(this,arguments)};var l=g.connectVertex;g.connectVertex=function(E,L,P,S,V,X,m){var z=g.getIncomingTreeEdges(E);if(d(E)){var K=G(E),Q=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST,N=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;return K==L||0==z.length?F(E,L):Q==N?I(E):H(E,L!=mxConstants.DIRECTION_NORTH&&L!=mxConstants.DIRECTION_WEST)}return l.apply(this,arguments)};g.getSubtree=function(E){var L=
+[E];!v(E)&&!d(E)||D(E)||g.traverse(E,!0,function(P,S){var V=null!=S&&g.isTreeEdge(S);V&&0>mxUtils.indexOf(L,S)&&L.push(S);(null==S||V)&&0>mxUtils.indexOf(L,P)&&L.push(P);return null==S||V});return L};var q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){q.apply(this,arguments);(v(this.state.cell)||d(this.state.cell))&&!D(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(E){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(E),mxEvent.getClientY(E),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(E);
+this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(E)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(E){J.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=E?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(E,L){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),v=this.graph;return d.concat([this.addEntry("tree container",
+function(){var x=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var D=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");H.geometry.relative=!0;H.edge=!0;D.insertEdge(H,!0);G.insertEdge(H,!1);x.insert(H);x.insert(D);x.insert(G);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
+x.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');D.vertex=!0;var G=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");H.geometry.relative=!0;H.edge=!0;D.insertEdge(H,!0);G.insertEdge(H,!1);var I=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+I.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;D.insertEdge(F,!0);I.insertEdge(F,!1);var O=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+O.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;D.insertEdge(c,!0);O.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+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;D.insertEdge(g,!0);e.insertEdge(g,!1);x.insert(H);x.insert(F);x.insert(c);x.insert(g);x.insert(D);x.insert(G);x.insert(I);x.insert(O);x.insert(e);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",
+new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return sb.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return sb.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+x.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");H.geometry.relative=!0;H.edge=!0;D.insertEdge(H,!0);G.insertEdge(H,!1);var I=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+F.geometry.relative=!0;F.edge=!0;D.insertEdge(F,!0);I.insertEdge(F,!1);x.insert(H);x.insert(F);x.insert(D);x.insert(G);x.insert(I);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(x,"treeRoot",
+"1");x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return sb.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=
+!0;H.edge=!0;G.insertEdge(H,!1);return sb.createVertexTemplateFromCells([D,H,x,G],220,60,"Sub Sections")})])}}})();"1"==urlParams["live-ui"]&&"min"==uiTheme&&"1"==urlParams.sketch&&(Editor.currentTheme="sketch",uiTheme="kennedy");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(n,t){if(EditorUi.windowed){var y=n.editor.graph;y.popupMenuHandler.hideMenu();if(null==n.formatWindow){t="1"==urlParams.sketch?Math.max(10,n.diagramContainer.clientWidth-244):Math.max(10,n.diagramContainer.clientWidth-248);var A="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;y="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,y.container.clientHeight-10);n.formatWindow=new WrapperWindow(n,mxResources.get("format"),t,A,240,y,
+function(C){n.createFormat(C).init()});n.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){n.formatWindow.window.fit()}));n.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else n.formatWindow.window.setVisible(null!=t?t:!n.formatWindow.window.isVisible())}else null==n.formatElt&&(n.formatElt=n.createSidebarContainer(),n.createFormat(n.formatElt).init(),n.formatElt.style.border="none",n.formatElt.style.width="240px",n.formatElt.style.borderLeft="1px solid gray",
+n.formatElt.style.right="0px"),y=n.diagramContainer.parentNode,null!=n.formatElt.parentNode?(n.formatElt.parentNode.removeChild(n.formatElt),y.style.right="0px"):(y.parentNode.appendChild(n.formatElt),y.style.right=n.formatElt.style.width)}function f(n,t){function y(R,l){var q=n.menus.get(R);R=u.addMenu(l,mxUtils.bind(this,function(){q.funct.apply(this,arguments)}));R.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+R.className="geTitle";t.appendChild(R);return R}var A=document.createElement("div");A.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";A.className="geTitle";var C=document.createElement("span");C.style.fontSize="18px";C.style.marginRight="5px";C.innerHTML="+";A.appendChild(C);mxUtils.write(A,mxResources.get("moreShapes"));t.appendChild(A);mxEvent.addListener(A,"click",function(){n.actions.get("shapes").funct()});
+var u=new Menubar(n,t);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?A.style.bottom="0":null!=n.actions.get("newLibrary")?(A=document.createElement("div"),A.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",A.className="geTitle",C=document.createElement("span"),C.style.cssText="position:relative;top:6px;",mxUtils.write(C,mxResources.get("newLibrary")),A.appendChild(C),
+t.appendChild(A),mxEvent.addListener(A,"click",n.actions.get("newLibrary").funct),A=document.createElement("div"),A.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",A.className="geTitle",C=document.createElement("span"),C.style.cssText="position:relative;top:6px;",mxUtils.write(C,mxResources.get("openLibrary")),A.appendChild(C),t.appendChild(A),mxEvent.addListener(A,
+"click",n.actions.get("openLibrary").funct)):(A=y("newLibrary",mxResources.get("newLibrary")),A.style.boxSizing="border-box",A.style.paddingRight="6px",A.style.paddingLeft="6px",A.style.height="32px",A.style.left="0",A=y("openLibraryFrom",mxResources.get("openLibraryFrom")),A.style.borderLeft="1px solid lightgray",A.style.boxSizing="border-box",A.style.paddingRight="6px",A.style.paddingLeft="6px",A.style.height="32px",A.style.left="50%");t.appendChild(n.sidebar.container);t.style.overflow="hidden"}
+function k(n,t){if(EditorUi.windowed){var y=n.editor.graph;y.popupMenuHandler.hideMenu();if(null==n.sidebarWindow){t=Math.min(y.container.clientWidth-10,218);var A="1"==urlParams.embedInline?650:Math.min(y.container.clientHeight-40,650);n.sidebarWindow=new WrapperWindow(n,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(y.container.clientHeight-A)/2):56,t-6,A-6,function(C){f(n,C)});n.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){n.sidebarWindow.window.fit()}));n.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);n.sidebarWindow.window.setVisible(!0);isLocalStorage&&n.getLocalData("sidebar",function(C){n.sidebar.showEntries(C,null,!0)});n.restoreLibraries()}else n.sidebarWindow.window.setVisible(null!=t?t:!n.sidebarWindow.window.isVisible())}else null==n.sidebarElt&&(n.sidebarElt=n.createSidebarContainer(),f(n,n.sidebarElt),n.sidebarElt.style.border="none",n.sidebarElt.style.width="210px",
+n.sidebarElt.style.borderRight="1px solid gray"),y=n.diagramContainer.parentNode,null!=n.sidebarElt.parentNode?(n.sidebarElt.parentNode.removeChild(n.sidebarElt),y.style.left="0px"):(y.parentNode.appendChild(n.sidebarElt),y.style.left=n.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(n){}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="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var C=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(y,A){null!=A.shortcut&&900>d&&!mxClient.IS_IOS?y.firstChild.nextSibling.setAttribute("title",A.shortcut):C.apply(this,arguments)};var F=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){F.apply(this,arguments);if(null!=this.userElement){var y=this.userElement;y.style.cssText="position:relative;cursor:pointer;display:"+y.style.display;y.className="geToolbarButton";
-y.innerText="";y.style.backgroundImage="url("+Editor.userImage+")";y.style.backgroundPosition="center center";y.style.backgroundRepeat="no-repeat";y.style.backgroundSize="24px 24px";y.style.height="24px";y.style.width="24px";var A=mxResources.get("changeUser");if("none"!=y.style.display){y.style.display="inline-block";var x=this.getCurrentFile();if(null!=x&&x.isRealtimeEnabled()&&x.isRealtimeSupported()){var I=document.createElement("img");I.setAttribute("border","0");I.style.position="absolute";
-I.style.left="18px";I.style.top="2px";I.style.width="12px";I.style.height="12px";var M=x.getRealtimeError();x=x.getRealtimeState();A+=" ("+mxResources.get("realtimeCollaboration")+": ";1==x?(I.src=Editor.syncImage,A+=mxResources.get("online")):(I.src=Editor.syncProblemImage,A=null!=M&&null!=M.message?A+M.message:A+mxResources.get("disconnected"));y.style.marginRight="6px";y.appendChild(I);A+=")"}}y.setAttribute("title",A)}};var J=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){J.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var y=document.createElement("div");y.style.display="inline-block";y.style.position="relative";y.style.marginTop="6px";y.style.marginRight="4px";var A=document.createElement("a");A.className="geMenuItem gePrimaryBtn";A.style.marginLeft="8px";A.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(A,x);A.setAttribute("title",x);mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));y.appendChild(A)}}else mxUtils.write(A,mxResources.get("save")),A.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),y.appendChild(A),
-"1"==urlParams.saveAndExit&&(A=document.createElement("a"),mxUtils.write(A,mxResources.get("saveAndExit")),A.setAttribute("title",mxResources.get("saveAndExit")),A.className="geMenuItem",A.style.marginLeft="6px",A.style.padding="6px",mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),y.appendChild(A));"1"!=urlParams.noExitBtn&&(A=document.createElement("a"),x="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(A,
-x),A.setAttribute("title",x),A.className="geMenuItem",A.style.marginLeft="6px",A.style.padding="6px",mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),y.appendChild(A));this.buttonContainer.appendChild(y);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var c=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(y,A,x){var I=this.editorUi.editor.graph;y.smartSeparators=!0;c.apply(this,arguments);
-"1"==urlParams.sketch?I.isEnabled()&&(y.addSeparator(),1==I.getSelectionCount()&&this.addMenuItems(y,["-","lockUnlock"],null,x)):1==I.getSelectionCount()?(I.isCellFoldable(I.getSelectionCell())&&this.addMenuItems(y,I.isCellCollapsed(A)?["expand"]:["collapse"],null,x),this.addMenuItems(y,["collapsible","-","lockUnlock","enterGroup"],null,x),y.addSeparator(),this.addSubmenu("layout",y)):I.isSelectionEmpty()&&I.isEnabled()?(y.addSeparator(),this.addMenuItems(y,["editData"],null,x),y.addSeparator(),this.addSubmenu("layout",
-y),this.addSubmenu("insert",y),this.addMenuItems(y,["-","exitGroup"],null,x)):I.isEnabled()&&this.addMenuItems(y,["-","lockUnlock"],null,x)};var e=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(y,A,x){e.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(y,["copyAsImage"],null,x)};EditorUi.prototype.toggleFormatPanel=function(y){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=y?y:!this.formatWindow.window.isVisible()):
-b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(y){m.apply(this,arguments);if(y){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=A&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=A||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var y=this.editorUi,A=y.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(n){y.setPagesVisible(!Editor.pagesVisible)}));
-A.setToggleAction(!0);A.setSelectedCallback(function(){return Editor.pagesVisible});y.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(y)},null,null,Editor.ctrlKey+"+Shift+K"));A=y.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(y)}));A.shortcut=y.actions.get("formatPanel").shortcut;A.setToggleAction(!0);A.setSelectedCallback(mxUtils.bind(this,function(){return null!=y.formatWindow&&y.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
-!y.isOffline()&&y.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var n=new ParseDialog(y,mxResources.get("plantUml")+"...","plantUml");y.showDialog(n.container,620,420,!0,!1);n.init()}));y.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var n=new ParseDialog(y,mxResources.get("mermaid")+"...","mermaid");y.showDialog(n.container,620,420,!0,!1);n.init()}));var x=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(n,v){var D=this.editorUi.editor.graph,H=D.getSelectionCell();x.call(this,n,H,null,v);this.addMenuItems(n,["editTooltip"],v);D.model.isVertex(H)&&this.addMenuItems(n,["editGeometry"],v);this.addMenuItems(n,["-","edit"],v)})));this.addPopupMenuCellEditItems=function(n,v,D,H){n.addSeparator();this.addSubmenu("editCell",n,H,mxResources.get("edit"))};var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){I.funct(n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-y.menus.addMenuItems(n,["publishLink"],v);y.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(n.addSeparator(v),y.menus.addSubmenu("embed",n,v))})));var M=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(n,v){M.funct(n,v);this.addMenuItems(n,["-","ruler","-","pageScale"],v)})));var E="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),Q=function(n,v,D,H){n.addItem(D,null,mxUtils.bind(this,function(){var K=new CreateGraphDialog(y,D,
-H);y.showDialog(K.container,620,420,!0,!1);K.init()}),v)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){for(var D=0;D<E.length;D++)"-"==E[D]?n.addSeparator(v):Q(n,v,mxResources.get(E[D])+"...",E[D])})))};EditorUi.prototype.installFormatToolbar=function(y){var A=this.editor.graph,x=document.createElement("div");x.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-A.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,M){0<A.getSelectionCount()?(y.appendChild(x),x.innerHTML="Selected: "+A.getSelectionCount()):null!=x.parentNode&&x.parentNode.removeChild(x)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;var y=this.formatWindow.window.toggleMinimized,A=240;this.formatWindow.window.toggleMinimized=function(){y.apply(this,arguments);this.minimized?(A=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+A-140+"px"):(this.div.style.width=A+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-A+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(x){mxEvent.getSource(x)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var z=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function y(da,ca,na){var ka=E.menus.get(da),pa=D.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ka.funct.apply(this,arguments)}),v);pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.top="6px";pa.style.marginRight="6px";pa.style.height="30px";pa.style.paddingTop="6px";pa.style.paddingBottom="6px";pa.style.cursor="pointer";pa.setAttribute("title",mxResources.get(da));E.menus.menuCreated(ka,
-pa,"geMenuItem");null!=na?(pa.style.backgroundImage="url("+na+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat="no-repeat",pa.style.backgroundSize="24px 24px",pa.style.width="34px",pa.innerText=""):ca||(pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",pa.style.backgroundPosition="right 6px center",pa.style.backgroundRepeat="no-repeat",pa.style.paddingRight="22px");return pa}function A(da,ca,na,ka,pa,ea){var ia=document.createElement("a");ia.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position="relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=E.statusContainer?n.insertBefore(ia,E.statusContainer):n.appendChild(ia);null!=ea?(ia.style.backgroundImage="url("+ea+")",ia.style.backgroundPosition=
-"center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,da);mxEvent.addListener(ia,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(oa){oa.preventDefault()}));mxEvent.addListener(ia,"click",function(oa){"disabled"!=ia.getAttribute("disabled")&&ca(oa);mxEvent.consume(oa)});null==na&&(ia.style.marginRight="4px");null!=ka&&ia.setAttribute("title",ka);null!=pa&&(da=function(){pa.isEnabled()?(ia.removeAttribute("disabled"),
-ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},pa.addListener("stateChanged",da),Q.addListener("enabledChanged",da),da());return ia}function x(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");
-for(var ka=0;ka<da.length;ka++)null!=da[ka]&&("1"==urlParams.sketch&&(da[ka].style.padding="10px 8px",da[ka].style.width="30px"),da[ka].style.margin="0px",da[ka].style.boxShadow="none",na.appendChild(da[ka]));null!=ca&&mxUtils.setOpacity(na,ca);null!=E.statusContainer&&"1"!=urlParams.sketch?n.insertBefore(na,E.statusContainer):n.appendChild(na);return na}function I(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>U.offsetTop-U.offsetHeight/2?"70px":"10px");else{for(var da=n.firstChild;null!=
-da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}v=n.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>d||"1"==urlParams.sketch;var na=null;da||(na=y("diagram"));ca=da?y("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);x([na,A(mxResources.get("shapes"),E.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),E.actions.get("image"),da?Editor.shapesImage:null),A(mxResources.get("format"),
-E.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+E.actions.get("formatPanel").shortcut+")",E.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=y("insert",!0,da?T:null);x([ca,A(mxResources.get("delete"),E.actions.get("delete").funct,null,mxResources.get("delete"),E.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=d&&(x([ma,Ga],60),520<=d&&x([Ba,640<=d?A("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ba,Editor.zoomInImage):
-null,640<=d?A("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",fa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&E.appIconClicked(ka)}),null,null));ca=E.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.embed&&
-"1"!=urlParams.sketch?(null==xa&&(ca=D.addMenu("",ca.funct),ca.setAttribute("title","language"),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="22px 22px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="12px",n.appendChild(ca),xa=ca),E.buttonContainer.style.paddingRight=
-"34px"):(E.buttonContainer.style.paddingRight="4px",null!=xa&&(xa.parentNode.removeChild(xa),xa=null))}z.apply(this,arguments);var M=document.createElement("div");M.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";M.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(M);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||
-8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
-null==E.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=E.embedViewport.x+E.embedViewport.width,ka=parseInt(this.div.offsetTop),pa=parseInt(this.div.offsetHeight),ea=E.embedViewport.y+E.embedViewport.height;this.div.style.left=Math.max(E.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ka,ea-pa))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+
-"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),M=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>M)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));
-E=this;var Q=E.editor.graph;E.toolbar=this.createToolbar(E.createDiv("geToolbar"));E.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.className="geMenubarContainer";var v=null,D=new Menubar(E,n);E.statusContainer=E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor=
-"default";var H=E.hideCurrentMenu;E.hideCurrentMenu=function(){H.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var K=E.descriptorChanged;E.descriptorChanged=function(){K.apply(this,arguments);var da=E.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);n.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else n.removeAttribute("title")};
-E.setStatusText(E.editor.getStatus());n.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(E.buttonContainer);E.menubarContainer=E.buttonContainer;E.tabContainer=document.createElement("div");E.tabContainer.className="geTabContainer";E.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-M=E.diagramContainer.parentNode;var G=document.createElement("div");G.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";E.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){G.style.top="20px";E.titlebar=document.createElement("div");E.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var N=document.createElement("div");
-N.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";E.titlebar.appendChild(N);M.appendChild(E.titlebar)}var T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,U="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,l=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left=
-"10px",X.style.top="10px",U.style.left="10px",U.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",E.diagramContainer.setAttribute("data-bounds",E.diagramContainer.style.top+" "+E.diagramContainer.style.left+" "+E.diagramContainer.style.width+" "+E.diagramContainer.style.height),E.diagramContainer.style.top="0px",E.diagramContainer.style.left="0px",E.diagramContainer.style.bottom="0px",E.diagramContainer.style.right="0px",E.diagramContainer.style.width="",E.diagramContainer.style.height=
-"";else{var da=E.diagramContainer.getAttribute("data-bounds");if(null!=da){E.diagramContainer.style.background="transparent";E.diagramContainer.removeAttribute("data-bounds");var ca=Q.getGraphBounds();da=da.split(" ");E.diagramContainer.style.top=da[0];E.diagramContainer.style.left=da[1];E.diagramContainer.style.width=ca.width+50+"px";E.diagramContainer.style.height=ca.height+46+"px";E.diagramContainer.style.bottom="";E.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:E.diagramContainer.getBoundingClientRect()}),"*");E.refresh()}X.style.left=E.diagramContainer.offsetLeft+"px";X.style.top=E.diagramContainer.offsetTop-X.offsetHeight-4+"px";U.style.display="";U.style.left=E.diagramContainer.offsetLeft-U.offsetWidth-4+"px";U.style.top=E.diagramContainer.offsetTop+"px";V.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=X.style.top;V.style.right="";E.bottomResizer.style.left=E.diagramContainer.offsetLeft+(E.diagramContainer.offsetWidth-
-E.bottomResizer.offsetWidth)/2+"px";E.bottomResizer.style.top=E.diagramContainer.offsetTop+E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight/2-1+"px";E.rightResizer.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-E.rightResizer.offsetWidth/2-1+"px";E.rightResizer.style.top=E.diagramContainer.offsetTop+(E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight)/2+"px"}E.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";E.rightResizer.style.visibility=
-E.bottomResizer.style.visibility;n.style.display="none";X.style.visibility="";V.style.visibility=""});N=E.actions.get("fullscreen");var B=A("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),L=mxUtils.bind(this,function(){B.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";l()});N=mxUtils.bind(this,function(){b(E,
-!0);E.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);L()});E.addListener("inlineFullscreenChanged",L);E.addListener("editInlineStart",N);"1"==urlParams.embedInline&&E.addListener("darkModeChanged",N);E.addListener("editInlineStop",mxUtils.bind(this,function(da){E.diagramContainer.style.width="10px";E.diagramContainer.style.height="10px";E.diagramContainer.style.border="";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility=
-"hidden";X.style.visibility="hidden";V.style.visibility="hidden";U.style.display="none"}));if(null!=E.hoverIcons){var P=E.hoverIcons.update;E.hoverIcons.update=function(){Q.freehand.isDrawing()||P.apply(this,arguments)}}if(null!=Q.freehand){var O=Q.freehand.createStyle;Q.freehand.createStyle=function(da){return O.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){U.className="geToolbarContainer";V.className="geToolbarContainer";X.className="geToolbarContainer";n.className="geToolbarContainer";
-E.picker=U;E.sketchPickerMenuElt=U;var R=!1;"1"!=urlParams.embed&&"atlassian"!=E.getServiceName()&&(mxEvent.addListener(n,"mouseenter",function(){E.statusContainer.style.display="inline-block"}),mxEvent.addListener(n,"mouseleave",function(){R||(E.statusContainer.style.display="none")}));var S=mxUtils.bind(this,function(da){null!=E.notificationBtn&&(null!=da?E.notificationBtn.setAttribute("title",da):E.notificationBtn.removeAttribute("title"))});n.style.visibility=20>n.clientWidth?"hidden":"";E.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=E.getServiceName())if(E.statusContainer.style.display="inline-block",R=!0,1==E.statusContainer.children.length&&""==E.editor.getStatus())n.style.visibility="hidden";else{if(0==E.statusContainer.children.length||1==E.statusContainer.children.length&&"function"===typeof E.statusContainer.firstChild.getAttribute&&null==E.statusContainer.firstChild.getAttribute("class")){var da=null!=E.statusContainer.firstChild&&
-"function"===typeof E.statusContainer.firstChild.getAttribute?E.statusContainer.firstChild.getAttribute("title"):E.editor.getStatus();S(da);var ca=E.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(E.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',E.statusContainer.style.display="inline-block",R=!0):6<E.buttonContainer.clientWidth&&(E.statusContainer.style.display=
-"none",R=!1)}else E.statusContainer.style.display="inline-block",S(null),R=!0;n.style.visibility=20>n.clientWidth&&!R?"hidden":""}}));qa=y("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";X.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),
-null,null);E.statusContainer.style.position="";E.statusContainer.style.display="none";E.statusContainer.style.margin="0px";E.statusContainer.style.padding="6px 0px";E.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";E.statusContainer.style.display="inline-block";E.statusContainer.style.textOverflow="ellipsis";E.buttonContainer.style.display="inline-block";E.buttonContainer.style.position="relative";E.buttonContainer.style.paddingRight="0px";E.buttonContainer.style.top="0px";var W=document.createElement("a");
-W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var aa=!1,Y=mxUtils.bind(this,function(){U.innerText="";if(!aa){var da=function(ca,na,ka,pa){null!=na&&ca.setAttribute("title",na);ca.style.cursor=
-null!=ka?ka:"default";ca.style.margin="2px 0px";U.appendChild(ca);mxUtils.br(U);null!=pa&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,pa),ca.appendChild(na));return ca};da(E.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+
-" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(E.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(E.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(E.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,Q.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
-0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;da(E.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ca.geometry.width=Q.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
-20),!1);da(E.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,ka,pa){ca=A("",ca.funct,null,na,ca,ka);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",pa)})(E.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");qa=y("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";
-qa.style.margin="0px";qa.style.height="34px";qa.style.width="37px";da(qa,null,"pointer")}"1"!=urlParams.embedInline&&U.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){aa?(mxUtils.setPrefixedStyle(U.style,"transform","translate(0, -50%)"),U.style.padding="8px 6px 4px",U.style.top="50%",U.style.bottom="",U.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),aa=!1,
-Y()):(U.innerText="",U.appendChild(W),mxUtils.setPrefixedStyle(U.style,"transform","translate(0, 0)"),U.style.top="",U.style.bottom="12px",U.style.padding="0px",U.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",aa=!0)}));Y();E.addListener("darkModeChanged",Y);E.addListener("sketchModeChanged",Y)}else E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus())}));
-N=E.menus.get("viewZoom");if(null!=N){var Z=function(da){if(mxEvent.isAltDown(da))E.hideCurrentMenu(),E.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))E.hideCurrentMenu(),E.actions.get("smartFit").funct(),mxEvent.consume(da)},ba=E.actions.get("zoomIn"),fa=E.actions.get("zoomOut"),ja=E.actions.get("resetView"),ha=E.actions.get("undo"),ra=E.actions.get("redo"),ma=A("",ha.funct,null,mxResources.get("undo")+" ("+ha.shortcut+
-")",ha,Editor.undoImage),Ga=A("",ra.funct,null,mxResources.get("redo")+" ("+ra.shortcut+")",ra,Editor.redoImage);if(null!=V){ja=function(){Fa.style.display=null!=E.pages&&("0"!=urlParams.pages||1<E.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ea=function(){Fa.innerText="";if(null!=E.currentPage){mxUtils.write(Fa,E.currentPage.getName());var da=null!=E.pages?E.pages.length:1,ca=E.getPageIndex(E.currentPage);ca=null!=ca?ca+1:1;var na=E.currentPage.getId();Fa.setAttribute("title",E.currentPage.getName()+
-" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},za=E.actions.get("delete"),Pa=A("",za.funct,null,mxResources.get("delete"),za,Editor.trashImage);Pa.style.opacity="0.3";X.appendChild(Pa);za.addListener("stateChanged",function(){Pa.style.opacity=za.enabled?"":"0.3"});var Aa=function(){ma.style.display=0<E.editor.undoManager.history.length||Q.isEditing()?"inline-block":"none";Ga.style.display=ma.style.display;ma.style.opacity=ha.enabled?"":"0.3";Ga.style.opacity=ra.enabled?"":"0.3"};X.appendChild(ma);
-X.appendChild(Ga);ha.addListener("stateChanged",Aa);ra.addListener("stateChanged",Aa);Aa();var Fa=this.createPageMenuTab(!1,!0);Fa.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";V.appendChild(Fa);E.editor.addListener("pagesPatched",Ea);E.editor.addListener("pageSelected",Ea);E.editor.addListener("pageRenamed",Ea);E.editor.addListener("fileLoaded",Ea);Ea();E.addListener("fileDescriptorChanged",ja);E.addListener("pagesVisibleChanged",
-ja);E.editor.addListener("pagesPatched",ja);ja();ja=A("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",fa,Editor.zoomOutImage);V.appendChild(ja);var qa=D.addMenu("100%",N.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign=
-"top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";V.appendChild(qa);N=A("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ba,Editor.zoomInImage);V.appendChild(N);"1"==urlParams.embedInline?(V.appendChild(B),N=E.actions.get("exit"),V.appendChild(A("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):B.parentNode.removeChild(B);E.tabContainer.style.visibility="hidden";n.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";G.appendChild(X);G.appendChild(V);U.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(U.style.touchAction="none");G.appendChild(U);window.setTimeout(function(){mxUtils.setPrefixedStyle(U.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(G)}else{var Ba=A("",Z,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ja,Editor.zoomFitImage);n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=D.addMenu("100%",
-N.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(E.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(E.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width=
-"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";G.appendChild(qa)}(function(da){mxEvent.addListener(da,"click",Z);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*E.editor.graph.view.scale)+"%")});E.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);E.editor.addListener("resetGraphView",ca);E.editor.addListener("pageSelected",
-ca)})(qa);var Ra=E.setGraphEnabled;E.setGraphEnabled=function(){Ra.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}G.appendChild(n);G.appendChild(E.diagramContainer);M.appendChild(G);E.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&G.appendChild(E.tabContainer);
-var xa=null;I();mxEvent.addListener(window,"resize",function(){I();null!=E.sidebarWindow&&E.sidebarWindow.window.fit();null!=E.formatWindow&&E.formatWindow.window.fit();null!=E.actions.outlineWindow&&E.actions.outlineWindow.window.fit();null!=E.actions.layersWindow&&E.actions.layersWindow.window.fit();null!=E.menus.tagsWindow&&E.menus.tagsWindow.window.fit();null!=E.menus.findWindow&&E.menus.findWindow.window.fit();null!=E.menus.findReplaceWindow&&E.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";U.style.transform="";mxEvent.addGestureListeners(E.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==E.diagramContainer.parentNode&&(E.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),E.sendEmbeddedSvgExport())});M=document.createElement("div");M.style.position="absolute";M.style.width="10px";M.style.height="10px";M.style.borderRadius="5px";M.style.border="1px solid gray";M.style.background="#ffffff";M.style.cursor=
-"row-resize";E.diagramContainer.parentNode.appendChild(M);E.bottomResizer=M;var Da=null,va=null,Ka=null,la=null;mxEvent.addGestureListeners(M,function(da){la=parseInt(E.diagramContainer.style.height);va=mxEvent.getClientY(da);Q.popupMenuHandler.hideMenu();mxEvent.consume(da)});M=M.cloneNode(!1);M.style.cursor="col-resize";E.diagramContainer.parentNode.appendChild(M);E.rightResizer=M;mxEvent.addGestureListeners(M,function(da){Ka=parseInt(E.diagramContainer.style.width);Da=mxEvent.getClientX(da);Q.popupMenuHandler.hideMenu();
-mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Da&&(E.diagramContainer.style.width=Math.max(20,Ka+mxEvent.getClientX(da)-Da)+"px",ca=!0);null!=va&&(E.diagramContainer.style.height=Math.max(20,la+mxEvent.getClientY(da)-va)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:E.diagramContainer.getBoundingClientRect()}),"*"),l(),E.refresh())},function(da){null==Da&&null==
-va||mxEvent.consume(da);va=Da=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";X.style.visibility="hidden";V.style.visibility="hidden";U.style.display="none"}"1"==urlParams.prefetchFonts&&E.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,C){var F=t.y,J=t.x,c=!1,e=!1;if(null!=this.states&&null!=d&&null!=t){var g=this,m=new mxCellState,p=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);m.x=d.x+J;m.y=d.y+F;m.width=d.width;m.height=d.height;for(var z=[],y=[],A=0;A<this.states.length;A++){var x=this.states[A];x instanceof mxCellState&&(C||!this.graph.isCellSelected(x.cell))&&((m.x>=x.x&&m.x<=x.x+x.width||x.x>=m.x&&x.x<=m.x+m.width)&&(m.y>
-x.y+x.height+4||m.y+m.height+4<x.y)?z.push(x):(m.y>=x.y&&m.y<=x.y+x.height||x.y>=m.y&&x.y<=m.y+m.height)&&(m.x>x.x+x.width+4||m.x+m.width+4<x.x)&&y.push(x))}var I=0,M=0,E=x=0,Q=0,n=0,v=0,D=0,H=5*p;if(1<z.length){z.push(m);z.sort(function(T,V){return T.y-V.y});var K=!1;A=m==z[0];p=m==z[z.length-1];if(!A&&!p)for(A=1;A<z.length-1;A++)if(m==z[A]){p=z[A-1];A=z[A+1];x=M=E=(A.y-p.y-p.height-m.height)/2;break}for(A=0;A<z.length-1;A++){p=z[A];var G=z[A+1],N=m==p||m==G;G=G.y-p.y-p.height;K|=m==p;if(0==M&&0==
-I)M=G,I=1;else if(Math.abs(M-G)<=(N||1==A&&K?q:0))I+=1;else if(1<I&&K){z=z.slice(0,A+1);break}else if(3<=z.length-A&&!K)I=0,x=M=0!=E?E:0,z.splice(0,0==A?1:A),A=-1;else break;0!=x||N||(M=x=G)}3==z.length&&z[1]==m&&(x=0)}if(1<y.length){y.push(m);y.sort(function(T,V){return T.x-V.x});K=!1;A=m==y[0];p=m==y[y.length-1];if(!A&&!p)for(A=1;A<y.length-1;A++)if(m==y[A]){p=y[A-1];A=y[A+1];v=n=D=(A.x-p.x-p.width-m.width)/2;break}for(A=0;A<y.length-1;A++){p=y[A];G=y[A+1];N=m==p||m==G;G=G.x-p.x-p.width;K|=m==p;
-if(0==n&&0==Q)n=G,Q=1;else if(Math.abs(n-G)<=(N||1==A&&K?q:0))Q+=1;else if(1<Q&&K){y=y.slice(0,A+1);break}else if(3<=y.length-A&&!K)Q=0,v=n=0!=D?D:0,y.splice(0,0==A?1:A),A=-1;else break;0!=v||N||(n=v=G)}3==y.length&&y[1]==m&&(v=0)}q=function(T,V,U,X){var l=[];if(X){X=H;var B=0}else X=0,B=H;l.push(new mxPoint(T.x-X,T.y-B));l.push(new mxPoint(T.x+X,T.y+B));l.push(T);l.push(V);l.push(new mxPoint(V.x-X,V.y-B));l.push(new mxPoint(V.x+X,V.y+B));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};n=function(T,V){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(V&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<Q&&Q==y.length-1){Q=[];D=g.guidesArrHor;c=[];J=0;A=y[0]==m?1:0;K=y[A].y+y[A].height;if(0<v)for(A=0;A<y.length-1;A++)p=
-y[A],G=y[A+1],m==p?(J=G.x-p.width-v,c.push(new mxPoint(J+p.width+H,K)),c.push(new mxPoint(G.x-H,K))):m==G?(c.push(new mxPoint(p.x+p.width+H,K)),J=p.x+p.width+v,c.push(new mxPoint(J-H,K))):(c.push(new mxPoint(p.x+p.width+H,K)),c.push(new mxPoint(G.x-H,K)));else p=y[0],A=y[2],J=p.x+p.width+(A.x-p.x-p.width-m.width)/2,c.push(new mxPoint(p.x+p.width+H,K)),c.push(new mxPoint(J-H,K)),c.push(new mxPoint(J+m.width+H,K)),c.push(new mxPoint(A.x-H,K));for(A=0;A<c.length;A+=2)y=c[A],v=c[A+1],y=q(y,v,null!=D?
-D[A/2]:null),y.node.style.visibility="visible",y.redraw(),Q.push(y);for(A=c.length/2;null!=D&&A<D.length;A++)D[A].destroy();g.guidesArrHor=Q;J-=d.x;c=!0}else n(!0);if(1<I&&I==z.length-1){Q=[];D=g.guidesArrVer;e=[];F=0;A=z[0]==m?1:0;I=z[A].x+z[A].width;if(0<x)for(A=0;A<z.length-1;A++)p=z[A],G=z[A+1],m==p?(F=G.y-p.height-x,e.push(new mxPoint(I,F+p.height+H)),e.push(new mxPoint(I,G.y-H))):m==G?(e.push(new mxPoint(I,p.y+p.height+H)),F=p.y+p.height+x,e.push(new mxPoint(I,F-H))):(e.push(new mxPoint(I,p.y+
-p.height+H)),e.push(new mxPoint(I,G.y-H)));else p=z[0],A=z[2],F=p.y+p.height+(A.y-p.y-p.height-m.height)/2,e.push(new mxPoint(I,p.y+p.height+H)),e.push(new mxPoint(I,F-H)),e.push(new mxPoint(I,F+m.height+H)),e.push(new mxPoint(I,A.y-H));for(A=0;A<e.length;A+=2)y=e[A],v=e[A+1],y=q(y,v,null!=D?D[A/2]:null,!0),y.node.style.visibility="visible",y.redraw(),Q.push(y);for(A=e.length/2;null!=D&&A<D.length;A++)D[A].destroy();g.guidesArrVer=Q;F-=d.y;e=!0}else n(!1,!0)}if(c||e)return m=new mxPoint(J,F),z=b.call(this,
-d,m,u,C),c&&!e?m.y=z.y:e&&!c&&(m.x=z.x),z.y!=m.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=m.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),m;n(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var C=0;C<t.length;C++)t[C].node.style.visibility=d?"visible":"hidden";if(null!=
-u)for(C=0;C<u.length;C++)u[C].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function t(){var I=b.diagramContainer;g.style.top=I.offsetTop-J+"px";g.style.left=I.offsetLeft-J+"px";g.style.width=(k?0:I.offsetWidth)+J+"px";g.style.height=(k?I.offsetHeight:0)+J+"px"}function u(I,M,E){if(null!=C)return I;var Q;return function(){var n=this,v=arguments,D=E&&!Q;clearTimeout(Q);Q=setTimeout(function(){Q=null;E||I.apply(n,v)},M);D&&I.apply(n,v)}}var C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,c=this;this.unit=f;var e=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){e=Editor.isDarkMode()?
-{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=e.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+e.strokeClr;g.style.borderLeft="0.5px solid "+e.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh=
-function(I){c.editorUiRefresh.apply(b,arguments);t()};t();var m=document.createElement("canvas");m.width=g.offsetWidth;m.height=g.offsetHeight;g.style.overflow="hidden";m.style.position="relative";g.appendChild(m);var p=m.getContext("2d");this.ui=b;var q=b.editor.graph;this.graph=q;this.container=g;this.canvas=m;var z=function(I,M,E,Q,n){I=Math.round(I);M=Math.round(M);E=Math.round(E);Q=Math.round(Q);p.beginPath();p.moveTo(I+.5,M+.5);p.lineTo(E+.5,Q+.5);p.stroke();n&&(k?(p.save(),p.translate(I,M),
-p.rotate(-Math.PI/2),p.fillText(n,0,0),p.restore()):p.fillText(n,I,M))},y=function(){p.clearRect(0,0,m.width,m.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=e.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var I=q.view.scale,M=q.view.getBackgroundPageBounds(),E=q.view.translate,Q=q.pageVisible;E=Q?J+(k?M.y-q.container.scrollTop:M.x-q.container.scrollLeft):J+(k?E.y*I-q.container.scrollTop:E.x*I-q.container.scrollLeft);var n=0;Q&&(n=q.getPageLayout(),n=k?n.y*q.pageFormat.height:
-n.x*q.pageFormat.width);var v;switch(c.unit){case mxConstants.POINTS:var D=v=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:v=10;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:v=20;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:v=.5>=I||4<=I?8:16,D=mxConstants.PIXELS_PER_INCH/v,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=D;2<=I?K=D/(2*Math.floor(I/2)):.5>=I&&(K=D*Math.floor(1/I/2)*(c.unit==
-mxConstants.MILLIMETERS?2:1));D=null;M=Q?Math.min(E+(k?M.height:M.width),k?m.height:m.width):k?m.height:m.width;if(Q)if(p.fillStyle=e.outBkgClr,k){var G=E-J;0<G&&p.fillRect(0,J,J,G);M<m.height&&p.fillRect(0,M,J,m.height)}else G=E-J,0<G&&p.fillRect(J,0,G,J),M<m.width&&p.fillRect(M,0,m.width,J);p.fillStyle=e.fontClr;for(Q=Q?E:E%(K*I);Q<=M;Q+=K*I)if(G=Math.round((Q-E)/I/K),!(Q<J||G==D)){D=G;var N=null;0==G%v&&(N=c.formatText(n+G*K)+"");k?z(J-H[Math.abs(G)%v],Q,J,Q,N):z(Q,J-H[Math.abs(G)%v],Q,J,N)}p.lineWidth=
-1;z(k?0:J,k?J:0,J,J);p.fillStyle=e.cornerClr;p.fillRect(0,0,J,J)},A=-1,x=function(){null!=C?(null!=F&&F(A),A=C(y)):y()};this.drawRuler=x;this.sizeListener=f=u(function(){var I=q.container;k?(I=I.offsetHeight+J,m.height!=I&&(m.height=I,g.style.height=I+"px",x())):(I=I.offsetWidth+J,m.width!=I&&(m.width=I,g.style.width=I+"px",x()))},10);this.pageListener=function(){x()};this.scrollListener=d=u(function(){var I=k?q.container.scrollTop:q.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,x())},10);
-this.unitListener=function(I,M){c.setUnit(M.getProperty("unit"))};q.addListener(mxEvent.SIZE,f);q.container.addEventListener("scroll",d);q.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){e=I;g.style.background=e.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,M,E,Q){if(k&&4<I.height||
-!k&&4<I.width){if(null!=c.guidePart)try{p.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),p.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),p.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(X){}var n=c.origGuideMove.apply(this,arguments);try{p.lineWidth=.5;p.strokeStyle=e.guideClr;p.setLineDash([2]);if(k){var v=I.y+n.y+J-this.graph.container.scrollTop;var D=0;var H=v+I.height/2;var K=J/2;var G=v+I.height;var N=0;var T=p.getImageData(D,v-1,J,
-3);z(D,v,J,v);v--;var V=p.getImageData(K,H-1,J,3);z(K,H,J,H);H--;var U=p.getImageData(N,G-1,J,3);z(N,G,J,G);G--}else v=0,D=I.x+n.x+J-this.graph.container.scrollLeft,H=J/2,K=D+I.width/2,G=0,N=D+I.width,T=p.getImageData(D-1,v,3,J),z(D,v,D,J),D--,V=p.getImageData(K-1,H,3,J),z(K,H,K,J),K--,U=p.getImageData(N-1,G,3,J),z(N,G,N,J),N--;if(null==c.guidePart||c.guidePart.x1!=D||c.guidePart.y1!=v)c.guidePart={imgData1:T,x1:D,y1:v,imgData2:V,x2:K,y2:H,imgData3:U,x3:N,y3:G}}catch(X){}}else n=c.origGuideMove.apply(this,
-arguments);return n};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=c.origGuideDestroy.apply(this,arguments);if(null!=c.guidePart)try{p.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),p.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),p.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3),c.guidePart=null}catch(M){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var v=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");v.apply(this,arguments)};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var D=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(n,t){null!=t.shortcut&&900>d&&!mxClient.IS_IOS?n.firstChild.nextSibling.setAttribute("title",t.shortcut):D.apply(this,arguments)};var G=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){G.apply(this,arguments);if(null!=this.userElement){var n=this.userElement;n.style.cssText="position:relative;cursor:pointer;display:"+n.style.display;n.className="geToolbarButton";
+n.innerText="";n.style.backgroundImage="url("+Editor.userImage+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="24px 24px";n.style.height="24px";n.style.width="24px";var t=mxResources.get("changeUser");if("none"!=n.style.display){n.style.display="inline-block";var y=this.getCurrentFile();if(null!=y&&y.isRealtimeEnabled()&&y.isRealtimeSupported()){var A=document.createElement("img");A.setAttribute("border","0");A.style.position="absolute";
+A.style.left="18px";A.style.top="2px";A.style.width="12px";A.style.height="12px";var C=y.getRealtimeError();y=y.getRealtimeState();t+=" ("+mxResources.get("realtimeCollaboration")+": ";1==y?(A.src=Editor.syncImage,t+=mxResources.get("online")):(A.src=Editor.syncProblemImage,t=null!=C&&null!=C.message?t+C.message:t+mxResources.get("disconnected"));n.style.marginRight="6px";n.appendChild(A);t+=")"}}n.setAttribute("title",t)}};var H=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){H.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var n=document.createElement("div");n.style.display="inline-block";n.style.position="relative";n.style.marginTop="6px";n.style.marginRight="4px";var t=document.createElement("a");t.className="geMenuItem gePrimaryBtn";t.style.marginLeft="8px";t.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var y="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(t,y);t.setAttribute("title",y);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));n.appendChild(t)}}else mxUtils.write(t,mxResources.get("save")),t.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),n.appendChild(t),
+"1"==urlParams.saveAndExit&&(t=document.createElement("a"),mxUtils.write(t,mxResources.get("saveAndExit")),t.setAttribute("title",mxResources.get("saveAndExit")),t.className="geMenuItem",t.style.marginLeft="6px",t.style.padding="6px",mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),n.appendChild(t));"1"!=urlParams.noExitBtn&&(t=document.createElement("a"),y="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(t,
+y),t.setAttribute("title",y),t.className="geMenuItem",t.style.marginLeft="6px",t.style.padding="6px",mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),n.appendChild(t));this.buttonContainer.appendChild(n);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var I=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(n,t,y){var A=this.editorUi.editor.graph;n.smartSeparators=!0;I.apply(this,arguments);
+"1"==urlParams.sketch?A.isEnabled()&&(n.addSeparator(),1==A.getSelectionCount()&&this.addMenuItems(n,["-","lockUnlock"],null,y)):1==A.getSelectionCount()?(A.isCellFoldable(A.getSelectionCell())&&this.addMenuItems(n,A.isCellCollapsed(t)?["expand"]:["collapse"],null,y),this.addMenuItems(n,["collapsible","-","lockUnlock","enterGroup"],null,y),n.addSeparator(),this.addSubmenu("layout",n)):A.isSelectionEmpty()&&A.isEnabled()?(n.addSeparator(),this.addMenuItems(n,["editData"],null,y),n.addSeparator(),this.addSubmenu("layout",
+n),this.addSubmenu("insert",n),this.addMenuItems(n,["-","exitGroup"],null,y)):A.isEnabled()&&this.addMenuItems(n,["-","lockUnlock"],null,y)};var F=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(n,t,y){F.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(n,["copyAsImage"],null,y)};EditorUi.prototype.toggleFormatPanel=function(n){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=n?n:!this.formatWindow.window.isVisible()):
+b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var O=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();O.apply(this,arguments)};var c=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(n){c.apply(this,arguments);if(n){var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+1E3<=t&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=t||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,arguments);var n=this.editorUi,t=n.actions.put("togglePagesVisible",
+new Action(mxResources.get("pages"),function(l){n.setPagesVisible(!Editor.pagesVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return Editor.pagesVisible});n.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(n)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!n.isOffline()&&n.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var l=new ParseDialog(n,mxResources.get("plantUml")+"...","plantUml");n.showDialog(l.container,
+620,420,!0,!1);l.init()}));n.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var l=new ParseDialog(n,mxResources.get("mermaid")+"...","mermaid");n.showDialog(l.container,620,420,!0,!1);l.init()}));var y=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(l,q){var B=this.editorUi.editor.graph,J=B.getSelectionCell();y.call(this,l,J,null,q);this.addMenuItems(l,["editTooltip"],q);B.model.isVertex(J)&&this.addMenuItems(l,["editGeometry"],
+q);this.addMenuItems(l,["-","edit"],q)})));this.addPopupMenuCellEditItems=function(l,q,B,J){l.addSeparator();this.addSubmenu("editCell",l,J,mxResources.get("edit"))};var A=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(l,q){A.funct(l,q);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.menus.addMenuItems(l,["publishLink"],q);n.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(l.addSeparator(q),n.menus.addSubmenu("embed",l,q))})));var C=this.get("units");this.put("units",
+new Menu(mxUtils.bind(this,function(l,q){C.funct(l,q);this.addMenuItems(l,["-","ruler","-","pageScale"],q)})));var u="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),R=function(l,q,B,J){l.addItem(B,null,mxUtils.bind(this,function(){var M=new CreateGraphDialog(n,B,J);n.showDialog(M.container,620,420,!0,!1);M.init()}),q)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,q){for(var B=0;B<u.length;B++)"-"==u[B]?l.addSeparator(q):R(l,q,mxResources.get(u[B])+
+"...",u[B])})))};EditorUi.prototype.installFormatToolbar=function(n){var t=this.editor.graph,y=document.createElement("div");y.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";t.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(A,C){0<t.getSelectionCount()?(n.appendChild(y),y.innerHTML="Selected: "+t.getSelectionCount()):null!=
+y.parentNode&&y.parentNode.removeChild(y)}))};var g=!1;EditorUi.prototype.initFormatWindow=function(){if(!g&&null!=this.formatWindow){g=!0;var n=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,
+this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){function n(ea,aa,na){var la=u.menus.get(ea),pa=B.addMenu(mxResources.get(ea),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),q);pa.className="1"==
+urlParams.sketch?"geToolbarButton":"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.top="6px";pa.style.marginRight="6px";pa.style.height="30px";pa.style.paddingTop="6px";pa.style.paddingBottom="6px";pa.style.cursor="pointer";pa.setAttribute("title",mxResources.get(ea));u.menus.menuCreated(la,pa,"geMenuItem");null!=na?(pa.style.backgroundImage="url("+na+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat="no-repeat",pa.style.backgroundSize=
+"24px 24px",pa.style.width="34px",pa.innerText=""):aa||(pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",pa.style.backgroundPosition="right 6px center",pa.style.backgroundRepeat="no-repeat",pa.style.paddingRight="22px");return pa}function t(ea,aa,na,la,pa,ia){var ja=document.createElement("a");ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing="border-box";ja.style.height="30px";ja.style.padding="6px";ja.style.position=
+"relative";ja.style.verticalAlign="top";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.borderStyle="none",ja.style.boxShadow="none",ja.style.padding="6px",ja.style.margin="0px");null!=u.statusContainer?l.insertBefore(ja,u.statusContainer):l.appendChild(ja);null!=ia?(ja.style.backgroundImage="url("+ia+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px"):mxUtils.write(ja,ea);mxEvent.addListener(ja,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(oa){oa.preventDefault()}));mxEvent.addListener(ja,"click",function(oa){"disabled"!=ja.getAttribute("disabled")&&aa(oa);mxEvent.consume(oa)});null==na&&(ja.style.marginRight="4px");null!=la&&ja.setAttribute("title",la);null!=pa&&(ea=function(){pa.isEnabled()?(ja.removeAttribute("disabled"),ja.style.cursor="pointer"):(ja.setAttribute("disabled","disabled"),ja.style.cursor="default")},pa.addListener("stateChanged",ea),R.addListener("enabledChanged",
+ea),ea());return ja}function y(ea,aa,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<ea.length;la++)null!=ea[la]&&("1"==urlParams.sketch&&(ea[la].style.padding="10px 8px",ea[la].style.width="30px"),ea[la].style.margin="0px",ea[la].style.boxShadow=
+"none",na.appendChild(ea[la]));null!=aa&&mxUtils.setOpacity(na,aa);null!=u.statusContainer&&"1"!=urlParams.sketch?l.insertBefore(na,u.statusContainer):l.appendChild(na);return na}function A(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>V.offsetTop-V.offsetHeight/2?"70px":"10px");else{for(var ea=l.firstChild;null!=ea;){var aa=ea.nextSibling;"geMenuItem"!=ea.className&&"geItem"!=ea.className||ea.parentNode.removeChild(ea);ea=aa}q=l.firstChild;d=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;ea=1E3>d||"1"==urlParams.sketch;var na=null;ea||(na=n("diagram"));aa=ea?n("diagram",null,Editor.menuImage):null;null!=aa&&(na=aa);y([na,t(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),ea?Editor.shapesImage:null),t(mxResources.get("format"),u.actions.get("format").funct,null,mxResources.get("format")+" ("+u.actions.get("format").shortcut+")",u.actions.get("image"),ea?Editor.formatImage:null)],ea?60:null);
+aa=n("insert",!0,ea?P:null);y([aa,t(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),ea?Editor.trashImage:null)],ea?60:null);411<=d&&(y([za,xa],60),520<=d&&y([qa,640<=d?t("",fa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",fa,Editor.zoomInImage):null,640<=d?t("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
+mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&u.appIconClicked(la)}),null,null));aa=u.menus.get("language");null!=aa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==ua&&(aa=B.addMenu("",aa.funct),aa.setAttribute("title","language"),aa.className="geToolbarButton",aa.style.backgroundImage="url("+Editor.globeImage+")",aa.style.backgroundPosition=
+"center center",aa.style.backgroundRepeat="no-repeat",aa.style.backgroundSize="22px 22px",aa.style.position="absolute",aa.style.height="24px",aa.style.width="24px",aa.style.zIndex="1",aa.style.right="8px",aa.style.cursor="pointer",aa.style.top="12px",l.appendChild(aa),ua=aa),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight="4px",null!=ua&&(ua.parentNode.removeChild(ua),ua=null))}p.apply(this,arguments);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+C.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(C);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div);else{var ea=parseInt(this.div.offsetLeft),aa=parseInt(this.div.offsetWidth),na=u.embedViewport.x+u.embedViewport.width,la=parseInt(this.div.offsetTop),pa=parseInt(this.div.offsetHeight),ia=u.embedViewport.y+
+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(ea,na-aa))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(la,ia-pa))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),C=window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>C)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var R=u.editor.graph;u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var l=document.createElement("div");l.className="geMenubarContainer";var q=null,B=new Menubar(u,l);u.statusContainer=u.createStatusContainer();
+u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.marginTop="7px";u.statusContainer.style.marginLeft="6px";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var J=u.hideCurrentMenu;u.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=u.descriptorChanged;u.descriptorChanged=function(){M.apply(this,arguments);var ea=u.getCurrentFile();if(null!=ea&&null!=ea.getTitle()){var aa=
+ea.getMode();"google"==aa?aa="googleDrive":"github"==aa?aa="gitHub":"gitlab"==aa?aa="gitLab":"onedrive"==aa&&(aa="oneDrive");aa=mxResources.get(aa);l.setAttribute("title",ea.getTitle()+(null!=aa?" ("+aa+")":""))}else l.removeAttribute("title")};u.setStatusText(u.editor.getStatus());l.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+l.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";C=u.diagramContainer.parentNode;var E=document.createElement("div");E.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){E.style.top="20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var L=document.createElement("div");L.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(L);C.appendChild(u.titlebar)}var P=
+"1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?document.createElement("div"):null,V="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,m=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left="10px",X.style.top="10px",V.style.left="10px",V.style.top="60px",S.style.top="10px",S.style.right="12px",S.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+
+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top="0px",u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var ea=u.diagramContainer.getAttribute("data-bounds");if(null!=ea){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var aa=R.getGraphBounds();
+ea=ea.split(" ");u.diagramContainer.style.top=ea[0];u.diagramContainer.style.left=ea[1];u.diagramContainer.style.width=aa.width+50+"px";u.diagramContainer.style.height=aa.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}X.style.left=u.diagramContainer.offsetLeft+"px";X.style.top=u.diagramContainer.offsetTop-X.offsetHeight-4+
+"px";V.style.display="";V.style.left=u.diagramContainer.offsetLeft-V.offsetWidth-4+"px";V.style.top=u.diagramContainer.offsetTop+"px";S.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-S.offsetWidth+"px";S.style.top=X.style.top;S.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth-u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/
+2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility=u.bottomResizer.style.visibility;l.style.display="none";X.style.visibility="";S.style.visibility=""});L=u.actions.get("fullscreen");var z=t("",L.funct,
+null,mxResources.get(""),L,Editor.fullscreenImage),K=mxUtils.bind(this,function(){z.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";m()});L=mxUtils.bind(this,function(){b(u,!0);u.initFormatWindow();var ea=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ea.x+ea.width+4,ea.y);K()});
+u.addListener("inlineFullscreenChanged",K);u.addListener("editInlineStart",L);"1"==urlParams.embedInline&&u.addListener("darkModeChanged",L);u.addListener("editInlineStop",mxUtils.bind(this,function(ea){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";V.style.display="none"}));if(null!=u.hoverIcons){var Q=
+u.hoverIcons.update;u.hoverIcons.update=function(){R.freehand.isDrawing()||Q.apply(this,arguments)}}if(null!=R.freehand){var N=R.freehand.createStyle;R.freehand.createStyle=function(ea){return N.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){V.className="geToolbarContainer";S.className="geToolbarContainer";X.className="geToolbarContainer";l.className="geToolbarContainer";u.picker=V;u.sketchPickerMenuElt=V;var U=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(l,
+"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(l,"mouseleave",function(){U||(u.statusContainer.style.display="none")}));var T=mxUtils.bind(this,function(ea){null!=u.notificationBtn&&(null!=ea?u.notificationBtn.setAttribute("title",ea):u.notificationBtn.removeAttribute("title"))});l.style.visibility=20>l.clientWidth?"hidden":"";u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus());if("1"!=urlParams.embed&&
+"atlassian"!=u.getServiceName())if(u.statusContainer.style.display="inline-block",U=!0,1==u.statusContainer.children.length&&""==u.editor.getStatus())l.style.visibility="hidden";else{if(0==u.statusContainer.children.length||1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var ea=null!=u.statusContainer.firstChild&&"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):
+u.editor.getStatus();T(ea);var aa=u.getCurrentFile();aa=null!=aa?aa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ea==mxResources.get(aa)+"..."?(u.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(aa))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",U=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display="none",U=!1)}else u.statusContainer.style.display="inline-block",T(null),U=!0;l.style.visibility=20>l.clientWidth&&
+!U?"hidden":""}}));ra=n("diagram",null,Editor.menuImage);ra.style.boxShadow="none";ra.style.padding="6px";ra.style.margin="0px";X.appendChild(ra);mxEvent.disableContextMenu(ra);mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(ea){(mxEvent.isShiftDown(ea)||mxEvent.isAltDown(ea)||mxEvent.isMetaDown(ea)||mxEvent.isControlDown(ea)||mxEvent.isPopupTrigger(ea))&&this.appIconClicked(ea)}),null,null);u.statusContainer.style.position="";u.statusContainer.style.display="none";u.statusContainer.style.margin=
+"0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";u.statusContainer.style.display="inline-block";u.statusContainer.style.textOverflow="ellipsis";u.buttonContainer.style.display="inline-block";u.buttonContainer.style.position="relative";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.top="0px";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";
+W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var Z=!1,ca=mxUtils.bind(this,function(){V.innerText="";if(!Z){var ea=function(aa,na,la,pa){null!=na&&aa.setAttribute("title",na);aa.style.cursor=null!=la?la:"default";aa.style.margin="2px 0px";V.appendChild(aa);mxUtils.br(V);null!=pa&&(aa.style.position=
+"relative",aa.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,pa),aa.appendChild(na));return aa};ea(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ea(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ea(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ea(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var aa=new mxCell("",new mxGeometry(0,0,R.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");aa.geometry.setTerminalPoint(new mxPoint(0,0),!0);aa.geometry.setTerminalPoint(new mxPoint(aa.geometry.width,0),!1);aa.geometry.points=[];aa.geometry.relative=!0;aa.edge=!0;ea(u.sidebar.createEdgeTemplateFromCells([aa],aa.geometry.width,aa.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");aa=aa.clone();aa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+aa.geometry.width=R.defaultEdgeLength+20;aa.geometry.setTerminalPoint(new mxPoint(0,20),!0);aa.geometry.setTerminalPoint(new mxPoint(aa.geometry.width,20),!1);ea(u.sidebar.createEdgeTemplateFromCells([aa],aa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(aa,na,la,pa){aa=t("",aa.funct,null,na,aa,la);aa.style.width="40px";aa.style.height="34px";aa.style.opacity="0.7";return ea(aa,null,"pointer",pa)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");ra=n("insert",null,Editor.plusImage);ra.style.boxShadow="none";ra.style.opacity="0.7";ra.style.padding="6px";ra.style.margin="0px";ra.style.height="34px";ra.style.width="37px";ea(ra,null,"pointer")}"1"!=urlParams.embedInline&&V.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){Z?(mxUtils.setPrefixedStyle(V.style,"transform","translate(0, -50%)"),V.style.padding="8px 6px 4px",V.style.top="50%",V.style.bottom="",V.style.height="",W.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),Z=!1,ca()):(V.innerText="",V.appendChild(W),mxUtils.setPrefixedStyle(V.style,"transform","translate(0, 0)"),V.style.top="",V.style.bottom="12px",V.style.padding="0px",V.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",Z=!0)}));ca();u.addListener("darkModeChanged",
+ca);u.addListener("sketchModeChanged",ca)}else u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));L=u.menus.get("viewZoom");if(null!=L){var ba=function(ea){if(mxEvent.isAltDown(ea))u.hideCurrentMenu(),u.actions.get("customZoom").funct(),mxEvent.consume(ea);else if("geItem"!=mxEvent.getSource(ea).className||mxEvent.isShiftDown(ea))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(ea)},fa=u.actions.get("zoomIn"),Y=u.actions.get("zoomOut"),
+ha=u.actions.get("resetView"),da=u.actions.get("undo"),wa=u.actions.get("redo"),za=t("",da.funct,null,mxResources.get("undo")+" ("+da.shortcut+")",da,Editor.undoImage),xa=t("",wa.funct,null,mxResources.get("redo")+" ("+wa.shortcut+")",wa,Editor.redoImage);if(null!=S){ha=function(){Ea.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ta=function(){Ea.innerText="";if(null!=u.currentPage){mxUtils.write(Ea,u.currentPage.getName());var ea=
+null!=u.pages?u.pages.length:1,aa=u.getPageIndex(u.currentPage);aa=null!=aa?aa+1:1;var na=u.currentPage.getId();Ea.setAttribute("title",u.currentPage.getName()+" ("+aa+"/"+ea+")"+(null!=na?" ["+na+"]":""))}},ka=u.actions.get("delete"),Na=t("",ka.funct,null,mxResources.get("delete"),ka,Editor.trashImage);Na.style.opacity="0.3";X.appendChild(Na);ka.addListener("stateChanged",function(){Na.style.opacity=ka.enabled?"":"0.3"});var Ka=function(){za.style.display=0<u.editor.undoManager.history.length||R.isEditing()?
+"inline-block":"none";xa.style.display=za.style.display;za.style.opacity=da.enabled?"":"0.3";xa.style.opacity=wa.enabled?"":"0.3"};X.appendChild(za);X.appendChild(xa);da.addListener("stateChanged",Ka);wa.addListener("stateChanged",Ka);Ka();var Ea=this.createPageMenuTab(!1,!0);Ea.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";S.appendChild(Ea);u.editor.addListener("pagesPatched",ta);u.editor.addListener("pageSelected",
+ta);u.editor.addListener("pageRenamed",ta);u.editor.addListener("fileLoaded",ta);ta();u.addListener("fileDescriptorChanged",ha);u.addListener("pagesVisibleChanged",ha);u.editor.addListener("pagesPatched",ha);ha();ha=t("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,Editor.zoomOutImage);S.appendChild(ha);var ra=B.addMenu("100%",L.funct);ra.setAttribute("title",mxResources.get("zoom"));ra.innerHTML="100%";ra.style.display="inline-block";ra.style.color="inherit";ra.style.cursor=
+"pointer";ra.style.textAlign="center";ra.style.whiteSpace="nowrap";ra.style.paddingRight="10px";ra.style.textDecoration="none";ra.style.verticalAlign="top";ra.style.padding="6px 0";ra.style.fontSize="14px";ra.style.width="40px";S.appendChild(ra);L=t("",fa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",fa,Editor.zoomInImage);S.appendChild(L);"1"==urlParams.embedInline?(S.appendChild(z),L=u.actions.get("exit"),S.appendChild(t("",L.funct,null,mxResources.get("exit"),L,Editor.closeImage))):
+z.parentNode.removeChild(z);u.tabContainer.style.visibility="hidden";l.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+S.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";E.appendChild(X);E.appendChild(S);V.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(V.style.touchAction="none");E.appendChild(V);window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(E)}else{var qa=t("",ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ha,Editor.zoomFitImage);l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ra=B.addMenu("100%",L.funct);ra.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ra.style.whiteSpace="nowrap";ra.style.paddingRight=
+"10px";ra.style.textDecoration="none";ra.style.textDecoration="none";ra.style.overflow="hidden";ra.style.visibility="hidden";ra.style.textAlign="center";ra.style.cursor="pointer";ra.style.height=parseInt(u.tabContainerHeight)-1+"px";ra.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";ra.style.position="absolute";ra.style.display="block";ra.style.fontSize="12px";ra.style.width="59px";ra.style.right="0px";ra.style.bottom="0px";ra.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+ra.style.backgroundPosition="right 6px center";ra.style.backgroundRepeat="no-repeat";E.appendChild(ra)}(function(ea){mxEvent.addListener(ea,"click",ba);var aa=mxUtils.bind(this,function(){ea.innerText="";mxUtils.write(ea,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,aa);u.editor.addListener("resetGraphView",aa);u.editor.addListener("pageSelected",aa)})(ra);var Oa=u.setGraphEnabled;u.setGraphEnabled=function(){Oa.apply(this,arguments);null!=this.tabContainer&&
+(ra.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}E.appendChild(l);E.appendChild(u.diagramContainer);C.appendChild(E);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==S&&E.appendChild(u.tabContainer);var ua=null;A();mxEvent.addListener(window,"resize",function(){A();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();
+null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";V.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,
+function(ea){mxEvent.getSource(ea)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(ea),mxEvent.getClientY(ea)),u.sendEmbeddedSvgExport())});C=document.createElement("div");C.style.position="absolute";C.style.width="10px";C.style.height="10px";C.style.borderRadius="5px";C.style.border="1px solid gray";C.style.background="#ffffff";C.style.cursor="row-resize";u.diagramContainer.parentNode.appendChild(C);u.bottomResizer=C;var Ca=null,Ba=null,La=null,ma=null;mxEvent.addGestureListeners(C,
+function(ea){ma=parseInt(u.diagramContainer.style.height);Ba=mxEvent.getClientY(ea);R.popupMenuHandler.hideMenu();mxEvent.consume(ea)});C=C.cloneNode(!1);C.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(C);u.rightResizer=C;mxEvent.addGestureListeners(C,function(ea){La=parseInt(u.diagramContainer.style.width);Ca=mxEvent.getClientX(ea);R.popupMenuHandler.hideMenu();mxEvent.consume(ea)});mxEvent.addGestureListeners(document.body,null,function(ea){var aa=!1;null!=Ca&&(u.diagramContainer.style.width=
+Math.max(20,La+mxEvent.getClientX(ea)-Ca)+"px",aa=!0);null!=Ba&&(u.diagramContainer.style.height=Math.max(20,ma+mxEvent.getClientY(ea)-Ba)+"px",aa=!0);aa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),m(),u.refresh())},function(ea){null==Ca&&null==Ba||mxEvent.consume(ea);Ba=Ca=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
+u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";V.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,v,x,D){var G=v.y,H=v.x,I=!1,F=!1;if(null!=this.states&&null!=d&&null!=v){var O=this,c=new mxCellState,e=this.graph.getView().scale,g=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+H;c.y=d.y+G;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var y=this.states[t];y instanceof mxCellState&&(D||!this.graph.isCellSelected(y.cell))&&((c.x>=y.x&&c.x<=y.x+y.width||y.x>=c.x&&y.x<=c.x+c.width)&&(c.y>
+y.y+y.height+4||c.y+c.height+4<y.y)?p.push(y):(c.y>=y.y&&c.y<=y.y+y.height||y.y>=c.y&&y.y<=c.y+c.height)&&(c.x>y.x+y.width+4||c.x+c.width+4<y.x)&&n.push(y))}var A=0,C=0,u=y=0,R=0,l=0,q=0,B=0,J=5*e;if(1<p.length){p.push(c);p.sort(function(P,S){return P.y-S.y});var M=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];y=C=u=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var E=p[t+1],L=c==e||c==E;E=E.y-e.y-e.height;M|=c==e;if(0==C&&0==
+A)C=E,A=1;else if(Math.abs(C-E)<=(L||1==t&&M?g:0))A+=1;else if(1<A&&M){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!M)A=0,y=C=0!=u?u:0,p.splice(0,0==t?1:t),t=-1;else break;0!=y||L||(C=y=E)}3==p.length&&p[1]==c&&(y=0)}if(1<n.length){n.push(c);n.sort(function(P,S){return P.x-S.x});M=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];q=l=B=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];E=n[t+1];L=c==e||c==E;E=E.x-e.x-e.width;M|=c==e;
+if(0==l&&0==R)l=E,R=1;else if(Math.abs(l-E)<=(L||1==t&&M?g:0))R+=1;else if(1<R&&M){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!M)R=0,q=l=0!=B?B:0,n.splice(0,0==t?1:t),t=-1;else break;0!=q||L||(l=q=E)}3==n.length&&n[1]==c&&(q=0)}g=function(P,S,V,X){var m=[];if(X){X=J;var z=0}else X=0,z=J;m.push(new mxPoint(P.x-X,P.y-z));m.push(new mxPoint(P.x+X,P.y+z));m.push(P);m.push(S);m.push(new mxPoint(S.x-X,S.y-z));m.push(new mxPoint(S.x+X,S.y+z));if(null!=V)return V.points=m,V;P=new mxPolyline(m,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);P.dialect=mxConstants.DIALECT_SVG;P.pointerEvents=!1;P.init(O.graph.getView().getOverlayPane());return P};l=function(P,S){if(P&&null!=O.guidesArrHor)for(P=0;P<O.guidesArrHor.length;P++)O.guidesArrHor[P].node.style.visibility="hidden";if(S&&null!=O.guidesArrVer)for(P=0;P<O.guidesArrVer.length;P++)O.guidesArrVer[P].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];B=O.guidesArrHor;I=[];H=0;t=n[0]==c?1:0;M=n[t].y+n[t].height;if(0<q)for(t=0;t<n.length-1;t++)e=
+n[t],E=n[t+1],c==e?(H=E.x-e.width-q,I.push(new mxPoint(H+e.width+J,M)),I.push(new mxPoint(E.x-J,M))):c==E?(I.push(new mxPoint(e.x+e.width+J,M)),H=e.x+e.width+q,I.push(new mxPoint(H-J,M))):(I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(E.x-J,M)));else e=n[0],t=n[2],H=e.x+e.width+(t.x-e.x-e.width-c.width)/2,I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(H-J,M)),I.push(new mxPoint(H+c.width+J,M)),I.push(new mxPoint(t.x-J,M));for(t=0;t<I.length;t+=2)n=I[t],q=I[t+1],n=g(n,q,null!=B?
+B[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=I.length/2;null!=B&&t<B.length;t++)B[t].destroy();O.guidesArrHor=R;H-=d.x;I=!0}else l(!0);if(1<A&&A==p.length-1){R=[];B=O.guidesArrVer;F=[];G=0;t=p[0]==c?1:0;A=p[t].x+p[t].width;if(0<y)for(t=0;t<p.length-1;t++)e=p[t],E=p[t+1],c==e?(G=E.y-e.height-y,F.push(new mxPoint(A,G+e.height+J)),F.push(new mxPoint(A,E.y-J))):c==E?(F.push(new mxPoint(A,e.y+e.height+J)),G=e.y+e.height+y,F.push(new mxPoint(A,G-J))):(F.push(new mxPoint(A,e.y+
+e.height+J)),F.push(new mxPoint(A,E.y-J)));else e=p[0],t=p[2],G=e.y+e.height+(t.y-e.y-e.height-c.height)/2,F.push(new mxPoint(A,e.y+e.height+J)),F.push(new mxPoint(A,G-J)),F.push(new mxPoint(A,G+c.height+J)),F.push(new mxPoint(A,t.y-J));for(t=0;t<F.length;t+=2)n=F[t],q=F[t+1],n=g(n,q,null!=B?B[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=F.length/2;null!=B&&t<B.length;t++)B[t].destroy();O.guidesArrVer=R;G-=d.y;F=!0}else l(!1,!0)}if(I||F)return c=new mxPoint(H,G),p=b.call(this,
+d,c,x,D),I&&!F?c.y=p.y:F&&!I&&(c.x=p.x),p.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;l(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var v=this.guidesArrVer,x=this.guidesArrHor;if(null!=v)for(var D=0;D<v.length;D++)v[D].node.style.visibility=d?"visible":"hidden";if(null!=
+x)for(D=0;D<x.length;D++)x[D].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,v=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=v){for(x=0;x<v.length;x++)v[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function v(){var A=b.diagramContainer;O.style.top=A.offsetTop-H+"px";O.style.left=A.offsetLeft-H+"px";O.style.width=(k?0:A.offsetWidth)+H+"px";O.style.height=(k?A.offsetHeight:0)+H+"px"}function x(A,C,u){if(null!=D)return A;var R;return function(){var l=this,q=arguments,B=u&&!R;clearTimeout(R);R=setTimeout(function(){R=null;u||A.apply(l,q)},C);B&&A.apply(l,q)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+G=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,I=this;this.unit=f;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},O=document.createElement("div");O.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){F=Editor.isDarkMode()?
+{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};O.style.background=F.bkgClr;O.style[k?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;O.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();document.body.appendChild(O);mxEvent.disableContextMenu(O);this.editorUiRefresh=b.refresh;b.refresh=
+function(A){I.editorUiRefresh.apply(b,arguments);v()};v();var c=document.createElement("canvas");c.width=O.offsetWidth;c.height=O.offsetHeight;O.style.overflow="hidden";c.style.position="relative";O.appendChild(c);var e=c.getContext("2d");this.ui=b;var g=b.editor.graph;this.graph=g;this.container=O;this.canvas=c;var p=function(A,C,u,R,l){A=Math.round(A);C=Math.round(C);u=Math.round(u);R=Math.round(R);e.beginPath();e.moveTo(A+.5,C+.5);e.lineTo(u+.5,R+.5);e.stroke();l&&(k?(e.save(),e.translate(A,C),
+e.rotate(-Math.PI/2),e.fillText(l,0,0),e.restore()):e.fillText(l,A,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=F.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var A=g.view.scale,C=g.view.getBackgroundPageBounds(),u=g.view.translate,R=g.pageVisible;u=R?H+(k?C.y-g.container.scrollTop:C.x-g.container.scrollLeft):H+(k?u.y*A-g.container.scrollTop:u.x*A-g.container.scrollLeft);var l=0;R&&(l=g.getPageLayout(),l=k?l.y*g.pageFormat.height:
+l.x*g.pageFormat.width);var q;switch(I.unit){case mxConstants.POINTS:var B=q=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:q=20;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=A||4<=A?8:16,B=mxConstants.PIXELS_PER_INCH/q,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var M=B;2<=A?M=B/(2*Math.floor(A/2)):.5>=A&&(M=B*Math.floor(1/A/2)*(I.unit==
+mxConstants.MILLIMETERS?2:1));B=null;C=R?Math.min(u+(k?C.height:C.width),k?c.height:c.width):k?c.height:c.width;if(R)if(e.fillStyle=F.outBkgClr,k){var E=u-H;0<E&&e.fillRect(0,H,H,E);C<c.height&&e.fillRect(0,C,H,c.height)}else E=u-H,0<E&&e.fillRect(H,0,E,H),C<c.width&&e.fillRect(C,0,c.width,H);e.fillStyle=F.fontClr;for(R=R?u:u%(M*A);R<=C;R+=M*A)if(E=Math.round((R-u)/A/M),!(R<H||E==B)){B=E;var L=null;0==E%q&&(L=I.formatText(l+E*M)+"");k?p(H-J[Math.abs(E)%q],R,H,R,L):p(R,H-J[Math.abs(E)%q],R,H,L)}e.lineWidth=
+1;p(k?0:H,k?H:0,H,H);e.fillStyle=F.cornerClr;e.fillRect(0,0,H,H)},t=-1,y=function(){null!=D?(null!=G&&G(t),t=D(n)):n()};this.drawRuler=y;this.sizeListener=f=x(function(){var A=g.container;k?(A=A.offsetHeight+H,c.height!=A&&(c.height=A,O.style.height=A+"px",y())):(A=A.offsetWidth+H,c.width!=A&&(c.width=A,O.style.width=A+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var A=k?g.container.scrollTop:g.container.scrollLeft;I.lastScroll!=A&&(I.lastScroll=A,y())},10);
+this.unitListener=function(A,C){I.setUnit(C.getProperty("unit"))};g.addListener(mxEvent.SIZE,f);g.container.addEventListener("scroll",d);g.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(A){F=A;O.style.background=F.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(A,C,u,R){if(k&&4<A.height||
+!k&&4<A.width){if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3)}catch(X){}var l=I.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=F.guideClr;e.setLineDash([2]);if(k){var q=A.y+l.y+H-this.graph.container.scrollTop;var B=0;var J=q+A.height/2;var M=H/2;var E=q+A.height;var L=0;var P=e.getImageData(B,q-1,H,
+3);p(B,q,H,q);q--;var S=e.getImageData(M,J-1,H,3);p(M,J,H,J);J--;var V=e.getImageData(L,E-1,H,3);p(L,E,H,E);E--}else q=0,B=A.x+l.x+H-this.graph.container.scrollLeft,J=H/2,M=B+A.width/2,E=0,L=B+A.width,P=e.getImageData(B-1,q,3,H),p(B,q,B,H),B--,S=e.getImageData(M-1,J,3,H),p(M,J,M,H),M--,V=e.getImageData(L-1,E,3,H),p(L,E,L,H),L--;if(null==I.guidePart||I.guidePart.x1!=B||I.guidePart.y1!=q)I.guidePart={imgData1:P,x1:B,y1:q,imgData2:S,x2:M,y2:J,imgData3:V,x3:L,y3:E}}catch(X){}}else l=I.origGuideMove.apply(this,
+arguments);return l};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var A=I.origGuideDestroy.apply(this,arguments);if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3),I.guidePart=null}catch(C){}return A}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
-function(u){t=null!=b.currentMenu;mxEvent.consume(u)}),null,mxUtils.bind(this,function(u){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(u)||mxEvent.isPopupTrigger(u))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!t){var C=new mxPopupMenu(mxUtils.bind(this,function(c,e){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],e)}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=
-!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var F=mxEvent.getClientX(u),J=mxEvent.getClientY(u);C.popup(F,J,null,u);b.setCurrentMenu(C,d)}mxEvent.consume(u)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,C=[],F,J=!1,c=!0,e=!0,g=!0,m=!0,p=[],q=!1,z=!1,y=!1,A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},x=!0;this.setClosedPath=function(H){J=H};this.setAutoClose=function(H){c=H};this.setAutoInsert=
-function(H){e=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){m=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){x=H};this.isPerfectFreehandMode=function(){return x};this.setBrushSize=function(H){A.size=H};this.getBrushSize=function(){return A.size};var I=function(H){q=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);
-b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return q};var M=mxUtils.bind(this,function(H){if(d){var K=F.length,G=z&&0<C.length&&null!=F&&2>F.length;G||C.push.apply(C,F);F=[];C.push(null);t.push(d);d=null;(G||e)&&this.stopDrawing();e&&(!G||2<=K)&&this.startDrawing();mxEvent.consume(H)}}),E=new mxCell;E.edge=!0;var Q=function(){var H=b.getCurrentCellStyle(E);H=mxUtils.getValue(b.currentVertexStyle,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var K=";fillColor=none;";x&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+K};this.stopDrawing=function(){if(0<t.length){if(x){for(var H=[],K=0;K<C.length;K++)null!=C[K]&&H.push([C[K].x,C[K].y]);H=PerfectFreehand.getStroke(H,A);C=[];for(K=0;K<H.length;K++)C.push({x:H[K][0],y:H[K][1]});C.push(null)}H=C[0].x;var G=C[0].x,N=
-C[0].y,T=C[0].y;for(K=1;K<C.length;K++)null!=C[K]&&(H=Math.max(H,C[K].x),G=Math.min(G,C[K].x),N=Math.max(N,C[K].y),T=Math.min(T,C[K].y));H-=G;N-=T;if(0<H&&0<N){var V=100/H,U=100/N;C.map(function(P){if(null==P)return P;P.x=(P.x-G)*V;P.y=(P.y-T)*U;return P});var X='<shape strokewidth="inherit"><foreground>',l=0;for(K=0;K<C.length;K++){var B=C[K];if(null==B){B=!1;l=C[l];var L=C[K-1];!J&&c&&(B=l.x-L.x,L=l.y-L.y,B=Math.sqrt(B*B+L*L)<=b.tolerance);if(J||B)X+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+
-'"/>';X+="</path>"+(m||J||B?"<fillstroke/>":"<stroke/>");l=K+1}else X=K==l?X+('<path><move x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>'):X+('<line x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>')}X+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(X)+")");X=b.view.scale;l=b.view.translate;K=new mxCell("",new mxGeometry(G/X-l.x,T/X-l.y,H/X,N/X),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}y&&b.setSelectionCells([K])}}for(K=0;K<t.length;K++)t[K].parentNode.removeChild(t[K]);d=null;t=[];C=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,K){H=K.getProperty("eventName");K=K.getProperty("event");H==mxEvent.MOUSE_MOVE&&q&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,K){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(H=K.getEvent(),q&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var N=Q();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",x?N:"none");d.setAttribute("stroke",N);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(N=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-N=N.split(" ").map(function(T){return parseFloat(T)*G}).join(" "),d.setAttribute("stroke-dasharray",N));p=[];H=n(H);v(H);u="M"+H.x+" "+H.y;C.push(H);F=[];d.setAttribute("d",x?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],A):u);f.appendChild(d);K.consume()}}),mouseMove:mxUtils.bind(this,function(H,K){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=K.getEvent();H=n(H);v(H);var G=D(0);if(G)if(C.push(G),x){var N=[];for(G=0;G<C.length;G++)N.push([C[G].x,C[G].y]);F=[];for(var T=2;T<p.length;T+=
-2)G=D(T),N.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(N,A))}else{u+=" L"+G.x+" "+G.y;N="";F=[];for(T=2;T<p.length;T+=2)G=D(T),N+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",u+N)}g&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-G.x,H.y-G.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(H,K){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var n=function(H){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(H),mxEvent.getClientY(H))},v=function(H){for(p.push(H);p.length>k;)p.shift()},D=function(H){var K=p.length;if(1===K%2||K>=k){var G=0,N=0,T,V=0;for(T=H;T<K;T++)V++,H=p[T],G+=H.x,N+=H.y;return{x:G/V,y:N/V}}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;DrawioUser=function(b,f,k,d,t){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,k,d,t,u,C){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,t){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var v=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
+function(x){v=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!v){var D=new mxPopupMenu(mxUtils.bind(this,function(I,F){b.menus.addMenuItems(I,["points","inches","millimeters","meters"],F)}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=
+!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);b.resetCurrentMenu();D.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);D.popup(G,H,null,x);b.setCurrentMenu(D,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,v=[],x,D=[],G,H=!1,I=!0,F=!0,O=!0,c=!0,e=[],g=!1,p=!1,n=!1,t={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(J){H=J};this.setAutoClose=function(J){I=J};this.setAutoInsert=
+function(J){F=J};this.setAutoScroll=function(J){O=J};this.setOpenFill=function(J){c=J};this.setStopClickEnabled=function(J){p=J};this.setSelectInserted=function(J){n=J};this.setSmoothing=function(J){k=J};this.setPerfectFreehandMode=function(J){y=J};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(J){t.size=J};this.getBrushSize=function(){return t.size};var A=function(J){g=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);
+b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return g};var C=mxUtils.bind(this,function(J){if(d){var M=G.length,E=p&&0<D.length&&null!=G&&2>G.length;E||D.push.apply(D,G);G=[];D.push(null);v.push(d);d=null;(E||F)&&this.stopDrawing();F&&(!E||2<=M)&&this.startDrawing();mxEvent.consume(J)}}),u=new mxCell;u.edge=!0;var R=function(){var J=b.getCurrentCellStyle(u);J=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var M=";fillColor=none;";y&&(M=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+M};this.stopDrawing=function(){if(0<v.length){if(y){for(var J=[],M=0;M<D.length;M++)null!=D[M]&&J.push([D[M].x,D[M].y]);J=PerfectFreehand.getStroke(J,t);D=[];for(M=0;M<J.length;M++)D.push({x:J[M][0],y:J[M][1]});D.push(null)}J=D[0].x;var E=D[0].x,L=
+D[0].y,P=D[0].y;for(M=1;M<D.length;M++)null!=D[M]&&(J=Math.max(J,D[M].x),E=Math.min(E,D[M].x),L=Math.max(L,D[M].y),P=Math.min(P,D[M].y));J-=E;L-=P;if(0<J&&0<L){var S=100/J,V=100/L;D.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-E)*S;Q.y=(Q.y-P)*V;return Q});var X='<shape strokewidth="inherit"><foreground>',m=0;for(M=0;M<D.length;M++){var z=D[M];if(null==z){z=!1;m=D[m];var K=D[M-1];!H&&I&&(z=m.x-K.x,K=m.y-K.y,z=Math.sqrt(z*z+K*K)<=b.tolerance);if(H||z)X+='<line x="'+m.x.toFixed(2)+'" y="'+m.y.toFixed(2)+
+'"/>';X+="</path>"+(c||H||z?"<fillstroke/>":"<stroke/>");m=M+1}else X=M==m?X+('<path><move x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>'):X+('<line x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>')}X+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){M=this.createStyle("stencil("+Graph.compress(X)+")");X=b.view.scale;m=b.view.translate;M=new mxCell("",new mxGeometry(E/X-m.x,P/X-m.y,J/X,L/X),M);M.vertex=1;b.model.beginUpdate();try{M=b.addCell(M),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[M])),b.fireEvent(new mxEventObject("freehandInserted","cell",M))}finally{b.model.endUpdate()}n&&b.setSelectionCells([M])}}for(M=0;M<v.length;M++)v[M].parentNode.removeChild(v[M]);d=null;v=[];D=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,M){J=M.getProperty("eventName");M=M.getProperty("event");J==mxEvent.MOUSE_MOVE&&g&&(null!=M.sourceState&&M.sourceState.setCursor("crosshair"),M.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,M){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(J=M.getEvent(),g&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var E=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);E=Math.max(1,E*b.view.scale);var L=R();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?L:"none");d.setAttribute("stroke",L);d.setAttribute("stroke-width",E);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(L=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+L=L.split(" ").map(function(P){return parseFloat(P)*E}).join(" "),d.setAttribute("stroke-dasharray",L));e=[];J=l(J);q(J);x="M"+J.x+" "+J.y;D.push(J);G=[];d.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],t):x);f.appendChild(d);M.consume()}}),mouseMove:mxUtils.bind(this,function(J,M){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=M.getEvent();J=l(J);q(J);var E=B(0);if(E)if(D.push(E),y){var L=[];for(E=0;E<D.length;E++)L.push([D[E].x,D[E].y]);G=[];for(var P=2;P<e.length;P+=
+2)E=B(P),L.push([E.x,E.y]),G.push(E);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(L,t))}else{x+=" L"+E.x+" "+E.y;L="";G=[];for(P=2;P<e.length;P+=2)E=B(P),L+=" L"+E.x+" "+E.y,G.push(E);d.setAttribute("d",x+L)}O&&(E=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-E.x,J.y-E.y)).grow(20)));M.consume()}}),mouseUp:mxUtils.bind(this,function(J,M){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(C(M.getEvent()),M.consume())})});var l=function(J){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(J),mxEvent.getClientY(J))},q=function(J){for(e.push(J);e.length>k;)e.shift()},B=function(J){var M=e.length;if(1===M%2||M>=k){var E=0,L=0,P,S=0;for(P=J;P<M;P++)S++,J=e[P],E+=J.x,L+=J.y;return{x:E/S,y:L/S}}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;DrawioUser=function(b,f,k,d,v){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=v};DrawioComment=function(b,f,k,d,v,x,D){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=v;this.isResolved=x;this.user=D;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,v){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 608b6531..f4b8edd8 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -1952,10 +1952,10 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,e,k,m,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,F){p=null!=F?F.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,d,g,l,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,g);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1986,240 +1986,240 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,F){C=m.substring(C+8,C+8+F);"zTXt"==p?(F=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,F)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
-C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
+Editor.extractGraphModelFromPng=function(b){var d=null;try{var g=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(D,p,E){D=l.substring(D+8,D+8+E);"zTXt"==p?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(d=D))):"tEXt"==p&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
+D[0]||"mxfile"==D[0])&&(d=D[1]));if(null!=d||"IDAT"==p)return!0}))}catch(D){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,m=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",m),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
+Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,l=mxUtils.bind(this,function(D){"ready"==D.data&&D.source==g&&(mxEvent.removeListener(window,"message",l),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);g=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(D){return!this.isExternalProtocol(D)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
-null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
+null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var g=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(g)||(this.graph.pageFormat=new mxRectangle(0,0,d,g));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var g=d.document.createElement("mxGraphModel");g.appendChild(b);d.decode(g,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
-b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,D){d.undoableEditHappened(D.getProperty("edit"))};var g=mxUtils.bind(this,function(l,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(l,D){l=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();D=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&D.push(l[p]);b.setSelectionCells(D)}};d.addListener(mxEvent.UNDO,g);d.addListener(mxEvent.REDO,g);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
-null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
-e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,d,g,l,D,p,E,N,R,G,M){var Q=R?57:0,e=g,f=l,k=R?0:64,z=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(z.height=window.innerHeight);var t=z.height,B=Math.max(1,Math.round((z.width-g-k)/2)),I=Math.max(1,Math.round((t-l-b.footerHeight)/3));d.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-k):g;l=Math.min(l,t-k);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));z=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=z.x+"px";this.bg.style.top=z.y+"px";B+=z.x;I+=z.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var O=b.createDiv(R?"geTransDialog":"geDialog");D=this.getPosition(B,I,g,l);B=D.x;I=D.y;O.style.width=g+"px";O.style.height=l+"px";O.style.left=B+"px";O.style.top=I+"px";O.style.zIndex=this.zIndex;O.appendChild(d);document.body.appendChild(O);!N&&d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=B+g+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!M)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(y){J=!0}),null,mxUtils.bind(this,function(y){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var y=G();
+null!=y&&(e=g=y.w,f=l=y.h)}y=mxUtils.getDocumentSize();t=y.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((y.width-g-k)/2));I=Math.max(1,Math.round((t-l-b.footerHeight)/3));g=null!=document.body?Math.min(e,document.body.scrollWidth-k):e;l=Math.min(f,t-k);y=this.getPosition(B,I,g,l);B=y.x;I=y.y;O.style.left=B+"px";O.style.top=I+"px";O.style.width=g+"px";O.style.height=l+"px";!N&&
+d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+g+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=O;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
-t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
-L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
-L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,d,g,l,D,p,E,N,R,G,M){R=null!=R?R:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
+document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=g;Q.appendChild(d);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",g.appendChild(d),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=M&&M()}),G.className="geBtn",g.appendChild(G));var f=mxUtils.button(l,function(){R&&b.hideDialog();null!=D&&D()});
+f.className="geBtn";g.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){R&&b.hideDialog();null!=N&&N()}),l.className="geBtn gePrimaryBtn",g.appendChild(l));this.init=function(){f.focus()};Q.appendChild(g);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
+PrintDialog.prototype.create=function(b){function d(f){var k=E.checked||G.checked,z=parseInt(Q.value)/100;isNaN(z)&&(z=1,Q.value="100%");z*=.75;var t=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/g.pageScale;if(k){var I=E.checked?1:parseInt(M.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,g,t))}g.getGraphBounds();var O=I=0;t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*z);t.height=Math.ceil(t.height*z);B*=z;!k&&g.pageVisible?(z=g.getPageLayout(),I-=z.x*t.width,O-=z.y*t.height):
+k=!0;k=PrintDialog.createPrintPreview(g,B,t,0,I,O,k);k.open();f&&PrintDialog.printPreview(k)}var g=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var N=document.createElement("td");N.setAttribute("colspan","2");N.style.fontSize="10pt";N.appendChild(E);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
+N.appendChild(R);mxEvent.addListener(R,"click",function(f){E.checked=!E.checked;G.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){G.checked=!E.checked});p.appendChild(N);D.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(G);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");N.appendChild(R);mxEvent.addListener(R,
+"click",function(f){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(f)});p.appendChild(N);var M=document.createElement("input");M.setAttribute("value","1");M.setAttribute("type","number");M.setAttribute("min","1");M.setAttribute("size","4");M.setAttribute("disabled","disabled");M.style.width="50px";N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(M);mxUtils.write(N," "+mxResources.get("pages")+" (max)");p.appendChild(N);D.appendChild(p);mxEvent.addListener(G,"change",
+function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");E.checked=!G.checked});p=p.cloneNode(!1);N=document.createElement("td");mxUtils.write(N,mxResources.get("pageScale")+":");p.appendChild(N);N=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";N.appendChild(Q);p.appendChild(N);D.appendChild(p);p=document.createElement("tr");N=document.createElement("td");N.colSpan=2;
+N.style.paddingTop="20px";N.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&N.appendChild(R);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";N.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";N.appendChild(e);b.editor.cancelFirst||
+N.appendChild(R);p.appendChild(N);D.appendChild(p);l.appendChild(D);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(g){}};
+PrintDialog.createPrintPreview=function(b,d,g,l,D,p,E){d=new mxPrintPreview(b,d,g,l,D,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var N=d.writeHead;d.writeHead=function(R){N.apply(this,arguments);R.writeln('<style type="text/css">');R.writeln("@media screen {");R.writeln(" body > div { padding:30px;box-sizing:content-box; }");R.writeln("}");R.writeln("</style>")};return d};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
-mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
-L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
-L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
-k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
-var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
-D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
-mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
+var PageSetupDialog=function(b){function d(){null==M||M==mxConstants.NONE?(G.style.backgroundColor="",G.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(G.style.backgroundColor=M,G.style.backgroundImage="")}function g(){var t=k;null!=t&&Graph.isPageLink(t.src)&&(t=b.createImageForPageLink(t.src,null));null!=t&&null!=t.src?(f.setAttribute("src",t.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";mxUtils.write(N,mxResources.get("paperSize")+":");E.appendChild(N);N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";var R=PageSetupDialog.addPageFormatPanel(N,"pagesetupdialog",l.pageFormat);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");
+mxUtils.write(N,mxResources.get("background")+":");E.appendChild(N);N=document.createElement("td");N.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var G=document.createElement("button");G.style.width="22px";G.style.height="22px";G.style.cursor="pointer";G.style.marginRight="20px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(G.style.position="relative",G.style.top="-6px");var M=l.background;d();mxEvent.addListener(G,
+"click",function(t){b.pickColor(M||"none",function(B){M=B;d()});mxEvent.consume(t)});N.appendChild(G);mxUtils.write(N,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();N.appendChild(Q);mxEvent.addListener(Q,"change",function(){var t=parseInt(Q.value);Q.value=Math.max(1,isNaN(t)?l.getGridSize():t)});E.appendChild(N);p.appendChild(E);E=document.createElement("tr");
+N=document.createElement("td");mxUtils.write(N,mxResources.get("image")+":");E.appendChild(N);N=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
+"60px";f.style.padding="4px";var k=l.backgroundImage,z=function(t){b.showBackgroundImageDialog(function(B,I){I||(k=B,g())},k);mxEvent.consume(t)};mxEvent.addListener(e,"click",z);mxEvent.addListener(f,"click",z);g();N.appendChild(f);N.appendChild(e);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");N.colSpan=2;N.style.paddingTop="16px";N.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
+b.editor.cancelFirst&&N.appendChild(e);z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(Q.value);isNaN(t)||l.gridSize===t||l.setGridSize(t);t=new ChangePageSetup(b,M,k,R.get());t.ignoreColor=l.background==M;t.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=k?k.src:null);l.pageFormat.width==t.previousFormat.width&&l.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage||l.model.execute(t)});z.className="geBtn gePrimaryBtn";
+N.appendChild(z);b.editor.cancelFirst||N.appendChild(e);E.appendChild(N);p.appendChild(E);D.appendChild(p);this.container=D};
+PageSetupDialog.addPageFormatPanel=function(b,d,g,l){function D(y,ia,da){if(da||Q!=document.activeElement&&e!=document.activeElement){y=!1;for(ia=0;ia<k.length;ia++)da=k[ia],I?"custom"==da.key&&(N.value=da.key,I=!1):null!=da.format&&("a4"==da.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==da.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),
+g.width==da.format.width&&g.height==da.format.height?(N.value=da.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,y=!0):g.width==da.format.height&&g.height==da.format.width&&(N.value=da.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,y=E.checked=!0));y?(R.style.display="",M.style.display="none"):(Q.value=g.width/100,e.value=g.height/100,p.setAttribute("checked",
+"checked"),N.value="custom",R.style.display="none",M.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var N=document.createElement("select");N.style.marginBottom="8px";N.style.borderRadius="4px";N.style.border="1px solid rgb(160, 160, 160)";N.style.width="206px";
+var R=document.createElement("div");R.style.marginLeft="4px";R.style.width="210px";R.style.height="24px";p.style.marginRight="6px";R.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));R.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";R.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));R.appendChild(G);var M=document.createElement("div");M.style.marginLeft=
+"4px";M.style.width="210px";M.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";M.appendChild(Q);mxUtils.write(M," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";M.appendChild(e);mxUtils.write(M," in");R.style.display="none";M.style.display="none";for(var f={},k=PageSetupDialog.getFormats(),z=0;z<k.length;z++){var t=k[z];f[t.key]=t;var B=document.createElement("option");B.setAttribute("value",
+t.key);mxUtils.write(B,t.title);N.appendChild(B)}var I=!1;D();b.appendChild(N);mxUtils.br(b);b.appendChild(R);b.appendChild(M);var O=g,J=function(y,ia){y=f[N.value];null!=y.format?(Q.value=y.format.width/100,e.value=y.format.height/100,M.style.display="none",R.style.display=""):(R.style.display="none",M.style.display="");y=parseFloat(Q.value);if(isNaN(y)||0>=y)Q.value=g.width/100;y=parseFloat(e.value);if(isNaN(y)||0>=y)e.value=g.height/100;y=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(e.value)));"custom"!=N.value&&E.checked&&(y=new mxRectangle(0,0,y.height,y.width));ia&&I||y.width==O.width&&y.height==O.height||(O=y,null!=l&&l(O))};mxEvent.addListener(d,"click",function(y){p.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(G,"click",function(y){E.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(Q,"blur",J);mxEvent.addListener(Q,"click",J);mxEvent.addListener(e,"blur",J);mxEvent.addListener(e,"click",J);mxEvent.addListener(E,"change",J);
+mxEvent.addListener(p,"change",J);mxEvent.addListener(N,"change",function(y){I="custom"==N.value;J(y,!0)});J();return{set:function(y){g=y;D(null,null,!0)},get:function(){return O},widthInput:Q,heightInput:e}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
-document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
-function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
-H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
-":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
-2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
-G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
-k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
-C();return m};
-FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
-function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
-["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
-Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
-var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
-t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
-e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
-0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
-!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
-var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
-la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
-"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
-m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
-ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
-ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
-ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
-!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
-mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+var FilenameDialog=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){R=null!=R?R:!0;var f=document.createElement("table"),k=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var z=document.createElement("tr");var t=document.createElement("td");t.style.textOverflow="ellipsis";t.style.textAlign="right";t.style.maxWidth=(e?e+15:100)+"px";t.style.fontSize="10pt";t.style.width=(e?e:84)+"px";mxUtils.write(t,(D||mxResources.get("filename"))+":");z.appendChild(t);var B=
+document.createElement("input");B.setAttribute("value",d||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(g,function(){if(null==p||p(B.value))R&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var O=f.parentNode;if(null!=O){var J=null;mxEvent.addListener(O,"dragleave",
+function(y){null!=J&&(J.style.backgroundColor="",J=null);y.stopPropagation();y.preventDefault()});mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(y){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=B,J.style.backgroundColor="#ebf2f9");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(O,"drop",mxUtils.bind(this,function(y){null!=J&&(J.style.backgroundColor="",J=null);0<=mxUtils.indexOf(y.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(y.dataTransfer.getData("text/uri-list")),
+I.click());y.stopPropagation();y.preventDefault()}))}}};t=document.createElement("td");t.style.whiteSpace="nowrap";t.appendChild(B);z.appendChild(t);if(null!=D||null==E)k.appendChild(z),null!=M&&(t.appendChild(FilenameDialog.createTypeHint(b,B,M)),null!=b.editor.diagramFileTypes&&(z=document.createElement("tr"),t=document.createElement("td"),t.style.textOverflow="ellipsis",t.style.textAlign="right",t.style.maxWidth="100px",t.style.fontSize="10pt",t.style.width="84px",mxUtils.write(t,mxResources.get("type")+
+":"),z.appendChild(t),t=document.createElement("td"),t.style.whiteSpace="nowrap",z.appendChild(t),d=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",t.appendChild(d),B.style.width=null!=Q?Q-40+"px":"190px",z.appendChild(t),k.appendChild(z)));null!=E&&(z=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(E),z.appendChild(t),k.appendChild(z));z=document.createElement("tr");t=document.createElement("td");t.colSpan=
+2;t.style.paddingTop=null!=M?"12px":"20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});M.className="geBtn";b.editor.cancelFirst&&t.appendChild(M);null!=N&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(N)}),Q.className="geBtn",t.appendChild(Q));mxEvent.addListener(B,"keypress",function(O){13==O.keyCode&&I.click()});t.appendChild(I);b.editor.cancelFirst||t.appendChild(M);
+z.appendChild(t);k.appendChild(z);f.appendChild(k);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,d,g){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var D=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<g.length;p++)if(0<g[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
+g[p].ext.length-1)=="."+g[p].ext){l.setAttribute("title",mxResources.get(g[p].title));break}};mxEvent.addListener(d,"keyup",D);mxEvent.addListener(d,"change",D);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
+D();return l};
+FilenameDialog.createFileTypes=function(b,d,g){var l=document.createElement("select");for(b=0;b<g.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(g[b].description)+" (."+g[b].extension+")");l.appendChild(D)}mxEvent.addListener(l,"change",function(p){p=g[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,N=0;N<g.length;N++){var R=g[N].extension,G=null;"drawio"!=R&&(G=R,R=".drawio."+R);if(p.substring(p.length-R.length-1)=="."+R||null!=G&&p.substring(p.length-G.length-1)=="."+G){E=N;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
+var WrapperWindow=function(b,d,g,l,D,p,E){var N=b.createSidebarContainer();E(N);this.window=new mxWindow(d,N,g,l,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(R){null==R&&(R=window.event);return null!=R&&b.isSelectionAllowed(R)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var N=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=E.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(N),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(E.container),R.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){E.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(G)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=N,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,N=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,R=null!=N&&this.gridColor!=N.toLowerCase()?this.gridColor:"#ffffff",G="none",M="";if(E.isGridEnabled()||E.gridVisible){M=10;mxClient.IS_SVG?(G=unescape(encodeURIComponent(this.createSvgGrid(R))),G=window.btoa?btoa(G):Base64.encode(G,!0),G="url(data:image/svg+xml;base64,"+G+")",M=E.gridSize*this.scale*this.gridSteps):G="url("+this.gridImage+
+")";var Q=R=0;null!=E.view.backgroundPageShape&&(Q=this.getBackgroundPageBounds(),R=1+Q.x,Q=1+Q.y);M=-Math.round(M-mxUtils.mod(this.translate.x*this.scale-R,M))+"px "+-Math.round(M-mxUtils.mod(this.translate.y*this.scale-Q,M))+"px"}R=E.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=M,E.view.backgroundPageShape.node.style.backgroundImage=G,E.view.backgroundPageShape.node.style.backgroundColor=N,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",R.style.backgroundImage="none",R.style.backgroundColor="",Editor.isDarkMode()||"sketch"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.sketchBackgroundColor):(E.container.className="geDiagramContainer",R.style.backgroundPosition=M,R.style.backgroundImage=G,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"sketch"!=Editor.currentTheme?R.style.backgroundColor=
+N:R.style.backgroundColor=E.sketchBackgroundColor)};mxGraphView.prototype.createSvgGrid=function(E){for(var N=this.graph.gridSize*this.scale;N<this.minGridSize;)N*=2;for(var R=this.gridSteps*N,G=[],M=1;M<this.gridSteps;M++){var Q=M*N;G.push("M 0 "+Q+" L "+R+" "+Q+" M "+Q+" 0 L "+Q+" "+R)}return'<svg width="'+R+'" height="'+R+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+R+'" height="'+R+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+
+R+" 0 L 0 0 0 "+R+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){b.apply(this,arguments);if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*
+this.view.scale+N,G))+"px";R.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.view.scale,M=this.view.translate,Q=this.pageFormat,e=G*this.pageScale,f=this.view.getBackgroundPageBounds();N=f.width;R=f.height;var k=new mxRectangle(G*M.x,G*M.y,Q.width*e,Q.height*e),z=(E=E&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(R/k.height)-1:0,t=E?Math.ceil(N/k.width)-1:0,B=f.x+N,I=f.y+R;null==this.horizontalPageBreaks&&0<z&&(this.horizontalPageBreaks=[]);
+null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(O){if(null!=O){for(var J=O==this.horizontalPageBreaks?z:t,y=0;y<=J;y++){var ia=O==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(y+1)*k.height)),new mxPoint(Math.round(B),Math.round(f.y+(y+1)*k.height))]:[new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(I))];null!=O[y]?(O[y].points=ia,O[y].redraw()):(ia=new mxPolyline(ia,
+this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),O[y]=ia)}for(y=J;y<O.length;y++)O[y].destroy();O.splice(J,O.length-J)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,N,R){for(var G=0;G<N.length;G++){if(this.graph.isTableCell(N[G])||this.graph.isTableRow(N[G]))return!1;if(this.graph.getModel().isVertex(N[G])){var M=
+this.graph.getCellGeometry(N[G]);if(null!=M&&M.relative)return!1}}return d.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(N,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};
+mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),N=0<E.width?E.x/this.scale-this.translate.x:0,R=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,M=this.graph.pageScale,Q=G.width*M;G=G.height*M;M=Math.floor(Math.min(0,N)/Q);var e=Math.floor(Math.min(0,R)/G);return new mxRectangle(this.scale*(this.translate.x+M*Q),this.scale*(this.translate.y+e*G),this.scale*(Math.ceil(Math.max(1,N+E.width/this.scale)/Q)-M)*Q,this.scale*(Math.ceil(Math.max(1,
+R+E.height/this.scale)/G)-e)*G)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=N+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,N,R,G,M,Q){var e=D.apply(this,
+arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,N,R){var G=this.graph.model.getParent(E);if(N){var M=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);M=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=M&&M.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(M=p.apply(this,arguments),
+this.graph.isTableCell(E)||this.graph.isTableRow(E))M=G,this.graph.isTable(M)||(M=this.graph.model.getParent(M)),M=!this.graph.selectionCellsHandler.isHandled(M)||this.graph.isCellSelected(M)&&this.graph.isToggleEvent(R.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(G);return M};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var N=this.graph.getModel(),R=N.getParent(E),G=this.graph.view.getState(R),
+M=this.graph.isCellSelected(E);null!=G&&(N.isVertex(R)||N.isEdge(R));){var Q=this.graph.isCellSelected(R);M=M||Q;if(Q||!M&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=R;R=N.getParent(R)}return E}})();EditorUi=function(b,d,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=g;var D=l.getGraphBounds;l.getGraphBounds=function(){var T=D.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var W=this.view.translate,ka=this.view.scale;T=mxRectangle.fromRectangle(T);T.add(new mxRectangle((W.x+Y.x)*ka,(W.y+Y.y)*ka,Y.width*ka,Y.height*ka))}return T};l.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(T,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(T){return!mxEvent.isPopupTrigger(T.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+N="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),R=!1,G=!1;this.setDefaultStyle=function(T){try{l.getModel().isEdge(T)?G=!1:R=!1;var Y=l.getCellStyle(T,!1),W=[],ka=[],q;for(q in Y)W.push(Y[q]),ka.push(q);l.getModel().isEdge(T)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",W,"cells",[T]));l.getModel().isEdge(T)?G=!0:R=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
+function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);R=G=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var M=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<M.length;d++)0>mxUtils.indexOf(p,M[d])&&p.push(M[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(g=0;g<e[d].length;g++)p.push(e[d][g]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(T,Y,W,ka,q,F,S){ka=null!=ka?ka:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;W=null!=W?W:l.getModel();if(S){S=[];for(var ba=0;ba<T.length;ba++)S=S.concat(W.getDescendants(T[ba]));T=S}W.beginUpdate();try{for(ba=0;ba<T.length;ba++){var U=T[ba];
+if(Y)var ca=["fontSize","fontFamily","fontColor"];else{var ea=W.getStyle(U),na=null!=ea?ea.split(";"):[];ca=p.slice();for(var ra=0;ra<na.length;ra++){var ya=na[ra],va=ya.indexOf("=");if(0<=va){var Da=ya.substring(0,va),pa=mxUtils.indexOf(ca,Da);0<=pa&&ca.splice(pa,1);for(S=0;S<e.length;S++){var Aa=e[S];if(0<=mxUtils.indexOf(Aa,Da))for(var xa=0;xa<Aa.length;xa++){var Ma=mxUtils.indexOf(ca,Aa[xa]);0<=Ma&&ca.splice(Ma,1)}}}}}var Oa=W.isEdge(U);S=Oa?q:ka;var Na=W.getStyle(U);for(ra=0;ra<ca.length;ra++){Da=
+ca[ra];var La=S[Da];null!=La&&"edgeStyle"!=Da&&("shape"!=Da||Oa)&&(!Oa||F||0>mxUtils.indexOf(N,Da))&&(Na=mxUtils.setStyle(Na,Da,La))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));W.setStyle(U,Na)}}finally{W.endUpdate()}return T};l.addListener("cellsInserted",function(T,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(T,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
+this.refresh();var k=mxUtils.bind(this,function(T){null==T&&(T=window.event);return l.isEditing()||null!=T&&this.isSelectionAllowed(T)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,
+this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(d=function(T){if(null!=T){var Y=mxEvent.getSource(T);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return k(T)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var z=l.graphHandler.start;l.graphHandler.start=function(){null!=qa.hoverIcons&&qa.hoverIcons.reset();z.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var Y=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(T)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(T)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var t=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(T,Y){return t||B.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(T){32!=T.which||l.isEditing()?mxEvent.isConsumed(T)||
+27!=T.keyCode||this.hideDialog(null,!0):(t=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(T)!=l.container||mxEvent.consume(T))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(T){l.container.style.cursor="";t=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(T){return I.apply(this,arguments)||t||mxEvent.isMouseEvent(T.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(T.getEvent()))&&(!mxEvent.isControlDown(T.getEvent())&&mxEvent.isRightMouseButton(T.getEvent())||mxEvent.isMiddleMouseButton(T.getEvent()))};var O=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(T){return O.apply(this,arguments)||13==T.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T)||mxClient.IS_SF&&mxEvent.isShiftDown(T))};var J=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return t||
+J.apply(this,arguments)};var y=!1,ia=null,da=null,ja=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&y!=l.cellEditor.isContentEditing()){for(var T=this.toolbar.container.firstChild,Y=[];null!=T;){var W=T.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),Y.push(T));T=W}T=this.toolbar.fontMenu;W=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var ka=0;ka<ja.length;ka++)this.toolbar.container.appendChild(ja[ka]);this.toolbar.fontMenu=
+ia;this.toolbar.sizeMenu=da}y=l.cellEditor.isContentEditing();ia=T;da=W;ja=Y}}),qa=this,sa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){sa.apply(this,arguments);aa();if(l.cellEditor.isContentEditing()){var T=!1,Y=function(){T||(T=!0,window.setTimeout(function(){var W=l.getSelectedEditingElement();null!=W&&(W=mxUtils.getCurrentStyle(W),null!=W&&null!=qa.toolbar&&(qa.toolbar.setFontName(Graph.stripQuotes(W.fontFamily)),qa.toolbar.setFontSize(parseInt(W.fontSize))));T=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
+"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(T,Y){try{L.apply(this,arguments),aa()}catch(W){qa.handleError(W)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(T){}var V=l.fireMouseEvent;
+l.fireMouseEvent=function(T,Y,W){T==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(T,Y,W){this.menus.createPopupMenu(T,Y,W)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(T){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,function(T,
+Y){var W=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(W.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=qa.hoverIcons&&qa.hoverIcons.update(l.view.getState(W[W.length-1]))},0));f(W)});this.addListener("styleChanged",mxUtils.bind(this,function(T,Y){var W=Y.getProperty("cells"),ka=T=!1;if(0<W.length)for(var q=0;q<W.length&&(T=l.getModel().isVertex(W[q])||T,!(ka=l.getModel().isEdge(W[q])||ka)||!T);q++);else ka=T=!0;T=T&&!R;ka=ka&&!G;W=Y.getProperty("keys");Y=Y.getProperty("values");
+for(q=0;q<W.length;q++){var F=0<=mxUtils.indexOf(M,W[q]);if("strokeColor"!=W[q]||null!=Y[q]&&"none"!=Y[q])if(0<=mxUtils.indexOf(E,W[q]))ka||0<=mxUtils.indexOf(Q,W[q])?null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]:T&&0<=mxUtils.indexOf(p,W[q])&&(null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q]);else if(0<=mxUtils.indexOf(p,W[q])){if(T||F)null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q];if(ka||F||0<=mxUtils.indexOf(Q,
+W[q]))null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]}}null!=this.toolbar&&(this.toolbar.setFontName(l.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(l.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==l.currentEdgeStyle.edgeStyle&&"1"==l.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==
+l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==l.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==l.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==l.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var T=l.currentVertexStyle.fontFamily||"Helvetica",Y=String(l.currentVertexStyle.fontSize||
+"12"),W=l.getView().getState(l.getSelectionCell());null!=W&&(T=W.style[mxConstants.STYLE_FONTFAMILY]||T,Y=W.style[mxConstants.STYLE_FONTSIZE]||Y,10<T.length&&(T=T.substring(0,8)+"..."));this.toolbar.setFontName(T);this.toolbar.setFontSize(Y)}),l.getSelectionModel().addListener(mxEvent.CHANGE,b),l.getModel().addListener(mxEvent.CHANGE,b));l.addListener(mxEvent.CELLS_ADDED,function(T,Y){T=Y.getProperty("cells");Y=Y.getProperty("parent");null!=Y&&l.getModel().isLayer(Y)&&!l.isCellVisible(Y)&&null!=T&&
+0<T.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(T){null!=this.currentMenu&&mxEvent.getSource(T)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
+mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
+mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,d,g){function l(N,R){var G=p;p+=R;return N.substring(G,p)}function D(N){N=l(N,4);return N.charCodeAt(3)+(N.charCodeAt(2)<<8)+(N.charCodeAt(1)<<16)+(N.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(l(b,4),"IHDR"!=l(b,4))null!=g&&g();else{l(b,17);do{g=D(b);var E=l(b,4);if(null!=d&&d(p-8,E,g))break;value=l(b,g);l(b,4);if("IEND"==E)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
-EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
-arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+arguments);g.updateActionStates()};b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,d=b.getSelectionCells(),g=this.initSelectionState(),l=!0,D=0;D<d.length;D++){var p=b.getCurrentCellStyle(d[D]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,d[D],d,l),l=!1)}this.updateSelectionStateForTableCells(g);return g};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
-if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
-b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
-G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
-function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
-EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
-EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
-f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
-EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),C=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
-C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),g=this.editor.graph.model,l=g.getParent(d[0]),D=g.getParent(l),p=l.getIndex(d[0]),E=D.getIndex(l),N=null,R=1,G=1,M=0,Q=E<D.getChildCount()-1?g.getChildAt(g.getChildAt(D,E+1),p):null;M<d.length-1;){var e=d[++M];null==Q||Q!=e||null!=N&&R!=N||(N=R,R=0,G++,l=g.getParent(Q),Q=E+G<D.getChildCount()?g.getChildAt(g.getChildAt(D,E+G),p):null);var f=this.editor.graph.view.getState(e);
+if(e==g.getChildAt(l,p+R)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))R++;else break}M==G*R-1&&(b.mergeCell=d[0],b.colspan=R,b.rowspan=G)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,d,g,l){g=this.editor.graph;b.cells.push(d);if(g.getModel().isVertex(d)){b.connections=0<g.model.getEdgeCount(d);b.unlocked=b.unlocked&&!g.isCellLocked(d);b.resizable=b.resizable&&g.isCellResizable(d);b.rotatable=b.rotatable&&g.isCellRotatable(d);b.movable=b.movable&&g.isCellMovable(d)&&!g.isTableRow(d)&&!g.isTableCell(d);b.swimlane=b.swimlane||g.isSwimlane(d);b.table=b.table||g.isTable(d);b.cell=b.cell||g.isTableCell(d);b.row=b.row||g.isTableRow(d);
+b.vertices.push(d);var D=g.getCellGeometry(d);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var p=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else g.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);d=g.view.getState(d);null!=d&&(b.autoSize=b.autoSize||g.isAutoSizeState(d),b.glass=b.glass&&g.isGlassState(d),b.rounded=b.rounded&&g.isRoundedState(d),b.lineJumps=b.lineJumps&&g.isLineJumpState(d),b.image=b.image&&g.isImageState(d),b.shadow=b.shadow&&g.isShadowState(d),b.fill=b.fill&&g.isFillState(d),b.stroke=b.stroke&&g.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,g.mergeStyle(d.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,G){"mouseDown"==G.getProperty("eventName")&&d.hideShapePicker()}));var g=mxUtils.bind(this,function(){d.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var l=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var D=b.dblClick;b.dblClick=function(R,G){if(this.isEnabled())if(null!=G||null==d.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.x,M.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(R,G,M){var Q=M.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(R.cell,G,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,k){var z=b.getCompositeParent(R.cell);e=b.getCellGeometry(z);for(M.consume();null!=z&&b.model.isVertex(z)&&null!=e&&e.relative;)cell=
+z,z=b.model.getParent(cell),e=b.getCellGeometry(z);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.getGraphX(),M.getGraphY(),z,mxUtils.bind(this,function(t){k(t);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(t))}),G)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var N=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N);N=window.setTimeout(mxUtils.bind(this,function(){var M=
+G.getProperty("arrow"),Q=G.getProperty("direction"),e=G.getProperty("event");M=M.getBoundingClientRect();var f=mxUtils.getOffset(b.container),k=b.container.scrollLeft+M.x-f.x;f=b.container.scrollTop+M.y-f.y;var z=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),t=d.showShapePicker(k,f,z,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(z,Q,b.defaultEdgeLength,e,!0,!0,function(I,O,J){J(B);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(t,M,k,f,Q);mxUtils.setOpacity(t,30);mxEvent.addListener(t,"mouseenter",function(){mxUtils.setOpacity(t,100)});mxEvent.addListener(t,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N)}))}};
+EditorUi.prototype.centerShapePicker=function(b,d,g,l,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,l-=p.height+6):D==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,l+=d.height+6):D==mxConstants.DIRECTION_WEST?(g-=p.width+6,l-=p.height/2-10):D==mxConstants.DIRECTION_EAST&&(g+=d.width+6,l-=p.height/2-10);b.style.left=g+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,d,g,l,D,p){b=this.createShapePicker(b,d,g,l,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,d,g,l,D,p,E,N){var R=null;if(null!=E&&0<E.length){var G=this,M=this.editor.graph;R=document.createElement("div");D=M.view.getState(g);var Q=null==g||null!=D&&M.isTransparentState(D)?null:M.copyStyle(g);g=6>E.length?35*E.length:140;R.className="geToolbarContainer geSidebarContainer";R.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+g+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";N||mxUtils.setPrefixedStyle(R.style,"transform","translate(-22px,-22px)");null!=M.background&&M.background!=mxConstants.NONE&&(R.style.backgroundColor=M.background);M.container.appendChild(R);g=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";R.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[e]):G.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var k=M.cloneCell(e);if(null!=l)l(k);else{k.geometry.x=M.snap(Math.round(b/M.view.scale)-M.view.translate.x-e.geometry.width/2);k.geometry.y=M.snap(Math.round(d/M.view.scale)-M.view.translate.y-e.geometry.height/2);M.model.beginUpdate();try{M.addCell(k)}finally{M.model.endUpdate()}M.setSelectionCell(k);
+M.scrollCellToVisible(k);M.startEditingAtCell(k);null!=G.hoverIcons&&G.hoverIcons.update(M.view.getState(k))}null!=p&&p()})});for(D=0;D<(N?Math.min(E.length,4):E.length);D++)g(E[D]);E=R.offsetTop+R.clientHeight-(M.container.scrollTop+M.container.offsetHeight);0<E&&(R.style.top=Math.max(M.container.scrollTop+22,d-E)+"px");E=R.offsetLeft+R.clientWidth-(M.container.scrollLeft+M.container.offsetWidth);0<E&&(R.style.left=Math.max(M.container.scrollLeft+22,b-E)+"px")}return R};
+EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(g,l,D,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,D||60,g,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var g=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),D=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;g=null!=D&&("LI"==D.nodeName||null!=D.parentNode&&"LI"==
+D.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,e,k,m,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=m&&m!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(m,C),null!=k?(m=document.createElement("img"),m.className="geAdaptiveAsset",m.style.position="absolute",m.style.marginTop="0.5px",m.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,
-"transform","scaleX(-1)"),b.appendChild(m)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
-k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.updateCssForMarker=function(b,d,g,l,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==g?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(g=this.getImageForMarker(l,D),null!=g?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",g),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(b,d){var g=null;b==mxConstants.ARROW_CLASSIC?g="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?g="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?g=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?g=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?g="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?g="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?g="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?g="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?g="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?g="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?g=Format.boxMarkerImage.src:"halfCircle"==b?g=Format.halfCircleMarkerImage.src:"openAsync"==b?g=Format.openAsyncFilledMarkerImage.src:"async"==b?g="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?g=Format.dashMarkerImage.src:"baseDash"==b?g=Format.baseDashMarkerImage.src:"cross"==b?g=Format.crossMarkerImage.src:"circle"==b?g=Format.circleMarkerImage.src:"circlePlus"==b?g=Format.circlePlusMarkerImage.src:"ERone"==b?g=Format.EROneMarkerImage.src:"ERmandOne"==b?
+g=Format.ERmandOneMarkerImage.src:"ERmany"==b?g=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?g=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?g=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(g=Format.ERzeroToManyMarkerImage.src);return g};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),g=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(d.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var N={},R=p.createCellLookup(E),G=p.cloneCells(E,null,N),M=new mxGraphModel,Q=M.getChildAt(M.getRoot(),
+0),e=0;e<G.length;e++){M.add(Q,G[e]);var f=p.view.getState(E[e]);if(null!=f){var k=p.getCellGeometry(G[e]);null!=k&&k.relative&&!M.isEdge(E[e])&&null==R[mxObjectIdentity.get(M.getParent(E[e]))]&&(k.offset=null,k.relative=!1,k.x=f.x/f.view.scale-f.view.translate.x,k.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(N,R),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=g.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
-this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
-da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
-if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var W=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+W.x*ka.width),this.scale*(this.translate.y+W.y*ka.height),this.scale*W.width*ka.width,
+this.scale*W.height*ka.height)};b.getPreferredPageSize=function(W,ka,q){W=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,W.width*ka.width,W.height*ka.height)};var d=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(W,ka,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var S=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),ba=mxUtils.hasScrollbars(b.container),U=b.view.translate,ca=b.view.scale,
+ea=mxRectangle.fromRectangle(S);ea.x=ea.x/ca-U.x;ea.y=ea.y/ca-U.y;ea.width/=ca;ea.height/=ca;U=b.container.scrollTop;var na=b.container.scrollLeft,ra=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ra+=3;var ya=b.container.offsetWidth-ra;ra=b.container.offsetHeight-ra;W=W?Math.max(.3,Math.min(ka||1,ya/ea.width)):ca;ka=(ya-W*ea.width)/2/W;var va=0==this.lightboxVerticalDivider?0:(ra-W*ea.height)/this.lightboxVerticalDivider/W;ba&&(ka=Math.max(ka,0),va=Math.max(va,
+0));if(ba||S.width<ya||S.height<ra)b.view.scaleAndTranslate(W,Math.floor(ka-ea.x),Math.floor(va-ea.y)),b.container.scrollTop=U*W/ca,b.container.scrollLeft=na*W/ca;else if(0!=q||0!=F)S=b.view.translate,b.view.setTranslate(Math.floor(S.x+q/ca),Math.floor(S.y+F/ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(W){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(W){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
-var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
-L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=ia.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
-mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
-0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
-this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
-1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ra.style.transformOrigin=
-"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
-b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
-"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
-b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
-1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var W=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=W?parseInt(W["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(W,ka,q){E++;
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",W);null!=q&&F.setAttribute("title",q);W=document.createElement("img");W.setAttribute("border","0");W.setAttribute("src",ka);W.style.width="36px";W.style.filter="invert(100%)";F.appendChild(W);this.chromelessToolbar.appendChild(F);return F});if(null!=D.backBtn){var N=Graph.sanitizeLink(D.backBtn.url);null!=N&&p(mxUtils.bind(this,function(W){window.location.href=
+N;mxEvent.consume(W)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=p(mxUtils.bind(this,function(W){this.actions.get("previousPage").funct();mxEvent.consume(W)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var M=p(mxUtils.bind(this,function(W){this.actions.get("nextPage").funct();mxEvent.consume(W)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});R.style.paddingLeft="0px";R.style.paddingRight="4px";M.style.paddingLeft="4px";M.style.paddingRight=
+"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(M.style.display="",R.style.display="",G.style.display="inline-block"):(M.style.display="none",R.style.display="none",G.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(W){this.actions.get("zoomOut").funct();mxEvent.consume(W)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(W){this.actions.get("zoomIn").funct();mxEvent.consume(W)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(W){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(W)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,k=null,z=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);f=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";k=null}),600)}),W||200)}),t=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,W||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=p(mxUtils.bind(this,function(W){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=B.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(W)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(W){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(W)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var O=this.lightboxToolbarActions[e];O.elem=p(O.fn,O.icon,O.tooltip)}if(null!=D.refreshBtn){var J=null==D.refreshBtn.url?null:Graph.sanitizeLink(D.refreshBtn.url);
+p(mxUtils.bind(this,function(W){null!=J?window.location.href=J:window.location.reload();mxEvent.consume(W)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=D.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(W){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(W)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(W){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(W))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(W){mxEvent.isTouchEvent(W)||(mxEvent.isShiftDown(W)||t(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(W){mxEvent.consume(W)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(W){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(W)?z():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(W){mxEvent.isShiftDown(W)?z():t(100);
+mxEvent.consume(W)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(W){mxEvent.isTouchEvent(W)||t(30)}));var y=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(W,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(W,ka){},mouseUp:function(W,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+y&&Math.abs(this.scrollTop-b.container.scrollTop)<y&&Math.abs(this.startX-ka.getGraphX())<y&&Math.abs(this.startY-ka.getGraphY())<y&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var W=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=W.x-(this.x0||
+0)*ka.width;this.translate.y=W.y-(this.y0||0)*ka.height}ia.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var W=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*ka.x+W.width*q.width),S=Math.ceil(2*ka.y+W.height*q.height),ba=b.minimumGraphSize;if(null==ba||ba.width!=F||ba.height!=S)b.minimumGraphSize=new mxRectangle(0,0,F,S);F=ka.x-W.x*q.width;ka=ka.y-W.y*q.height;
+this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==ka?da.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=W.x,this.view.y0=W.y,W=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,ka),b.container.scrollLeft+=Math.round((F-W)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),aa=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var qa=null,sa=null,L=null,V=null,T=null,Y=function(W){null!=qa&&window.clearTimeout(qa);0<=W&&window.setTimeout(function(){if(!b.isMouseDown||V)qa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),aa.style.transformOrigin="",ja.style.transformOrigin=
+"",mxClient.IS_SF?(aa.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){aa.style.transform="";ja.style.transform=""},0)):(aa.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,S=0,ba=0;null!=sa&&(S=b.container.offsetWidth/2-sa.x+q.x,ba=b.container.offsetHeight/2-sa.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(S+=ka.x-L.x,ba+=ka.y-L.y),null!=d&&g.chromelessResize(!1,null,S*(b.cumulativeZoomFactor-1),ba*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==S&&0==ba||(b.container.scrollLeft-=S*(b.cumulativeZoomFactor-1),b.container.scrollTop-=ba*(b.cumulativeZoomFactor-1)));null!=T&&aa.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=V=sa=L=qa=null}),null!=W?W:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=
+function(W,ka,q,F){F=null!=F?F:this.zoomFactor;(ka=ka||!b.scrollbars)&&(sa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));W?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==T&&""!=aa.getAttribute("filter")&&(T=aa.getAttribute("filter"),aa.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=ka||null==sa?b.container.scrollLeft+
+b.container.clientWidth/2:sa.x+b.container.scrollLeft-b.container.offsetLeft,F=ka||null==sa?b.container.scrollTop+b.container.clientHeight/2:sa.y+b.container.scrollTop-b.container.offsetTop,aa.style.transformOrigin=W+"px "+F+"px",aa.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=W+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(W=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(W.style,
+"transform-origin",(ka||null==sa?b.container.clientWidth/2+b.container.scrollLeft-W.offsetLeft+"px":sa.x+b.container.scrollLeft-W.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==sa?b.container.clientHeight/2+b.container.scrollTop-W.offsetTop+"px":sa.y+b.container.scrollTop-W.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(W.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=g.hoverIcons&&
+g.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(W){null!=qa&&window.clearTimeout(qa)},null,function(W){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(W){null==qa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(W,ka,q,F,S){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(W))q=
+b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(W)?b.view.setTranslate(q.x+(ka?-F:F),q.y):b.view.setTranslate(q.x,q.y+(ka?F:-F));else if(q||b.isZoomWheelEvent(W))for(var ba=mxEvent.getSource(W);null!=ba;){if(ba==b.container)return b.tooltipHandler.hideTooltip(),sa=null!=F&&null!=S?new mxPoint(F,S):new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),V=q,q=b.zoomFactor,F=null,W.ctrlKey&&null!=W.deltaY&&40>Math.abs(W.deltaY)&&Math.round(W.deltaY)!=W.deltaY?q=1+Math.abs(W.deltaY)/20*
+(q-1):null!=W.movementY&&"pointermove"==W.type&&(q=1+Math.max(1,Math.abs(W.movementY))/20*(q-1),F=-1),b.lazyZoom(ka,null,F,q),mxEvent.consume(W),!1;ba=ba.parentNode}}),b.container);b.panningHandler.zoomGraph=function(W){b.cumulativeZoomFactor=W.scale;b.lazyZoom(0<W.scale,!0);mxEvent.consume(W)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
-EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
-EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
+EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,g=60;null!=d&&(g=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,m){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,m);this.setCurrentMenu(C)};
-EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
-EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var m=b.view.scale;e.x=e.x/m-k.x;e.y=e.y/m-k.y;e.width/=m;e.height/=m;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
-e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
-"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
-(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,g,l){this.editor.graph.popupMenuHandler.hideMenu();var D=new mxPopupMenu(b);D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});D.popup(d,g,null,l);this.setCurrentMenu(D)};
+EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};
+EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,g;for(g in urlParams)b=0==d?b+"?":b+"&",b+=g+"="+urlParams[g],d++;return b};
+EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,g=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();g!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var g=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-g)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());g=b.view.translate;var l=b.view.scale;d.x=d.x/l-g.x;d.y=d.y/l-g.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,g=mxUtils.hasScrollbars(d.container),l=0,D=0;g&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,D=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(g){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();g&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
+d.view.scale-D);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,d,g){d&&(b.window.setSize=function(D,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+N=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),G=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-R));p=Math.max(0,Math.min(p,N-G));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(R,G)};var l=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,d,g,l,D){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=g;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var g=this.previousImage;null!=g&&null!=g.src&&"data:page/id,"==g.src.substring(0,13)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=d}null!=this.previousFormat&&
+(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
-1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
-1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
-var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
-this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
-k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
-m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
-b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),g=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});g.addListener(mxEvent.ADD,l);g.addListener(mxEvent.UNDO,l);g.addListener(mxEvent.REDO,l);g.addListener(mxEvent.CLEAR,l);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(E,N){p.apply(this,arguments);l()};l()};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<l.length;D++)this.actions.get(l[D]).setEnabled(0<d.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
+d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
+1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(g);this.actions.get("selectEdges").setEnabled(g);
+this.actions.get("selectAll").setEnabled(g);this.actions.get("selectNone").setEnabled(g);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
+1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,g=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,g=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
+d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(g-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}g=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=g+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var N=null!=this.hsplit.parentNode?D+this.splitSize:0;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=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=N+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=g+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=N+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=g+"px",this.diagramContainer.style.bottom=this.footerHeight+l+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,205 +2227,204 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
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(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
-EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
-EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
+EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
+EditorUi.prototype.addSplitHandler=function(b,d,g,l){function D(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,N+(d?e.x-E.x:E.y-e.y)-g));mxEvent.consume(Q);N!=M()&&(R=!0,G=null)}}function p(Q){D(Q);E=N=null}var E=null,N=null,R=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var M=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+g-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));N=M();R=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!R&&this.hsplitClickEnabled){var e=null!=G?G-g:0;G=M();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
+EditorUi.prototype.prompt=function(b,d,g){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){g(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,d,g,l,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(d,D,p,g,null,null,null,null,null,null,null,null,l?g:null)}else null!=g&&g()};
+EditorUi.prototype.showError=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){b=new ErrorDialog(this,b,d,g||mxResources.get("ok"),l,D,p,E,Q,N,R);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,G||340,M||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,g,l,D,p,E,N,R,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,g,l,D,p,E,N,R,G);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,d,g){null!=this.dialogs&&0<this.dialogs.length&&(null==g||g==this.dialog.container.firstChild)&&(g=this.dialogs.pop(),0==g.close(b,d)?this.dialogs.push(g):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),g=new mxDictionary,l=[],D=0;D<d.length;D++){var p=b.isTableCell(d[D])?b.model.getParent(d[D]):d[D];null==p||g.get(p)||(g.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,d){var g=this.editor.graph,l=g.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){g.cellEditor.restoreSelection(l);d(p)},function(){g.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,D,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
-0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
-else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};
-EditorUi.prototype.executeLayout=function(b,e,k){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(m.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var F=new Image;F.onload=function(){k(p,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>g&&(d=b.substring(g,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return d};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var l=decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}b(g)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==d&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var N=E.lastIndexOf("%3E");
+0<=N&&N<E.length-3&&(E=E.substring(0,N+3))}catch(M){}try{var R=p.getElementsByTagName("span"),G=null!=R&&0<R.length?mxUtils.trim(decodeURIComponent(R[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(M){}}catch(M){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(l){b(null)});else if(null!=g&&0<g.length&&"text"==d&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(l){l.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+else b(null)}))["catch"](function(g){b(null)})};
+EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(g?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));g=g&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)):(g=d.getElementsByTagName("img"),1==g.length&&(g=g[0],b=g.getAttribute("src"),null!=b&&g.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,g=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?g=b.getData("Text"):(g=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==g||0==g.length)&&(g=b.getData("text/plain"))),null!=g&&(g=Graph.zapGremlins(mxUtils.trim(g)),b=this.extractGraphModelFromHtml(g),null!=b&&(g=b))));null!=g&&this.isCompatibleString(g)&&
+(d=g);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
+EditorUi.prototype.executeLayout=function(b,d,g){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(l.getModel().endUpdate(),null!=g&&g())}};
+EditorUi.prototype.showImageDialog=function(b,d,g,l){l=this.editor.graph.cellEditor;var D=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(D);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){g(p,E.width,E.height)};E.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,d,g){b=new LinkDialog(this,b,d,g);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
+EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=g&&0<g.length?(d=new Image,d.onload=function(){b(new mxImage(g,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.src=g):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,d,g){mxUtils.confirm(b)?null!=d&&d():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
-D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
-g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
-m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
-C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
-!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
-C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
-C.bindAction(85,!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
+EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var k=l.getCompositeParents(l.getSelectionCells()),z=0<k.length?k[0]:null;if(null!=z)if(f){l.getModel().beginUpdate();try{for(z=0;z<k.length;z++)if(l.getModel().isVertex(k[z])&&l.isCellResizable(k[z])){var t=l.getCellGeometry(k[z]);null!=t&&(t=t.clone(),37==Q?t.width=Math.max(0,t.width-e):38==Q?t.height=Math.max(0,t.height-e):39==Q?t.width+=e:40==Q&&(t.height+=e),l.getModel().setGeometry(k[z],
+t))}}finally{l.getModel().endUpdate()}}else{t=l.model.getParent(z);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(z)&&null!=l.layoutManager&&!l.isCellLocked(z)&&(f=l.layoutManager.getLayout(t));if(null!=f&&f.constructor==mxStackLayout)e=t.getIndex(z),37==Q||38==Q?l.model.add(t,z,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(t,z,Math.min(l.model.getChildCount(t),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(z,0,0,k),null!=I.first&&(z=k=0,37==Q?k=-e:38==
+Q?z=-e:39==Q?k=e:40==Q&&(z=e),I.currentDx+=k*B,I.currentDy+=z*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var O=I.roundLength(I.currentDx/B),J=I.roundLength(I.currentDy/B);I.moveCells(I.cells,O,J);I.reset()}},400))}}}}var g=this,l=this.editor.graph,D=new mxKeyHandler(l),p=D.isEventIgnored;D.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==g.dialogs||0==g.dialogs.length)};D.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,N={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=D.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=g.actions.get(g.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=N[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),N[Q.keyCode],
+l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return R.apply(this,arguments)};D.bindAction=mxUtils.bind(this,
+function(Q,e,f,k){var z=this.actions.get(f);null!=z&&(f=function(){z.isEnabled()&&z.funct.apply(this,arguments)},e?k?D.bindControlShiftKey(Q,f):D.bindControlKey(Q,f):k?D.bindShiftKey(Q,f):D.bindKey(Q,f))});var G=this,M=D.escape;D.escape=function(Q){M.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){l.exitGroup()});D.bindControlShiftKey(35,function(){l.enterGroup()});D.bindShiftKey(36,function(){l.home()});D.bindKey(35,function(){l.refresh()});D.bindAction(107,!0,"zoomIn");
+D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),D.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),D.bindControlKey(13,function(){G.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
+!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
+D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"format",!0),D.bindAction(85,
+!0,"underline"),D.bindAction(85,!0,"ungroup",!0),D.bindAction(190,!0,"superscript"),D.bindAction(188,!0,"subscript"),D.bindAction(13,!1,"keyPressEnter"),D.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?D.bindAction(89,!0,"redo"):D.bindAction(90,!0,"redo",!0);return D};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
-Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(g){for(var l=0;l<b.length;l++)g=g.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(g)}})();
+Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},g=Math.pow(2,53)-1;return function(l){var D=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var N=Number(D.length);N=isNaN(N)?0:0!==N&&isFinite(N)?(0<N?1:-1)*Math.floor(Math.abs(N)):N;N=Math.min(Math.max(N,0),g);for(var R=d(this)?Object(new this(N)):Array(N),G=0,M;G<N;)M=D[G],R[G]=p?"undefined"===typeof E?p(M,G):p.call(E,M,G):M,G+=1;R.length=N;return R}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,g){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
-return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
-null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
-0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
-N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
-N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
-this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
-(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
-3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
-aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
-1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
-(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
-this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
-mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};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(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
-[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
-N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
-this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
-arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
-this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
-function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=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=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
-this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
-function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
-null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
-N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
-0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
-Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
-Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph=function(b,d,g,l,D,p){mxGraph.call(this,b,d,g,l);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,N=null,R=null,G=null,M=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var T=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=T)if(this.model.isEdge(T.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),M=this.isCellSelected(T.cell),R=T,N=L,null!=T.text&&null!=
+T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,L.getGraphX(),L.getGraphY()))G=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(T.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(G=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(T.cell),null==Y||null==Y.getHandleForEvent(L))){var W=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ka=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=ka+2;W.grow(ka);if(this.isTableCell(T.cell)&&!this.isCellSelected(T.cell)&&!(mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(T.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){ka*=V;var F=2*ka;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(W,new mxRectangle(T.x,
+T.y-ka,T.width,F))||this.model.getChildAt(q,0)!=T.cell&&mxUtils.intersects(W,new mxRectangle(T.x-ka,T.y,F,T.height))||mxUtils.intersects(W,new mxRectangle(T.x,T.y+T.height-ka,T.width,F))||mxUtils.intersects(W,new mxRectangle(T.x+T.width-ka,T.y,F,T.height)))q=this.selectionCellsHandler.isHandled(Y),this.selectCellForEvent(Y,L.getEvent()),Y=this.selectionCellsHandler.getHandler(Y),null!=Y&&(ka=Y.getHandleForEvent(L),null!=ka&&(Y.start(L.getGraphX(),L.getGraphY(),ka),Y.blockDelayedSelection=!q,L.consume()))}}for(;!L.isConsumed()&&
+null!=T&&(this.isTableCell(T.cell)||this.isTableRow(T.cell)||this.isTable(T.cell));)this.isSwimlane(T.cell)&&(Y=this.getActualStartSize(T.cell),(0<Y.x||0<Y.width)&&mxUtils.intersects(W,new mxRectangle(T.x+(Y.x-Y.width-1)*V+(0==Y.x?T.width:0),T.y,1,T.height))||(0<Y.y||0<Y.height)&&mxUtils.intersects(W,new mxRectangle(T.x,T.y+(Y.y-Y.height-1)*V+(0==Y.y?T.height:0),T.width,1)))&&(this.selectCellForEvent(T.cell,L.getEvent()),Y=this.selectionCellsHandler.getHandler(T.cell),null!=Y&&(ka=mxEvent.CUSTOM_HANDLE-
+Y.customHandles.length+1,Y.start(L.getGraphX(),L.getGraphY(),ka),L.consume())),T=this.view.getState(this.model.getParent(T.cell))}}}));this.addMouseListener({mouseDown:function(L,V){},mouseMove:mxUtils.bind(this,function(L,V){L=this.selectionCellsHandler.handlers.map;for(var T in L)if(null!=L[T].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var Y=this.tolerance;if(null!=E&&null!=R&&null!=N){if(T=R,Math.abs(E.x-V.getGraphX())>Y||Math.abs(E.y-V.getGraphY())>
+Y){var W=this.selectionCellsHandler.getHandler(T.cell);null==W&&this.model.isEdge(T.cell)&&(W=this.createHandler(T));if(null!=W&&null!=W.bends&&0<W.bends.length){L=W.getHandleForEvent(N);var ka=this.view.getEdgeStyle(T);Y=ka==mxEdgeStyle.EntityRelation;M||G!=mxEvent.LABEL_HANDLE||(L=G);if(Y&&0!=L&&L!=W.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!Y||null==T.visibleSourceState&&null==T.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=T.visibleSourceState||
+L==W.bends.length-1||null!=T.visibleTargetState)Y||L==mxEvent.LABEL_HANDLE||(Y=T.absolutePoints,null!=Y&&(null==ka&&null==L||ka==mxEdgeStyle.OrthConnector)&&(L=G,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,Y[0].x,Y[0].y)?L=0:mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y)?L=W.bends.length-1:null!=ka&&(2==Y.length||3==Y.length&&(0==Math.round(Y[0].x-Y[1].x)&&0==Math.round(Y[1].x-Y[2].x)||0==Math.round(Y[0].y-Y[1].y)&&0==Math.round(Y[1].y-
+Y[2].y)))?L=2:(L=mxUtils.findNearestSegment(T,E.x,E.y),L=null==ka?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),W.start(V.getGraphX(),V.getGraphX(),L),V.consume(),this.graphHandler.reset()}null!=W&&(this.selectionCellsHandler.isHandlerActive(W)?this.isCellSelected(T.cell)||(this.selectionCellsHandler.handlers.put(T.cell,W),this.selectCellForEvent(T.cell,V.getEvent())):this.isCellSelected(T.cell)||W.destroy());M=!1;E=N=R=G=null}}else if(T=V.getState(),null!=T&&this.isCellEditable(T.cell)){W=
+null;if(this.model.isEdge(T.cell)){if(L=new mxRectangle(V.getGraphX(),V.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),Y=T.absolutePoints,null!=Y)if(null!=T.text&&null!=T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,V.getGraphX(),V.getGraphY()))W="move";else if(mxUtils.contains(L,Y[0].x,Y[0].y)||mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y))W="pointer";else if(null!=T.visibleSourceState||null!=T.visibleTargetState)L=this.view.getEdgeStyle(T),W="crosshair",L!=mxEdgeStyle.EntityRelation&&
+this.isOrthogonal(T)&&(V=mxUtils.findNearestSegment(T,V.getGraphX(),V.getGraphY()),V<Y.length-1&&0<=V&&(W=0==Math.round(Y[V].x-Y[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){Y=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(V.getGraphX(),V.getGraphY());L.grow(Y);if(this.isTableCell(T.cell)&&(V=this.model.getParent(T.cell),Y=this.model.getParent(V),!this.isCellSelected(Y)))if(mxUtils.intersects(L,new mxRectangle(T.x,T.y-2,T.width,4))&&this.model.getChildAt(Y,
+0)!=V||mxUtils.intersects(L,new mxRectangle(T.x,T.y+T.height-2,T.width,4)))W="row-resize";else if(mxUtils.intersects(L,new mxRectangle(T.x-2,T.y,4,T.height))&&this.model.getChildAt(V,0)!=T.cell||mxUtils.intersects(L,new mxRectangle(T.x+T.width-2,T.y,4,T.height)))W="col-resize";for(V=T;null==W&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(Y=this.getActualStartSize(V.cell),ka=this.view.scale,(0<Y.x||0<Y.width)&&mxUtils.intersects(L,new mxRectangle(V.x+
+(Y.x-Y.width-1)*ka+(0==Y.x?V.width*ka:0),V.y,1,V.height))?W="col-resize":(0<Y.y||0<Y.height)&&mxUtils.intersects(L,new mxRectangle(V.x,V.y+(Y.y-Y.height-1)*ka+(0==Y.y?V.height:0),V.width,1))&&(W="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=W&&T.setCursor(W)}}}),mouseUp:mxUtils.bind(this,function(L,V){G=E=N=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&
+(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};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(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],T=this.graph.pageFormat,Y=this.graph.pageScale,W=T.width*Y;T=T.height*Y;Y=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*W+Y.x)*ka,(q.y*
+T+Y.y)*ka,W*ka,T*ka));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*W+Y.x)*ka,((q.y+F)*T+Y.y)*ka,W*ka,T*ka));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
+arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),T=new mxDictionary,Y=[],W=0;W<V.length;W++){var ka=this.graph.isTableCell(L)&&this.graph.isTableCell(V[W])&&this.graph.isCellSelected(V[W])?this.graph.model.getParent(V[W]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[W])&&this.graph.isCellSelected(V[W])?V[W]:this.graph.getCompositeParent(V[W]);null==ka||T.get(ka)||(T.put(ka,!0),Y.push(ka))}return Y};var f=this.graphHandler.start;
+this.graphHandler.start=function(L,V,T,Y){var W=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?W=!0:L=this.graph.model.getParent(L));W||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};
+var z=(new Date).getTime(),t=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(z=(new Date).getTime(),t=0):t=(new Date).getTime()-z};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<t||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var O=this.isToggleEvent;this.isToggleEvent=function(L){return O.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var J=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(L){return J.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.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(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
+L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var T=V?L.sourceState.cell:L.getCell();null!=T&&(T=this.getClickableLinkForCell(T),null!=T&&(this.isCustomLink(T)?this.customLinkClicked(T):this.openLink(T)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var da=this.tooltipHandler.show;this.tooltipHandler.show=function(){da.apply(this,arguments);if(null!=
+this.div)for(var L=this.div.getElementsByTagName("a"),V=0;V<L.length;V++)null!=L[V].getAttribute("href")&&null==L[V].getAttribute("target")&&L[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(V?L.sourceState.cell:L.getCell())};var ja=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||
+this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ja.apply(this,arguments)};this.selectRegion=function(L,V){var T=mxEvent.isAltDown(V)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,T,function(Y){return"1"==mxUtils.getValue(Y.style,"locked","0")},!0);if(this.isToggleEvent(V))for(T=0;T<L.length;T++)this.selectCellForEvent(L[T],V);else this.selectCellsForEvent(L,V);return L};var aa=this.graphHandler.shouldRemoveCellsFromParent;
+this.graphHandler.shouldRemoveCellsFromParent=function(L,V,T){return this.graph.isCellSelected(L)?!1:aa.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};var qa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){"mouseDown"==V.getProperty("eventName")&&(L=V.getProperty("event").getState(),qa=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?
+null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,V){if(!mxEvent.isMultiTouchEvent(V)){L=V.getProperty("event");var T=V.getProperty("cell");null==T?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),k.start(L.x,L.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(T)&&this.removeSelectionCell(T);qa=null;V.consume()}}));this.connectionHandler.selectCells=function(L,V){this.graph.setSelectionCell(V||
+L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,V){var T=L.view.graph;return V&&(T.isCellSelected(L.cell)||T.isTableRow(L.cell)&&T.selectionCellsHandler.isHandled(T.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&
+this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(L){L=sa.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
-Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
-Graph.createSvgImage=function(b,e,k,m,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=C?'viewBox="0 0 '+m+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
-Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),F=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=F.style?F.style.backgroundColor=C:F.setAttribute("style","background-color:"+C));null==p.createElementNS?(F.setAttribute("xmlns",mxConstants.NS_SVG),F.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):F.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);F.setAttribute("version","1.1");
-F.setAttribute("width",k+"px");F.setAttribute("height",m+"px");F.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(F);return F};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(b){for(var e=0,k=[],m=0;m<b.length;m++){var C=b.charCodeAt(m);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,m)),e=m+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,m=0;m<k;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,e,k){var m=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==m){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
-Graph.fadeNodes=function(b,e,k,m,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
-Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
+Graph.createSvgImage=function(b,d,g,l,D){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=D?'viewBox="0 0 '+l+" "+D+'" ':"")+'version="1.1">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,d)};
+Graph.createSvgNode=function(b,d,g,l,D){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",g+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+g+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,g,l){var D=document.createElement("canvas");D.width=d;D.height=g;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){D.getContext("2d").drawImage(p,0,0);l(D.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(b){for(var d=0,g=[],l=0;l<b.length;l++){var D=b.charCodeAt(l);(32<=D||9==D||10==D||13==D)&&65535!=D&&65534!=D||(g.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&g.push(b.substring(d));return 0==g.length?b:g.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=b.charCodeAt(g);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=String.fromCharCode(b[g]);return d.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var g=b.byteLength,l=0;l<g;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,d,g){var l=d.charCodeAt(0),D=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==l){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+d.length-1;g++){if(b[g]!=d.charCodeAt(D))return Graph.arrayBufferIndexOfString(b,d,p+1);D++}return D==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,d,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?d:Graph.zapGremlins(d)};
+Graph.fadeNodes=function(b,d,g,l,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+D+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},D)},0)};Graph.removeKeys=function(b,d){for(var g in b)d(g)&&delete b[g]};
+Graph.setTransitionForNodes=function(b,d){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var g=0;g<b.length;g++)b[g].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),D=l.indexOf("<svg");if(0<=D){g.innerHTML=Graph.sanitizeHtml(l.substring(D));var p=g.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{l=d=
+1;var E=p[0].getAttribute("width"),N=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;N=null!=N&&"%"!=N.charAt(N.length-1)?parseFloat(N):NaN;var R=p[0].getAttribute("viewBox");if(null!=R&&!isNaN(E)&&!isNaN(N)){var G=R.split(" ");4<=R.length&&(d=parseFloat(G[2])/E,l=parseFloat(G[3])/N)}var M=p[0].getBBox();0<M.width&&0<M.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",M.x+" "+M.y+" "+M.width+" "+M.height),g.getElementsByTagName("svg")[0].setAttribute("width",
+M.width/d),g.getElementsByTagName("svg")[0].setAttribute("height",M.height/l))}catch(Q){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,d){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",d);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
-Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
-Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.sketchBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
+Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
-m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
-null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
-(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
-P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=g.view.graph.tolerance,p=!0,E=null,N=mxUtils.bind(this,function(M){p=!0;E=new mxPoint(mxEvent.getClientX(M),mxEvent.getClientY(M))}),R=mxUtils.bind(this,function(M){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(M))<D&&Math.abs(E.y-mxEvent.getClientY(M))<D}),G=mxUtils.bind(this,function(M){if(p)for(var Q=mxEvent.getSource(M);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,Q,M);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,N,R,G);mxEvent.addListener(l.node,"click",function(M){mxEvent.consume(M)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var l=mxEvent.getSource(g);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(l)&&mxEvent.consume(g))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(g,l){null!=this.container&&this.flowAnimationStyle&&(g=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(g))}));this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
+null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
+"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var N=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==N||"filledEdge"==N)};Graph.prototype.isAutoSizeState=function(E){return"1"==
+mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,N){E=null!=E?E:!0;N=null!=N?N:!0;var R=this.model;return R.filterDescendants(function(G){return E&&R.isVertex(G)||N&&R.isEdge(G)},R.getRoot())};Graph.prototype.getCommonStyle=
+function(E){for(var N={},R=0;R<E.length;R++){var G=this.view.getState(E[R]);this.mergeStyle(G.style,N,0==R)}return N};Graph.prototype.mergeStyle=function(E,N,R){if(null!=E){var G={},M;for(M in E){var Q=E[M];null!=Q&&(G[M]=!0,null==N[M]&&R?N[M]=Q:N[M]!=Q&&delete N[M])}for(M in N)G[M]||delete N[M]}};Graph.prototype.getStartEditingCell=function(E,N){N=this.getCellStyle(E);N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&
+0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),N=this.getCellStyle(E),N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(N=0;N<this.model.getChildCount(E);N++){var R=this.model.getChildAt(E,N);if(this.isCellEditable(R)){E=R;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,N,R){R=null!=R?R:Graph.pasteStyles;
+Graph.removeKeys(E,function(G){return 0>mxUtils.indexOf(R,G)});this.updateCellStyles(E,N)};Graph.prototype.updateCellStyles=function(E,N){this.model.beginUpdate();try{for(var R=0;R<N.length;R++)if(this.model.isVertex(N[R])||this.model.isEdge(N[R])){var G=this.getCellStyle(N[R],!1),M;for(M in E){var Q=E[M];G[M]!=Q&&this.setCellStyles(M,Q,[N[R]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,N,R,G,M,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,N=N/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,N,R,G,M,Q){G=null!=G?G:!0;M=null!=M?M:!0;
+null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var e=this.model.getChildCount(R)-1;0<=e;e--){var f=this.model.getChildAt(R,e),k=this.getScaledCellAt(E,N,f,G,M,Q);if(null!=k)return k;if(this.isCellVisible(f)&&(M&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(k=this.view.getState(f),null!=k&&(null==Q||!Q(k,E,N))&&this.intersects(k,E,N)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var N=this.getCellGeometry(E);null!=N&&N.relative;)E=this.getModel().getParent(E),N=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var N=
+new mxDictionary,R=[],G=0;G<E.length;G++){var M=this.getCompositeParent(E[G]);this.isTableCell(M)&&(M=this.graph.model.getParent(M));this.isTableRow(M)&&(M=this.graph.model.getParent(M));null==M||N.get(M)||(N.put(M,!0),R.push(M))}return R};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var N=this.model.getParent(E);if(!this.model.isVertex(N))break;E=N}return E};Graph.prototype.filterSelectionCells=function(E){var N=this.getSelectionCells();if(null!=E){for(var R=[],G=0;G<N.length;G++)E(N[G])||
+R.push(N[G]);N=R}return N};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var N=this.currentScale,R=this.currentTranslate;E=new mxRectangle((E.x+2*R.x)*N-R.x,(E.y+2*R.y)*N-R.y,E.width*N,E.height*N)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
+if(this.graph.useCssTransforms){var N=this.graph.currentTranslate,R=this.graph.currentScale;E=new mxRectangle((E.x+N.x)*R,(E.y+N.y)*R,E.width*R,E.height*R)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);d.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=g.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};var l=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTable(E[R])||this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var N=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var R=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
+"scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");N!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,N=this.scale,R=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=N,this.translate=R)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.useCssTransforms,M=this.view.scale,Q=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=M,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,g){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(g)}};
+Graph.prototype.openLink=function(b,d,g){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else l=window.open(b,null!=d?d:"_blank"),null==l||g||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
-b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=window.console&&console.error(m)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var m=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)m[C]=b[k].config[C];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
-Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
-Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
-Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
+b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var d=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var l=new window[b[g].layout](this);if(null!=b[g].config)for(var D in b[g].config)l[D]=b[g].config[D];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return d};
+Graph.prototype.getDataForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=null!=b[g].value?b[g].value.attributes:null,D={};D.id=b[g].id;if(null!=l)for(var p=0;p<l.length;p++)D[l[p].nodeName]=l[p].nodeValue;else D.label=this.convertValueToString(b[g]);d.push(D)}return d};
+Graph.prototype.getNodesForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=this.view.getState(b[g]);if(null!=l){for(var D=this.cellRenderer.getShapesForState(l),p=0;p<D.length;p++)null!=D[p]&&null!=D[p].node&&d.push(D[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
+Graph.prototype.createWipeAnimations=function(b,d){for(var g=[],l=0;l<b.length;l++){var D=this.view.getState(b[l]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?g.push(this.createEdgeWipeAnimation(D,d)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&g.push(this.createVertexWipeAnimation(D,d)))}return g};
+Graph.prototype.createEdgeWipeAnimation=function(b,d){var g=b.absolutePoints.slice(),l=b.segments,D=b.length,p=g.length;return{execute:mxUtils.bind(this,function(E,N){if(null!=b.shape){var R=[g[0]];N=E/N;d||(N=1-N);for(var G=D*N,M=1;M<p;M++)if(G<=l[M-1]){R.push(new mxPoint(g[M-1].x+(g[M].x-g[M-1].x)*G/l[M-1],g[M-1].y+(g[M].y-g[M-1].y)*G/l[M-1]));break}else G-=l[M-1],R.push(g[M]);b.shape.points=R;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=N)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,d){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,D){null!=b.shape&&(D=l/D,d||(D=1-D),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*D,g.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,g,l){g=null!=g?g:30;l=null!=l?l:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(D);for(var N=0;N<b.length;N++)b[N].stop();null!=d&&d()}else for(N=0;N<b.length;N++)b[N].execute(p,g);p++});D=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
-m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var g=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(g,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-g,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var g=this.model.cells[d];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
-Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
-Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
-I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
-"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
-Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
-!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
-C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
-!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
-S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
-Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
-Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
-Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
-null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,e,k){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,g){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(g)&&!mxEvent.isShiftDown(g)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
+Graph.prototype.formatDate=function(b,d,g){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 l=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),g=!0);var N=g?"getUTC":"get",R=b[N+"Date"](),G=b[N+"Day"](),M=b[N+"Month"](),Q=b[N+"FullYear"](),e=b[N+"Hours"](),f=b[N+"Minutes"](),k=b[N+"Seconds"]();N=b[N+"Milliseconds"]();var z=g?0:b.getTimezoneOffset(),t={d:R,dd:E(R),ddd:l.i18n.dayNames[G],dddd:l.i18n.dayNames[G+7],m:M+1,mm:E(M+1),mmm:l.i18n.monthNames[M],mmmm:l.i18n.monthNames[M+
+12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:k,ss:E(k),l:E(N,3),L:E(99<N?Math.round(N/10):N),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:g?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<z?"-":"+")+E(100*Math.floor(Math.abs(z)/60)+Math.abs(z)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in t?t[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(d,b[g])){d=null;break}}return d};
+Graph.prototype.createLayersDialog=function(b,d){var g=document.createElement("div");g.style.position="absolute";for(var l=this.getModel(),D=l.getChildCount(l.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function N(){l.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var R=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[R]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";d&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,R);g.appendChild(G);
+mxEvent.addListener(G,"click",function(){l.setVisible(E,!l.isVisible(E));N();null!=b&&b(E)});N()})(l.getChildAt(l.root,p));return g};
+Graph.prototype.replacePlaceholders=function(b,d,g,l){l=[];if(null!=d){for(var D=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var N=p.substring(1,p.length-1);if("id"==N)E=b.id;else if(0>N.indexOf("{"))for(var R=b;null==E&&null!=R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=R.getAttribute(N+"_"+Graph.diagramLanguage)),
+null==E&&(E=R.hasAttribute(N)?null!=R.getAttribute(N)?R.getAttribute(N):"":null)),R=this.model.getParent(R);null==E&&(E=this.getGlobalVariable(N));null==E&&null!=g&&(E=g[N])}l.push(d.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}l.push(d.substring(D))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],g=0;g<b.length;g++){var l=this.model.getCell(b[g].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,d){var g=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),D=this.model.getParent(l),p=this.model.getParent(d);if(D==this.model.getParent(p)){b=l.getIndex(b);l=D.getIndex(l);var E=p.getIndex(d),N=D.getIndex(p);p=Math.max(l,N);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,N);l<=p;l++){N=this.model.getChildAt(D,l);for(var R=d;R<=b;R++)E.push(this.model.getChildAt(N,R))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),g=!0)}}return g};
+Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var l=b[g],D=this.getCellGeometry(l);if(null!=D){D=D.clone();if(this.getModel().isVertex(l))D.x=Math.round(D.x/d)*d,D.y=Math.round(D.y/d)*d,D.width=Math.round(D.width/d)*d,D.height=Math.round(D.height/d)*d;else if(this.getModel().isEdge(l)&&null!=D.points)for(var p=0;p<D.points.length;p++)D.points[p].x=Math.round(D.points[p].x/d)*d,D.points[p].y=Math.round(D.points[p].y/d)*d;this.getModel().setGeometry(l,
+D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(d)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,d,g,l,D,p,E,N){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var R=this.isCloneConnectSource(b),G=R?b:this.getCompositeParent(b),M=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);d==mxConstants.DIRECTION_NORTH?(M.x+=G.geometry.width/2,M.y-=g):d==
+mxConstants.DIRECTION_SOUTH?(M.x+=G.geometry.width/2,M.y+=G.geometry.height+g):(M.x=d==mxConstants.DIRECTION_WEST?M.x-g:M.x+(G.geometry.width+g),M.y+=G.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));g=this.view.scale;var e=this.view.translate;G=e.x*g;e=e.y*g;null!=Q&&this.model.isVertex(Q.cell)&&(G=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(M.x+=b.parent.geometry.x,M.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+M.x*g,e+M.y*g)).grow(40*g);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,k=null;if(null!=p){p=p.reverse();for(var z=0;z<p.length;z++)if(!this.isCellLocked(p[z])&&!this.model.isEdge(p[z])&&p[z]!=b)if(!this.model.isAncestor(b,p[z])&&this.isContainer(p[z])&&(null==f||p[z]==this.model.getParent(b)))f=p[z];else if(null==k&&this.isCellConnectable(p[z])&&!this.model.isAncestor(p[z],b)&&!this.isSwimlane(p[z])){var t=this.view.getState(p[z]);null==Q||null==t||mxUtils.intersects(Q,t)||(k=p[z])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||D;B&&("1"!=urlParams.sketch||D)&&(d==mxConstants.DIRECTION_NORTH?M.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=b.geometry.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-b.geometry.width/2:M.x+b.geometry.width/2);var I=[],O=k;k=f;D=mxUtils.bind(this,function(J){if(null==E||null!=J||null==k&&R){this.model.beginUpdate();try{if(null==O&&B){var y=this.getAbsoluteParent(null!=J?J:b);y=R?b:this.getCompositeParent(y);O=null!=J?J:this.duplicateCells([y],
+!1)[0];null!=J&&this.addCells([O],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(O);null!=ia&&(null!=J&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?M.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=ia.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-ia.width/2:M.x+ia.width/2),ia.x=M.x-ia.width/2,ia.y=M.y-ia.height/2);null!=f?(this.addCells([O],f,null,null,null,!0),k=null):B&&!R&&this.addCells([O],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||null==k&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,O,this.createCurrentEdgeStyle());if(null!=da&&this.connectionHandler.insertBeforeSource){var ja=null;for(J=b;null!=J.parent&&null!=J.geometry&&J.geometry.relative&&J.parent!=da.parent;)J=this.model.getParent(J);null!=J&&null!=J.parent&&J.parent==da.parent&&(ja=J.parent.getIndex(J),this.model.add(J.parent,da,ja))}null==k&&null!=O&&null!=b.parent&&R&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
+O,ja));null!=da&&I.push(da);null==k&&null!=O&&I.push(O);null==O&&null!=da&&da.geometry.setTerminalPoint(M,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted","cells",[da]))}finally{this.model.endUpdate()}}if(null!=N)N(I);else return I});if(null==E||null!=O||!B||null==k&&R)return D(O);E(G+M.x*g,e+M.y*g,D)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),g=[],l,D=0;D<b.length;D++)if(l=b[D],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&g.push(l);return g.join(" ")};
+Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==g&&null!=l;)null!=l.value&&"object"==typeof l.value&&(g=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=d.getAttribute("label_"+Graph.diagramLanguage)),
+null==g&&(g=d.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var g=this.model.getParent(b);this.model.isVertex(g)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(g),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
+Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var g=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,g)}return d};Graph.prototype.replaceDefaultColor=function(b,d,g,l){null!=b&&"default"==b[d]&&null!=g&&(b[d]=this.getDefaultColor(b,d,g,l))};Graph.prototype.getDefaultColor=function(b,d,g,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(g=l);return g};
+Graph.prototype.updateAlternateBounds=function(b,d,g){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,d,g,l,D){d=null!=d?d:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var E=this.view.getState(g[p]),N=this.getCellGeometry(g[p]);if(null!=E&&null!=N){var R=Math.round(N.width-E.width/this.view.scale),G=Math.round(N.height-E.height/this.view.scale);if(0!=G||0!=R){var M=this.model.getParent(g[p]),Q=this.layoutManager.getLayout(M);
+null==Q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,M,R,G):null!=D&&mxEvent.isAltDown(D)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(M,Q,R,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
+Graph.prototype.moveSiblings=function(b,d,g,l){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<D.length;d++)if(D[d]!=b.cell){var p=this.view.getState(D[d]),E=this.getCellGeometry(D[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(D[d],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,d,g,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var D=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==D&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=g+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,d,g){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,m=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,m/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((m-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var m=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
-"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,F){return p.name<F.name?-1:p.name>F.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
-Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var g=this.container.clientWidth-d,l=this.container.clientHeight-d,D=Math.floor(20*Math.min(g/b.width,l/b.height))/20;this.zoomTo(D);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*D-Math.max((l-b.height*D)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*D-Math.max((g-b.width*D)/2+d/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=b.value.getAttribute("tooltip"));if(null!=g)null!=g&&this.isReplacePlaceholders(b)&&(g=this.replacePlaceholders(b,g)),d=Graph.sanitizeHtml(g);else{g=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var D=0;D<b.length;D++)(Graph.translateDiagram&&
+"label"==b[D].nodeName||0>mxUtils.indexOf(g,b[D].nodeName))&&0<b[D].nodeValue.length&&l.push({name:b[D].nodeName,value:b[D].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(D=0;D<l.length;D++)"link"==l[D].name&&this.isCustomLink(l[D].value)||(d+=("link"!=l[D].name?"<b>"+mxUtils.htmlEntities(l[D].name)+":</b> ":"")+mxUtils.htmlEntities(l[D].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
+Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,217 +2432,217 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+x
IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
-this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-m){e=!1;k=m.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(k)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,m){k=m.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
-function(k,m){k=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,e,k){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",
-"arrow",m,"direction",k,"event",C)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
-mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
-HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(m)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(g){null!=g.relatedTarget&&
+mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(g){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(g){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(g.getEvent())||this.graph.model.isVertex(g.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(g,
+l){d=!1;g=l.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(g)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,l){g=l.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
+function(g,l){g=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(g)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,d,g){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(D){null==this.currentState||this.isResetEvent(D)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),this.drag(D,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(D))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",g,"event",D)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",g,"event",D));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,d,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
+mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,g){return this.graph.view.getState(this.graph.getCellAt(d,g))};
+HoverIcons.prototype.click=function(b,d,g){var l=g.getEvent(),D=g.getGraphX(),p=g.getGraphY();D=this.getStateAt(b,D,p);null==D||!this.graph.model.isEdge(D.cell)||this.graph.isCloneEvent(l)||D.getVisibleTerminalState(!0)!=b&&D.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,g):(this.graph.setSelectionCell(D.cell),this.reset());g.consume()};
+HoverIcons.prototype.execute=function(b,d,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
-this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
+(g=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(N,R,G){if(null!=g){var M=new mxRectangle(R,G,N.clientWidth,N.clientHeight);mxUtils.intersects(M,g)&&(N==this.arrowUp?G-=M.y+M.height-g.y:N==this.arrowRight?R+=g.x+g.width-M.x:N==this.arrowDown?G+=g.y+g.height-M.y:N==this.arrowLeft&&(R-=M.x+M.width-g.x))}N.style.left=R+"px";N.style.top=G+"px";mxUtils.setOpacity(N,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==D&&D==b&&(b=D=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(N,R){var G=this.graph.model.isVertex(N)&&this.graph.getCellGeometry(N);null==N||this.graph.model.isAncestor(N,
+this.currentState.cell)||this.graph.isSwimlane(N)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?R.style.visibility="visible":R.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
-b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
-Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,d,g){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,g))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,g)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==d||null==g||!mxUtils.contains(this.bbox,d,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,g,l,D){b=this.cloneCell(b);for(var p=0;p<g;p++){var E=this.cloneCell(d),N=this.getCellGeometry(E);null!=N&&(N.x+=p*l,N.y+=p*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:60;l=null!=l?l:40;p=null!=p?p:30;N=null!=N?N:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,d*g,b*l+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*g,l,N),this.createVertex(null,null,"",0,0,g,l,R),d,g,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,d,g){for(var l=this.model.getChildCells(b,!0),D=0;D<l.length;D++)if(null!=g&&(l[D].value=g[D]),null!=d)for(var p=this.model.getChildCells(l[D],!0),E=0;E<p.length;E++)null!=d[D][E]&&(p[E].value=d[D][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:120;l=null!=l?l:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";N=null!=N?N:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+R=null!=R?R:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,d*g,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=p;D.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,d*g+p,l,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,g,l,N),d,g,0));return 1<b?(E.geometry.y=l+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,g,l,R),d,g,0),b-1,0,l)):D};
+Graph.prototype.visitTableCells=function(b,d){var g=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<l.length;D++){for(var p=this.getActualStartSize(l[D],!0),E=this.model.getChildCells(l[D],!0),N=this.getCellStyle(l[D],!0),R=null,G=[],M=0;M<E.length;M++){var Q=this.getCellGeometry(E[M]),e={cell:E[M],rospan:1,colspan:1,row:D,col:M,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=R?R.point.x:b.x+p.x),Q.height+(null!=g&&null!=
+g[0]?g[0].point.y:b.y+p.y));e.actual=e;null!=g&&null!=g[M]&&1<g[M].rowspan?(e.rowspan=g[M].rowspan-1,e.colspan=g[M].colspan,e.actual=g[M].actual):null!=R&&1<R.colspan?(e.rowspan=R.rowspan,e.colspan=R.colspan-1,e.actual=R.actual):(R=this.getCurrentCellStyle(E[M],!0),null!=R&&(e.rowspan=parseInt(R.rowspan||1),e.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(N,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(N,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
+l.length,b.x+(R?p.x:0),b.y+(R?p.y:0));G.push(e);R=e}g=G}};Graph.prototype.getTableLines=function(b,d,g){var l=[],D=[];(d||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,N,R,G){d&&p.row<N-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(R,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));g&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return l.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return L};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
-k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
-!1)}finally{F.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
-arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
-T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
-S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
-la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
-G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
-g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
-g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
-x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
-y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+Graph.prototype.setTableRowHeight=function(b,d,g){g=null!=g?g:!0;var l=this.getModel();l.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=d;l.setGeometry(b,D);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!g){var N=mxUtils.indexOf(E,b);if(N<E.length-1){var R=E[N+1],G=this.getCellGeometry(R);null!=G&&(G=G.clone(),G.y+=d,G.height-=d,l.setGeometry(R,G))}}var M=this.getCellGeometry(p);null!=M&&(g||(g=b==E[E.length-1]),g&&(M=M.clone(),M.height+=d,l.setGeometry(p,M)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,d,g){g=null!=g?g:!1;var l=this.getModel(),D=l.getParent(b),p=l.getParent(D),E=l.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var N=b==E.length-1;l.beginUpdate();try{for(var R=l.getChildCells(p,!0),G=0;G<R.length;G++){D=R[G];E=l.getChildCells(D,!0);var M=E[b],Q=this.getCellGeometry(M);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(M,Q));b<E.length-1&&(M=E[b+1],Q=this.getCellGeometry(M),null!=Q&&(Q=Q.clone(),
+Q.x+=d,g||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(M,Q)))}if(N||g){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var g=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var D=this.graph.getCellGeometry(b[l]);null!=D&&(g+=d?D.width:D.height)}return g};
+TableLayout.prototype.getRowLayout=function(b,d){var g=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);d=d-l.x-l.width;var D=[];l=l.x;for(var p=0;p<g.length;p++){var E=this.graph.getCellGeometry(g[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,D.push(Math.round(l)))}return D};
+TableLayout.prototype.layoutRow=function(b,d,g,l){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,N=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var R=0;R<p.length;R++){var G=this.graph.getCellGeometry(p[R]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=d?(G.x=d[R],G.width=d[R+1]-G.x,R==p.length-1&&R<d.length-2&&(G.width=l-G.x-b.x-b.width)):(G.x=E,E+=G.width,R==p.length-1?G.width=l-b.x-b.width-N:N+=G.width),G.alternateBounds=new mxRectangle(0,
+0,G.width,G.height),D.setGeometry(p[R],G))}return N};
+TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),N=0;E.beginUpdate();try{for(var R=g.height-d.y-d.height,G=g.width-d.x-d.width,M=E.getChildCells(b,!0),Q=0;Q<M.length;Q++)E.setVisible(M[Q],!0);var e=this.getSize(M,!1);if(0<R&&0<G&&0<
+M.length&&0<e){if(D){var f=this.graph.getCellGeometry(M[M.length-1]);null!=f&&(f=f.clone(),f.height=R-e+f.height,E.setGeometry(M[M.length-1],f))}var k=p?null:this.getRowLayout(M[0],G),z=[],t=d.y;for(Q=0;Q<M.length;Q++)f=this.graph.getCellGeometry(M[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=G,f.y=Math.round(t),t=D||l?t+f.height:t+f.height/e*R,f.height=Math.round(t)-f.y,E.setGeometry(M[Q],f)),N=Math.max(N,this.layoutRow(M[Q],k,f.height,G,z));l&&R<e&&(g=g.clone(),g.height=t+d.height,E.setGeometry(b,
+g));p&&G<N+Graph.minTableColumnWidth&&(g=g.clone(),g.width=N+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.actual.geo.height+=I.height)}}))}else for(Q=0;Q<M.length;Q++)E.setVisible(M[Q],
+!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(M,Q){Q=null!=Q?Q:!0;var e=this.getState(M);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
+arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var M=this.node.getElementsByTagName("path");if(1<M.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&M[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&M[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(M,Q){return l.apply(this,arguments)||null!=M.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,M.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(M){D.apply(this,arguments);this.graph.model.isEdge(M.cell)&&1!=M.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(M)};mxGraphView.prototype.updateLineJumps=function(M){var Q=M.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=M.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(M.style,"jumpStyle","none")){var k=function(qa,sa,L){var V=new mxPoint(sa,L);V.type=qa;f.push(V);V=null!=M.routedPoints?M.routedPoints[f.length-1]:null;return null==V||V.type!=
+qa||V.x!=sa||V.y!=L},z=.5*this.scale;e=!1;f=[];for(var t=0;t<Q.length-1;t++){for(var B=Q[t+1],I=Q[t],O=[],J=Q[t+2];t<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,J.x,J.y,B.x,B.y)<1*this.scale*this.scale;)B=J,t++,J=Q[t+2];e=k(0,I.x,I.y)||e;for(var y=0;y<this.validEdges.length;y++){var ia=this.validEdges[y],da=ia.absolutePoints;if(null!=da&&mxUtils.intersects(M,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<da.length-1;ia++){var ja=da[ia+1],aa=da[ia];for(J=da[ia+2];ia<da.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,J.x,
+J.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=J,ia++,J=da[ia+2];J=mxUtils.intersection(I.x,I.y,B.x,B.y,aa.x,aa.y,ja.x,ja.y);if(null!=J&&(Math.abs(J.x-I.x)>z||Math.abs(J.y-I.y)>z)&&(Math.abs(J.x-B.x)>z||Math.abs(J.y-B.y)>z)&&(Math.abs(J.x-aa.x)>z||Math.abs(J.y-aa.y)>z)&&(Math.abs(J.x-ja.x)>z||Math.abs(J.y-ja.y)>z)){ja=J.x-I.x;aa=J.y-I.y;J={distSq:ja*ja+aa*aa,x:J.x,y:J.y};for(ja=0;ja<O.length;ja++)if(O[ja].distSq>J.distSq){O.splice(ja,0,J);J=null;break}null==J||0!=O.length&&O[O.length-1].x===J.x&&O[O.length-
+1].y===J.y||O.push(J)}}}for(ia=0;ia<O.length;ia++)e=k(1,O[ia].x,O[ia].y)||e}J=Q[Q.length-1];e=k(0,J.x,J.y)||e}M.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(M,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,k=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),t=!0,B=null,I=null,O=[],J=null;M.begin();for(var y=0;y<this.state.routedPoints.length;y++){var ia=this.state.routedPoints[y],da=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==y?da=Q[0]:y==this.state.routedPoints.length-1&&(da=Q[Q.length-1]);var ja=!1;if(null!=B&&1==ia.type){var aa=this.state.routedPoints[y+1];ia=aa.x/this.scale-
+da.x;aa=aa.y/this.scale-da.y;ia=ia*ia+aa*aa;null==J&&(J=new mxPoint(da.x-B.x,da.y-B.y),I=Math.sqrt(J.x*J.x+J.y*J.y),0<I?(J.x=J.x*k/I,J.y=J.y*k/I):J=null);ia>k*k&&0<I&&(ia=B.x-da.x,aa=B.y-da.y,ia=ia*ia+aa*aa,ia>k*k&&(ja=new mxPoint(da.x-J.x,da.y-J.y),ia=new mxPoint(da.x+J.x,da.y+J.y),O.push(ja),this.addPoints(M,O,e,f,!1,null,t),O=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,t=!1,"sharp"==z?(M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.lineTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x,ia.y)):"line"==
+z?(M.moveTo(ja.x+J.y*O,ja.y-J.x*O),M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.moveTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x+J.y*O,ia.y-J.x*O),M.moveTo(ia.x,ia.y)):"arc"==z?(O*=1.3,M.curveTo(ja.x-J.y*O,ja.y+J.x*O,ia.x-J.y*O,ia.y+J.x*O,ia.x,ia.y)):(M.moveTo(ia.x,ia.y),t=!0),O=[ia],ja=!0))}else J=null;ja||(O.push(da),B=da)}this.addPoints(M,O,e,f,!1,null,t);M.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(M,Q,e,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var N=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(M,Q,e,f){if(null==Q||null==M||"1"!=Q.style.snapToPoint&&"1"!=M.style.snapToPoint)N.apply(this,arguments);else{Q=this.getTerminalPort(M,Q,f);var k=this.getNextPoint(M,e,f),z=this.graph.isOrthogonal(M),t=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=t){var I=Math.cos(-t),O=Math.sin(-t);k=mxUtils.getRotatedPoint(k,I,O,B)}I=parseFloat(M.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(M.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(Q,k,0==t&&z,I);0!=t&&(I=Math.cos(t),O=Math.sin(t),k=mxUtils.getRotatedPoint(k,I,O,B));M.setAbsoluteTerminalPoint(this.snapToAnchorPoint(M,Q,e,f,k),f)}};mxGraphView.prototype.snapToAnchorPoint=function(M,Q,
+e,f,k){if(null!=Q&&null!=M){M=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=M)for(var z=0;z<M.length;z++){var t=this.graph.getConnectionPoint(Q,M[z]);if(null!=t){var B=(t.x-k.x)*(t.x-k.x)+(t.y-k.y)*(t.y-k.y);if(null==f||B<f)e=t,f=B}}null!=e&&(k=e)}return k};var R=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(M,Q,e){var f=R.apply(this,arguments);"1"==M.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
+f));return f};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(M){if(null!=M.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(M.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return G.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
-null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
-mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
-mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
-C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){d=mxStencilRegistry.libraries[g];if(null!=d){if(null==mxStencilRegistry.packages[g]){for(var l=0;l<d.length;l++){var D=d[l];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
+null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(D);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,g,d,D,E)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
+mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var g=2;g<b.length-1;g++)d+="/"+b[g]}return d};
+mxStencilRegistry.loadStencilSet=function(b,d,g,l){var D=mxStencilRegistry.packages[b];if(null!=g&&g||null==D){var p=!1;if(null==D)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
+D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(g){d(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,d,g){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,g),l=l.nextSibling;else{g=null!=g?g:!0;l=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){D=D.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(D+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
+N=l.getAttribute("h");E=null==E?80:parseInt(E,10);N=null==N?80:parseInt(N,10);d(D,p,b,E,N)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,H){switch(H){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
-!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
-this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
-(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
-ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
-xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
-(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
-!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
-Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
-!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
-if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
-0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
-this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
-this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
-U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
-ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
-Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
-W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
-W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
-this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
-(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
-null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
-J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
-W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
-this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
-ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
-this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
-!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
-Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
-(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
-xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
-J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
-J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
-J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
-1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
-!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
-W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
-ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
-Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
-null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
-J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
-W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
-J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
-this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
-J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
-"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
-this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
-null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
-!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
-J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
-U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
-J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
-function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
-this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
-U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
-W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
-for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
-mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(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]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=
-xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
-this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
-function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
-U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
-ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
-U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
-1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
-z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
-new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
-db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
-U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
-2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(x)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
+function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var H in this.graph.currentEdgeStyle)x.style[H]=this.graph.currentEdgeStyle[H];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),H=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=H.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",H="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<H.length;P++)null!=this.currentEdgeStyle[H[P]]&&(x+=H[P]+"="+this.currentEdgeStyle[H[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,H){H=null!=H?H:{};for(var P=0;P<x.length;P++){var X=x[P];H[mxObjectIdentity.get(X)]=X.getId();for(var Z=this.model.getChildCount(X),
+fa=0;fa<Z;fa++)this.createCellLookup([this.model.getChildAt(X,fa)],H)}return H};Graph.prototype.createCellMapping=function(x,H,P){P=null!=P?P:{};for(var X in x){var Z=H[X];null==P[Z]&&(P[Z]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,H,P,X){H=null!=H?H:0;P=null!=P?P:0;var Z=new mxCodec(x.ownerDocument),fa=new mxGraphModel;Z.decode(x,fa);x=[];Z={};var la={},za=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),Z));if(null!=za){var ua=this.createCellLookup([fa.root]);
+za=za.slice();this.model.beginUpdate();try{if(1!=za.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<za.length;fa++)oa=this.model.getChildren(this.moveCells([za[fa]],H,P,!1,this.model.getRoot())[0]),null!=oa&&(x=x.concat(oa));else{var oa=fa.getChildren(za[0]);null!=oa&&(x=this.moveCells(oa,H,P,!1,this.getDefaultParent()),la[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(Z,ua,la),this.updateCustomLinks(la,x),X)){this.isGridEnabled()&&
+(H=this.snap(H),P=this.snap(P));var ta=this.getBoundingBoxFromGeometry(x,!0);null!=ta&&this.moveCells(x,H-ta.x,P-ta.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var H={},P=this.cloneCells(x,null,H),X=new mxDictionary,Z=0;Z<x.length;Z++)X.put(x[Z],!0);var fa=new mxCodec,la=new mxGraphModel,za=la.getChildAt(la.getRoot(),0);for(Z=0;Z<P.length;Z++){la.add(za,P[Z]);var ua=this.view.getState(x[Z]);if(null!=ua){var oa=this.getCellGeometry(P[Z]);null!=oa&&oa.relative&&
+!this.model.isEdge(x[Z])&&null==X.get(this.model.getParent(x[Z]))&&(oa.offset=null,oa.relative=!1,oa.x=ua.x/ua.view.scale-ua.view.translate.x,oa.y=ua.y/ua.view.scale-ua.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(H,this.createCellLookup(x)),P);return fa.encode(la)};Graph.prototype.isSwimlane=function(x,H){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,H)[mxConstants.STYLE_SHAPE]);return P==mxConstants.SHAPE_SWIMLANE||
+"table"==P||"tableRow"==P};var N=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var H=this.model.getParent(x);if(null!=H){var P=this.getCurrentCellStyle(H);if(null!=P.expand)return"0"!=P.expand}return N.apply(this,arguments)&&(null==H||!this.isTable(H))};var R=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,H,P,X,Z,fa,la,za){null==za&&(za=this.model.getParent(x),this.isTable(za)||this.isTableRow(za))&&(za=this.getCellAt(fa,la,null,!0,!1));P=null;this.model.beginUpdate();
+try{P=R.apply(this,[x,H,P,X,Z,fa,la,za]);this.model.setValue(P,"");var ua=this.getChildCells(P,!0);for(H=0;H<ua.length;H++){var oa=this.getCellGeometry(ua[H]);null!=oa&&oa.relative&&0<oa.x&&this.model.remove(ua[H])}var ta=this.getChildCells(x,!0);for(H=0;H<ta.length;H++)oa=this.getCellGeometry(ta[H]),null!=oa&&oa.relative&&0>=oa.x&&this.model.remove(ta[H]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ea=this.model.getTerminal(P,!1);if(null!=Ea){var Fa=this.getCurrentCellStyle(Ea);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};var G=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(x,H,P){if(H||P)G.apply(this,arguments);else{var X=this.getSelectionCell(),Z=null,fa=[],la=mxUtils.bind(this,function(za){if(null!=this.view.getState(za)&&(this.model.isVertex(za)||this.model.isEdge(za)))if(fa.push(za),za==X)Z=fa.length-1;else if(x&&null==X&&0<fa.length||null!=Z&&x&&fa.length>Z||!x&&0<Z)return;for(var ua=0;ua<this.model.getChildCount(za);ua++)la(this.model.getChildAt(za,ua))});la(this.model.root);0<fa.length&&(Z=null!=Z?mxUtils.mod(Z+(x?1:-1),fa.length):0,this.setSelectionCell(fa[Z]))}};
+Graph.prototype.swapShapes=function(x,H,P,X,Z,fa,la){H=!1;if(!X&&null!=Z&&1==x.length&&(X=this.view.getState(Z),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(Z),fa=this.getCellGeometry(x[0]),null!=X&&null!=fa))){H=X.clone();X=fa.clone();X.x=H.x;X.y=H.y;H.x=fa.x;H.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(Z,H),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}H=
+!0}return H};var M=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,H,P,X,Z,fa,la){if(this.swapShapes(x,H,P,X,Z,fa,la))return x;la=null!=la?la:{};if(this.isTable(Z)){for(var za=[],ua=0;ua<x.length;ua++)this.isTable(x[ua])?za=za.concat(this.model.getChildCells(x[ua],!0).reverse()):za.push(x[ua]);x=za}this.model.beginUpdate();try{za=[];for(ua=0;ua<x.length;ua++)if(null!=Z&&this.isTableRow(x[ua])){var oa=this.model.getParent(x[ua]),ta=this.getCellGeometry(x[ua]);this.isTable(oa)&&za.push(oa);
+if(null!=oa&&null!=ta&&this.isTable(oa)&&this.isTable(Z)&&(X||oa!=Z)){if(!X){var Ea=this.getCellGeometry(oa);null!=Ea&&(Ea=Ea.clone(),Ea.height-=ta.height,this.model.setGeometry(oa,Ea))}Ea=this.getCellGeometry(Z);null!=Ea&&(Ea=Ea.clone(),Ea.height+=ta.height,this.model.setGeometry(Z,Ea));var Fa=this.model.getChildCells(Z,!0);if(0<Fa.length){x[ua]=X?this.cloneCell(x[ua]):x[ua];var Pa=this.model.getChildCells(x[ua],!0),Ra=this.model.getChildCells(Fa[0],!0),Ca=Ra.length-Pa.length;if(0<Ca)for(var Ja=
+0;Ja<Ca;Ja++){var Qa=this.cloneCell(Pa[Pa.length-1]);null!=Qa&&(Qa.value="",this.model.add(x[ua],Qa))}else if(0>Ca)for(Ja=0;Ja>Ca;Ja--)this.model.remove(Pa[Pa.length+Ja-1]);Pa=this.model.getChildCells(x[ua],!0);for(Ja=0;Ja<Ra.length;Ja++){var $a=this.getCellGeometry(Ra[Ja]),eb=this.getCellGeometry(Pa[Ja]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Pa[Ja],eb))}}}}var cb=M.apply(this,arguments);for(ua=0;ua<za.length;ua++)!X&&this.model.contains(za[ua])&&0==this.model.getChildCount(za[ua])&&
+this.model.remove(za[ua]);X&&this.updateCustomLinks(this.createCellMapping(la,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,H){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var Z=this.model.getParent(x[X]),fa=this.model.getParent(Z);1==this.model.getChildCount(Z)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa)&&P.push(fa):
+this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(fa=this.model.getParent(x[X]),0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa))){for(var la=this.model.getChildCells(fa,!0),za=0,ua=0;ua<la.length;ua++)0<=mxUtils.indexOf(x,la[ua])&&za++;za==la.length&&P.push(fa)}P.push(x[X])}P=Q.apply(this,[P,H])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,H,P){P=null!=P?P:new Graph;for(var X=0;X<H.length;X++)null!=H[X]&&P.updateCustomLinksForCell(x,H[X],P)};Graph.prototype.updateCustomLinksForCell=
+function(x,H){this.doUpdateCustomLinksForCell(x,H);for(var P=this.model.getChildCount(H),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(H,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,H){};Graph.prototype.getAllConnectionConstraints=function(x,H){if(null!=x){H=mxUtils.getValue(x.style,"points",null);if(null!=H){x=[];try{var P=JSON.parse(H);for(H=0;H<P.length;H++){var X=P[H];x.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?
+X[3]:0,4<X.length?X[4]:0))}}catch(fa){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;H=x.shape.bounds;var Z=x.shape.scale;P=H.width/Z;H=H.height/Z;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=H,H=X;H=x.shape.getConstraints(x.style,P,H);if(null!=H)return H;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=
+x){var H=this.getCurrentCellStyle(x);H=mxUtils.getValue(H,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,H,[x])}};Graph.prototype.isValidRoot=function(x){for(var H=this.model.getChildCount(x),P=0,X=0;X<H;X++){var Z=this.model.getChildAt(x,X);this.model.isVertex(Z)&&(Z=this.getCellGeometry(Z),null==Z||Z.relative||P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=
+function(x,H,P){for(var X=this.getCurrentCellStyle(x),Z=!0,fa=!0,la=0;la<H.length&&fa;la++)Z=Z&&this.isTable(H[la]),fa=fa&&this.isTableRow(H[la]);return(1==H.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||fa||Z))&&!this.isCellLocked(x)};
+Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var H=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(H&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(H=!1))}return H};Graph.prototype.getPreferredSizeForCell=function(x){var H=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=H&&(H.width+=10,H.height+=4,this.gridEnabled&&(H.width=this.snap(H.width),H.height=this.snap(H.height)));return H};Graph.prototype.turnShapes=function(x,H){var P=this.getModel(),X=[];P.beginUpdate();try{for(var Z=0;Z<x.length;Z++){var fa=x[Z];if(P.isEdge(fa)){var la=P.getTerminal(fa,!0),za=P.getTerminal(fa,!1);P.setTerminal(fa,za,!0);P.setTerminal(fa,la,!1);var ua=P.getGeometry(fa);if(null!=ua){ua=ua.clone();null!=ua.points&&ua.points.reverse();var oa=ua.getTerminalPoint(!0),ta=ua.getTerminalPoint(!1);
+ua.setTerminalPoint(oa,!1);ua.setTerminalPoint(ta,!0);P.setGeometry(fa,ua);var Ea=this.view.getState(fa),Fa=this.view.getState(la),Pa=this.view.getState(za);if(null!=Ea){var Ra=null!=Fa?this.getConnectionConstraint(Ea,Fa,!0):null,Ca=null!=Pa?this.getConnectionConstraint(Ea,Pa,!1):null;this.setConnectionConstraint(fa,la,!0,Ca);this.setConnectionConstraint(fa,za,!1,Ra);var Ja=mxUtils.getValue(Ea.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ea.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[fa])}X.push(fa)}}else if(P.isVertex(fa)&&(ua=this.getCellGeometry(fa),null!=ua)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){ua=ua.clone();ua.x+=ua.width/2-ua.height/2;ua.y+=ua.height/2-ua.width/2;var Qa=ua.width;ua.width=ua.height;ua.height=Qa;P.setGeometry(fa,ua)}var $a=this.view.getState(fa);if(null!=$a){var eb=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(H?-1:1),eb.length)],[fa])}X.push(fa)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;
+x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var H=x.cell;this.isTableCell(H)&&(H=this.model.getParent(H));this.isTableRow(H)&&(H=this.model.getParent(H));var P=this.view.getState(H);null!=P&&null!=P.shape&&(this.view.invalidate(H),P.shape.bounds=null)}e.apply(this,arguments);
+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var H=0;H<x.length;H++){var P=this.view.getState(x[H]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[H]):this.isReplacePlaceholders(x[H])&&this.view.invalidate(x[H],!1,!1)}};
+Graph.prototype.replaceElement=function(x,H){H=x.ownerDocument.createElement(null!=H?H:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)H.setAttribute(attr.nodeName,attr.nodeValue);H.innerHTML=x.innerHTML;x.parentNode.replaceChild(H,x)};Graph.prototype.processElements=function(x,H){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)H(x[P])}};Graph.prototype.updateLabelElements=function(x,H,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),
+Z=0;Z<x.length;Z++)if(this.isHtmlLabel(x[Z])){var fa=this.convertValueToString(x[Z]);if(null!=fa&&0<fa.length){X.innerHTML=fa;for(var la=X.getElementsByTagName(null!=P?P:"*"),za=0;za<la.length;za++)H(la[za]);X.innerHTML!=fa&&this.cellLabelChanged(x[Z],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,H,P){H=Graph.zapGremlins(H);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),
+Z=x;null!=Z;){if(Z==this.model.getRoot()||null!=Z.value&&"object"==typeof Z.value&&Z.hasAttribute(X)){this.setAttributeForCell(Z,X,H);break}Z=this.model.getParent(Z)}var fa=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,H):fa.setAttribute("label",H);H=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=
+x){for(var H=new mxDictionary,P=0;P<x.length;P++)H.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var Z=this.model.getParent(x[P]);null==Z||H.get(Z)||(H.put(Z,!0),X.push(Z))}for(P=0;P<X.length;P++)if(Z=this.view.getState(X[P]),null!=Z&&(this.model.isEdge(Z.cell)||this.model.isVertex(Z.cell))&&this.isCellDeletable(Z.cell)&&this.isTransparentState(Z)){for(var fa=!0,la=0;la<this.model.getChildCount(Z.cell)&&fa;la++)H.get(this.model.getChildAt(Z.cell,la))||(fa=!1);fa&&x.push(Z.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var H=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&H.push(x[P]);x=H;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,H){this.setAttributeForCell(x,"link",H)};Graph.prototype.setTooltipForCell=function(x,H){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,H)};Graph.prototype.getAttributeForCell=function(x,H,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(H):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,H,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",x.value||"");null!=P?X.setAttribute(H,P):X.removeAttribute(H);
+this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,H,P,X){this.getModel();if(mxEvent.isAltDown(H))return null;for(var Z=0;Z<x.length;Z++){var fa=this.model.getParent(x[Z]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(x,fa))return null}fa=f.apply(this,arguments);var la=!0;for(Z=0;Z<x.length&&la;Z++)la=la&&this.isTableRow(x[Z]);la&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||
+(fa=null));return fa};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,H){this.isEnabled()&&(H=this.insertTextForEvent(x,H),mxGraph.prototype.dblClick.call(this,x,H))};Graph.prototype.insertTextForEvent=function(x,H){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(H)){var X=this.model.isEdge(H)?this.view.getState(H):
+null,Z=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=Z||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&Z==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),H=this.addText(P.x,P.y,X))}return H};
+Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),H=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),Z=this.getPageSize();H=Math.max(H,X.x*Z.width);P=Math.max(P,X.y*Z.height)}return new mxPoint(this.snap(H+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,H=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,
+H.x/x.scale-x.translate.x+(0==H.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(H.y+H.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,H,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+X.geometry.relative=!0;X.connectable=!1;var Z=this.view.getRelativePoint(P,x,H);X.geometry.x=Math.round(1E4*Z.x)/1E4;X.geometry.y=Math.round(Z.y);X.geometry.offset=new mxPoint(0,0);Z=this.view.getPoint(P,X.geometry);var fa=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-Z.x)/fa),Math.round((H-Z.y)/fa))}else Z=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-
+Z.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(H/this.view.scale)-Z.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,H,P){var X=mxUtils.bind(this,function(){var ua=this.container.getElementsByTagName("a");if(null!=ua)for(var oa=0;oa<ua.length;oa++){var ta=
+this.getAbsoluteUrl(ua[oa].getAttribute("href"));null!=ta&&(ua[oa].setAttribute("rel",this.linkRelation),ua[oa].setAttribute("href",ta),null!=H&&mxEvent.addGestureListeners(ua[oa],null,null,H))}});this.model.addListener(mxEvent.CHANGE,X);X();var Z=this.container.style.cursor,fa=this.getTolerance(),la=this,za={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(la,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ua){var oa=
+ua.sourceState;if(null==oa||null==la.getLinkForCell(oa.cell))ua=la.getCellAt(ua.getGraphX(),ua.getGraphY(),null,null,null,function(ta,Ea,Fa){return null==la.getLinkForCell(ta.cell)}),oa=null==oa||la.model.isAncestor(ua,oa.cell)?la.view.getState(ua):null;oa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=oa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ua,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=la.container.scrollLeft;
+this.scrollTop=la.container.scrollTop;null==this.currentLink&&"auto"==la.container.style.overflow&&(la.container.style.cursor="move");this.updateCurrentState(oa)},mouseMove:function(ua,oa){if(la.isMouseDown)null!=this.currentLink&&(ua=Math.abs(this.startX-oa.getGraphX()),oa=Math.abs(this.startY-oa.getGraphY()),(ua>fa||oa>fa)&&this.clear());else{for(ua=oa.getSource();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null!=ua?this.clear():(null!=la.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&la.tooltipHandler.reset(oa,!0,this.currentState),(null==this.currentState||oa.getState()!=this.currentState&&null!=oa.sourceState||!la.intersects(this.currentState,oa.getGraphX(),oa.getGraphY()))&&this.updateCurrentState(oa))}},mouseUp:function(ua,oa){var ta=oa.getSource();for(ua=oa.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&(null==oa.sourceState||
+!oa.isSource(oa.sourceState.control))&&((mxEvent.isLeftMouseButton(ua)||mxEvent.isMiddleMouseButton(ua))&&!mxEvent.isPopupTrigger(ua)||mxEvent.isTouchEvent(ua))&&(null!=this.currentLink?(ta=la.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==H||H(ua,this.currentLink),mxEvent.isConsumed(ua)||(ua=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ua)?"_blank":ta?la.linkTarget:"_top",la.openLink(this.currentLink,ua),oa.consume())):null!=P&&!oa.isConsumed()&&
+Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&Math.abs(this.startX-oa.getGraphX())<fa&&Math.abs(this.startY-oa.getGraphY())<fa&&P(oa.getEvent()));this.clear()},activate:function(ua){this.currentLink=la.getAbsoluteUrl(la.getLinkForCell(ua.cell));null!=this.currentLink&&(this.currentTarget=la.getLinkTargetForCell(ua.cell),la.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ua))},clear:function(){null!=la.container&&
+(la.container.style.cursor=Z);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=la.tooltipHandler&&la.tooltipHandler.hide()}};la.click=function(ua){};la.addMouseListener(za);mxEvent.addListener(document,"mouseleave",function(ua){za.clear()})};Graph.prototype.duplicateCells=function(x,H){x=null!=x?x:this.getSelectionCells();H=null!=H?H:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);
+var X=this.getModel(),Z=this.gridSize,fa=[];X.beginUpdate();try{var la={},za=this.createCellLookup(x),ua=this.cloneCells(x,!1,la,!0);for(P=0;P<x.length;P++){var oa=X.getParent(x[P]);if(null!=oa){var ta=this.moveCells([ua[P]],Z,Z,!1)[0];fa.push(ta);if(H)X.add(oa,ua[P]);else{var Ea=oa.getIndex(x[P]);X.add(oa,ua[P],Ea+1)}if(this.isTable(oa)){var Fa=this.getCellGeometry(ua[P]),Pa=this.getCellGeometry(oa);null!=Fa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Fa.height,X.setGeometry(oa,Pa))}}else fa.push(ua[P])}this.updateCustomLinks(this.createCellMapping(la,
+za),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{X.endUpdate()}return fa};Graph.prototype.insertImage=function(x,H,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),Z=[],fa=0;fa<X.length;fa++)Z.push(X[fa]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==Z.length+1)for(fa=x.length-1;0<=fa;fa--)if(0==fa||x[fa]!=Z[fa-1]){x[fa].setAttribute("width",
+H);x[fa].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var H=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<H.length;X++)P.push(H[X]);document.execCommand("createlink",!1,mxUtils.trim(x));H=this.cellEditor.textarea.getElementsByTagName("a");if(H.length==P.length+1)for(X=H.length-1;0<=X;X--)if(H[X]!=P[X-1]){for(H=H[X].getElementsByTagName("a");0<H.length;){for(P=
+H[0].parentNode;null!=H[0].firstChild;)P.insertBefore(H[0].firstChild,H[0]);P.removeChild(H[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var H=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(H||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,H){null==
+H&&(H=this.getSelectionCells());if(null!=H&&1<H.length){for(var P=[],X=null,Z=null,fa=0;fa<H.length;fa++)if(this.getModel().isVertex(H[fa])){var la=this.view.getState(H[fa]);if(null!=la){var za=x?la.getCenterX():la.getCenterY();X=null!=X?Math.max(X,za):za;Z=null!=Z?Math.min(Z,za):za;P.push(la)}}if(2<P.length){P.sort(function(Ea,Fa){return x?Ea.x-Fa.x:Ea.y-Fa.y});la=this.view.translate;za=this.view.scale;Z=Z/za-(x?la.x:la.y);X=X/za-(x?la.x:la.y);this.getModel().beginUpdate();try{var ua=(X-Z)/(P.length-
+1);X=Z;for(fa=1;fa<P.length-1;fa++){var oa=this.view.getState(this.model.getParent(P[fa].cell)),ta=this.getCellGeometry(P[fa].cell);X+=ua;null!=ta&&null!=oa&&(ta=ta.clone(),x?ta.x=Math.round(X-ta.width/2)-oa.origin.x:ta.y=Math.round(X-ta.height/2)-oa.origin.y,this.getModel().setGeometry(P[fa].cell,ta))}}finally{this.getModel().endUpdate()}}}return H};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=
+function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(H,P){return this.getLinkForCell(H.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var H=null;null!=x&&0<x.length&&(x=JSON.parse(x),H=new mxImage(x.src,x.width,x.height));return H};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,H,P,X,Z,fa,la,za,ua,oa,ta,Ea,Fa,Pa){var Ra=null;if(null!=Pa)for(Ra=new mxDictionary,ta=0;ta<Pa.length;ta++)Ra.put(Pa[ta],
+!0);if(Pa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{H=null!=H?H:1;P=null!=P?P:0;Z=null!=Z?Z:!0;fa=null!=fa?fa:!0;la=null!=la?la:!0;oa=null!=oa?oa:!1;var Ca="page"==Fa?this.view.getBackgroundPageBounds():fa&&null==Ra||X||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));X=H/Ja;Fa=Z?-.5:0;var Qa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ca.width*X)+2*P)+(oa&&0==P?5:0),Math.max(1,Math.ceil(Ca.height*X)+2*P)+(oa&&0==P?5:0),x),$a=Qa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Qa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=
+Z?-.5:0;cb.textOffset=Z?-.5:0;cb.imageOffset=Z?-.5:0;cb.translate(Math.floor(P/H-Ca.x/Ja),Math.floor(P/H-Ca.y/Ja));var db=document.createElement("div"),rb=cb.getAlternateText;cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ja/H;var vb=this.view.translate;Fa=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Ca,Fa)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=
+la;za=null!=za?za:this.createSvgImageExport();var Bb=za.drawCellState,Ya=za.getLinkForCellState;za.getLinkForCellState=function(Za,fb){var hb=Ya.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?null:hb};za.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};za.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Ra?Ra.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(fa&&null==Ra||qb)&&null!=kb;)qb=null!=
+Ra?Ra.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(fa&&null==Ra||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};za.drawState(this.getView().getState(this.model.root),cb);this.updateSvgLinks(Qa,ua,!0);this.addForeignObjectWarning(cb,Qa);return Qa}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,H){if("0"!=urlParams["svg-warning"]&&0<H.getElementsByTagName("foreignObject").length){var P=
+x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var Z=x.createElement("a");Z.setAttribute("transform","translate(0,-5)");null==Z.setAttributeNS||H.ownerDocument!=document&&null==document.documentMode?(Z.setAttribute("xlink:href",Graph.foreignObjectWarningLink),Z.setAttribute("target","_blank")):(Z.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),Z.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);P.appendChild(X);Z.appendChild(x);P.appendChild(Z);H.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,H,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var Z=x[X].getAttribute("href");null==Z&&(Z=x[X].getAttribute("xlink:href"));
+null!=Z&&(null!=H&&/^https?:\/\//.test(Z)?x[X].setAttribute("target",H):P&&this.isCustomLink(Z)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var H=window.getSelection();H.getRangeAt&&H.rangeCount&&(x=H.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,H,P){for(;null!=x&&x.nodeName!=
+H;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,H,P){for(;null!=x&&!(0<=mxUtils.indexOf(H,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var H=null;if(window.getSelection){if(H=window.getSelection(),H.getRangeAt&&H.rangeCount){var P=document.createRange();P.selectNode(x);H.removeAllRanges();H.addRange(P)}}else(H=document.selection)&&"Control"!=H.type&&(x=H.createRange(),x.collapse(!0),P=H.createRange(),
+P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,H,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var Z=0;Z<X.points.length;Z++)H?X.points[Z].x=P+(P-X.points[Z].x):X.points[Z].y=P+(P-X.points[Z].y);Z=function(fa){null!=fa&&(H?fa.x=P+(P-fa.x):fa.y=P+(P-fa.y))};Z(X.getTerminalPoint(!0));Z(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,H,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),
+Z=0;Z<X;Z++){var fa=this.model.getChildAt(x,Z);if(this.model.isEdge(fa))this.flipEdgePoints(fa,H,P);else{var la=this.getCellGeometry(fa);null!=la&&(la=la.clone(),H?la.x=P+(P-la.x-la.width):la.y=P+(P-la.y-la.height),this.model.setGeometry(fa,la))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,H){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var Z=this.view.getState(x[X]);null!=Z&&this.flipEdgePoints(x[X],
+H,(H?Z.getCenterX():Z.getCenterY())/this.view.scale-(H?Z.origin.x:Z.origin.y)-(H?this.view.translate.x:this.view.translate.y))}else{var fa=this.getCellGeometry(x[X]);null!=fa&&this.flipChildren(x[X],H,H?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);P.push(x[X])}this.toggleCellStyles(H?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,H){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var Z=
+this.model.getParent(x[X]);if(this.isTable(Z)){var fa=this.getCellGeometry(x[X]),la=this.getCellGeometry(Z);null!=fa&&null!=la&&(la=la.clone(),la.height-=fa.height,this.model.setGeometry(Z,la))}}var za=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,H)}finally{this.model.endUpdate()}if(null!=za)for(P=[],X=0;X<za.length;X++)this.model.contains(za[X])&&(this.model.isVertex(za[X])||this.model.isEdge(za[X]))&&P.push(za[X])}return P};Graph.prototype.insertTableColumn=function(x,
+H){var P=this.getModel();P.beginUpdate();try{var X=x,Z=0;if(this.isTableCell(x)){var fa=P.getParent(x);X=P.getParent(fa);Z=mxUtils.indexOf(P.getChildCells(fa,!0),x)}else this.isTableRow(x)?X=P.getParent(x):x=P.getChildCells(X,!0)[0],H||(Z=P.getChildCells(x,!0).length-1);var la=P.getChildCells(X,!0),za=Graph.minTableColumnWidth;for(x=0;x<la.length;x++){var ua=P.getChildCells(la[x],!0)[Z],oa=P.cloneCell(ua,!1),ta=this.getCellGeometry(oa);oa.value=null;oa.style=mxUtils.setStyle(mxUtils.setStyle(oa.style,
+"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);za=ta.width;var Ea=this.getCellGeometry(la[x]);null!=Ea&&(ta.height=Ea.height)}P.add(la[x],oa,Z+(H?0:1))}var Fa=this.getCellGeometry(X);null!=Fa&&(Fa=Fa.clone(),Fa.width+=za,P.setGeometry(X,Fa))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var H=this.getModel();H.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?
+x:H.getParent(x);var X=H.getChildCells(P,!0);0==X.length?H.remove(P):(P==x&&(x=X[X.length-1]),H.remove(x))}finally{H.endUpdate()}};Graph.prototype.insertLane=function(x,H){var P=this.getModel();P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var Z=P.getChildCells(X,!0);x=Z[H?0:Z.length-1]}else X=P.getParent(x);var fa=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,fa+(H?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,H){var P=
+this.getModel();P.beginUpdate();try{var X=x,Z=x;if(this.isTableCell(x))Z=P.getParent(x),X=P.getParent(Z);else if(this.isTableRow(x))X=P.getParent(x);else{var fa=P.getChildCells(X,!0);Z=fa[H?0:fa.length-1]}var la=P.getChildCells(Z,!0),za=X.getIndex(Z);Z=P.cloneCell(Z,!1);Z.value=null;var ua=this.getCellGeometry(Z);if(null!=ua){for(fa=0;fa<la.length;fa++){x=P.cloneCell(la[fa],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var oa=this.getCellGeometry(x);
+null!=oa&&(null!=oa.alternateBounds&&(oa.width=oa.alternateBounds.width,oa.height=oa.alternateBounds.height,oa.alternateBounds=null),oa.height=ua.height);Z.insert(x)}P.add(X,Z,za+(H?0:1));var ta=this.getCellGeometry(X);null!=ta&&(ta=ta.clone(),ta.height+=ua.height,P.setGeometry(X,ta))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var H=this.getModel();H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=H.getParent(x));this.isTableRow(X)&&(P=H.getParent(X));var Z=H.getChildCells(P,
+!0);if(0==Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[0]);var fa=H.getChildCells(X,!0);if(1>=fa.length)H.remove(P);else{var la=fa.length-1;this.isTableCell(x)&&(la=mxUtils.indexOf(fa,x));for(X=x=0;X<Z.length;X++){var za=H.getChildCells(Z[X],!0)[la];H.remove(za);var ua=this.getCellGeometry(za);null!=ua&&(x=Math.max(x,ua.width))}var oa=this.getCellGeometry(P);null!=oa&&(oa=oa.clone(),oa.width-=x,H.setGeometry(P,oa))}}}finally{H.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var H=this.getModel();
+H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=H.getParent(x));this.isTableRow(x)&&(P=H.getParent(X));var Z=H.getChildCells(P,!0);if(1>=Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[Z.length-1]);H.remove(X);x=0;var fa=this.getCellGeometry(X);null!=fa&&(x=fa.height);var la=this.getCellGeometry(P);null!=la&&(la=la.clone(),la.height-=x,H.setGeometry(P,la))}}finally{H.endUpdate()}};Graph.prototype.insertRow=function(x,H){for(var P=x.tBodies[0],X=P.rows[0].cells,Z=x=0;Z<X.length;Z++){var fa=
+X[Z].getAttribute("colspan");x+=null!=fa?parseInt(fa):1}H=P.insertRow(H);for(Z=0;Z<x;Z++)mxUtils.br(H.insertCell(-1));return H.cells[0]};Graph.prototype.deleteRow=function(x,H){x.tBodies[0].deleteRow(H)};Graph.prototype.insertColumn=function(x,H){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var Z=document.createElement("th");P.rows[X].appendChild(Z);mxUtils.br(Z)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(H),mxUtils.br(X);return x.rows[0].cells[0<=H?H:x.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(x,H){if(0<=H){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>H&&x[P].deleteCell(H)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var H=window.getSelection();if(H.getRangeAt&&H.rangeCount){H=H.getRangeAt(0);H.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);H.insertNode(x)}}else(H=document.selection)&&"Control"!=
+H.type&&H.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,H){function P(Z,fa){Z.length>fa&&(Z=Z.substring(0,Math.round(fa/2))+"..."+Z.substring(Z.length-Math.round(fa/4)));return Z}x=null!=x?x:"javascript:void(0);";if(null==H||0==H.length)H=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));
+null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(H,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(Z){this.customLinkClicked(x);mxEvent.consume(Z)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,la){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=
+function(fa){fa=x.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var la=this.getCellAt(fa.graphX,fa.graphY);null!=la&&this.isSwimlane(la)&&this.hitsSwimlaneContent(la,fa.graphX,fa.graphY)||(fa.state=this.view.getState(la),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var H=!1,P=!1,X=!1,Z=this.fireMouseEvent;this.fireMouseEvent=
+function(fa,la,za){fa==mxEvent.MOUSE_DOWN&&(la=this.updateMouseEvent(la),H=this.isCellSelected(la.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());Z.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,la){var za=mxEvent.isMouseEvent(la.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==la.getState()||!la.isSource(la.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!za&&(P&&null==la.getCell()&&
+this.isSelectionEmpty()||H&&this.isCellSelected(la.getCell())));za=!H||za?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var oa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(la.getX()+oa.x+1,la.getY()+oa.y+1,ua,la.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,la,za])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==
+x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x="";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var H=this.textarea.ownerDocument.defaultView.getSelection(),P=H.getRangeAt(0),
+X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);H.removeAllRanges();H.addRange(P)};mxCellEditor.prototype.alignText=function(x,H){var P=null!=H&&mxEvent.isShiftDown(H);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(Z){P||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),
+Z.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var H=[],P=0,X=x.rangeCount;P<X;++P)H.push(x.getRangeAt(P));return H}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=
+window.getSelection();sel.removeAllRanges();for(var H=0,P=x.length;H<P;++H)sel.addRange(x[H])}else document.selection&&x.select&&x.select()}catch(X){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));k.apply(this,arguments)};var z=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,H){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?
+z.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var t=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,H){x=this.graph.getStartEditingCell(x,H);t.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function H(Z,fa){fa.originalNode=Z;Z=Z.firstChild;
+for(var la=fa.firstChild;null!=Z&&null!=la;)H(Z,la),Z=Z.nextSibling,la=la.nextSibling;return fa}function P(Z,fa){if(null!=Z)if(fa.originalNode!=Z)X(Z);else for(Z=Z.firstChild,fa=fa.firstChild;null!=Z;){var la=Z.nextSibling;null==fa?X(Z):(P(Z,fa),fa=fa.nextSibling);Z=la}}function X(Z){for(var fa=Z.firstChild;null!=fa;){var la=fa.nextSibling;X(fa);fa=la}1==Z.nodeType&&("BR"===Z.nodeName||null!=Z.firstChild)||3==Z.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(Z)).length?(3==Z.nodeType&&mxUtils.setTextContent(Z,
+mxUtils.getTextContent(Z).replace(/\n|\r/g,"")),1==Z.nodeType&&(Z.removeAttribute("style"),Z.removeAttribute("class"),Z.removeAttribute("width"),Z.removeAttribute("cellpadding"),Z.removeAttribute("cellspacing"),Z.removeAttribute("border"))):Z.parentNode.removeChild(Z)}B.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(Z){var fa=H(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]>")?P(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var H=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){za=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<za.length&&"\n"==za.charAt(za.length-1)&&(za=za.substring(0,za.length-1));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"<br/>"):za,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);H=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),Z=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,la=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&la.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&la.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration=la.join(" ");this.textarea.style.fontWeight=Z?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=H;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=za&&(this.textarea.innerHTML=za,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var za=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(za=mxUtils.replaceTrailingNewlines(za,"<div><br></div>"));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):za,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ua=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=za&&(this.textarea.innerHTML=
+za);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,H){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=
+60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,H){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,H);"1"==mxUtils.getValue(x.style,"nl2Br",
+"1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var H=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return H="1"==mxUtils.getValue(x.style,"nl2Br","1")?H.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):H.replace(/\r\n/g,"").replace(/\n/g,"")};var O=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();O.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,H){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==H&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&
+this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,
+null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getBorderColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getMinimumSize=
+function(x){var H=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*H+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,H){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(H.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var H=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-H.x);H=this.roundLength((this.bounds.y+this.currentDy)/P-H.y);P=this.graph.view.unit;this.hint.innerHTML=d(x,P)+", "+d(H,P);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,H){y.apply(this,arguments);var P=this.graph.getCellStyle(x);if(null==P.childLayout){var X=this.graph.model.getParent(x),Z=null!=X?this.graph.getCellGeometry(X):null;if(null!=Z&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var fa=parseFloat(mxUtils.getValue(P,
+"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var la=this.graph.getActualStartSize(X);Z=Z.clone();P?Z.height=H.height+la.y+la.height+2*fa:Z.width=H.width+la.x+la.width+2*fa;this.graph.model.setGeometry(X,Z)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(za){P.get(za)||(P.put(za,!0),Z.push(za))}for(var H=ia.apply(this,arguments),P=new mxDictionary,
+X=this.graph.model,Z=[],fa=0;fa<H.length;fa++){var la=H[fa];this.graph.isTableCell(la)?x(X.getParent(X.getParent(la))):this.graph.isTableRow(la)&&x(X.getParent(la));x(la)}return Z};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var H=da.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var H=
+ja.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,H){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(H.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(x,H){return mxEvent.isControlDown(H.getEvent())||mxEvent.isMetaDown(H.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
+this.bounds};var qa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return qa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||sa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,T=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=T.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var H=function(Ra,Ca,Ja){for(var Qa=[],$a=0;$a<Ra.length;$a++){var eb=Ra[$a];Qa.push(null==eb?null:new mxPoint((ua+eb.x+Ca)*fa,(oa+eb.y+Ja)*fa))}return Qa},P=this,X=this.graph,Z=X.model,fa=X.view.scale,la=this.state,za=this.selectionBorder,ua=this.state.origin.x+X.view.translate.x,oa=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var ta=X.view.getCellStates(Z.getChildCells(this.state.cell,!0));if(0<ta.length){var Ea=Z.getChildCells(ta[0].cell,!0),Fa=
+X.getTableLines(this.state.cell,!1,!0),Pa=X.getTableLines(this.state.cell,!0,!1);for(Z=0;Z<ta.length;Z++)mxUtils.bind(this,function(Ra){var Ca=ta[Ra],Ja=Ra<ta.length-1?ta[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja.cell):null;var Qa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Pa[Ra]?new V(Pa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,Ja);Ca.tableHandle=!0;var $a=
+0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Pa[Ra],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(la.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*fa;this.shape.bounds.x=la.x+(Ra==ta.length-1?0:cb.x*fa);this.shape.bounds.width=la.width-(Ra==ta.length-
+1?0:cb.width+cb.x+fa)}this.shape.redraw()}};var eb=!1;Ca.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Qa&&eb&&($a=Math.min($a,Qa.height-Graph.minTableRowHeight))};Ca.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Ca.reset=function(){$a=0};
+x.push(Ca)})(Z);for(Z=0;Z<Ea.length;Z++)mxUtils.bind(this,function(Ra){var Ca=X.view.getState(Ea[Ra]),Ja=X.getCellGeometry(Ea[Ra]),Qa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Ca&&(Ca=new mxCellState(X.view,Ea[Ra],X.getCellStyle(Ea[Ra])),Ca.x=la.x+Ja.x*fa,Ca.y=la.y+Ja.y*fa,Ca.width=Qa.width*fa,Ca.height=Qa.height*fa,Ca.updateCachedBounds());Ja=Ra<Ea.length-1?Ea[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja):null;var $a=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Fa[Ra]?
+new V(Fa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,Ja);Ca.tableHandle=!0;var eb=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Fa[Ra],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(la.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Qa.width+eb)*fa;this.shape.bounds.y=la.y+(Ra==Ea.length-1?0:db.y*fa);this.shape.bounds.height=la.height-(Ra==Ea.length-1?0:(db.height+db.y)*fa)}this.shape.redraw()}};var cb=!1;Ca.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Qa.width,rb.x-db.x-Qa.width);cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Ca.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,
+eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Ca.positionChanged=function(){};Ca.reset=function(){eb=0};x.push(Ca)})(Z)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].style.visibility=x?"":"hidden";
+if(null!=this.cornerHandles)for(H=0;H<this.cornerHandles.length;H++)this.cornerHandles[H].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].parentNode.removeChild(this.moveHandles[H]);this.moveHandles=null}this.moveHandles=[];for(H=0;H<x.getChildCount(this.state.cell);H++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);
+X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(P.cell)||this.graph.selectCellForEvent(P.cell,Z);mxEvent.isPopupTrigger(Z)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z),this.graph.isMouseDown=!0);mxEvent.consume(Z)}),null,mxUtils.bind(this,function(Z){mxEvent.isPopupTrigger(Z)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(Z),mxEvent.getClientY(Z),P.cell,Z),mxEvent.consume(Z))}));this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,H)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=
+0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var W=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),H=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var Z=this.customHandles[X].shape.bounds,fa=Z.getCenterX(),la=Z.getCenterY();if(Math.abs(this.state.x-fa)<Z.width/2||Math.abs(this.state.y-la)<Z.height/2||Math.abs(this.state.x+this.state.width-fa)<Z.width/2||Math.abs(this.state.y+this.state.height-la)<Z.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(H/=
+2,this.graph.isTable(this.state.cell)&&(H+=7),x.x=this.sizers[0].bounds.width+H,x.y=this.sizers[0].bounds.height+H):x=W.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var H=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/
+x),H)+" x "+d(this.roundLength(this.bounds.height/x),H)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,H){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,H){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(x,H){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,Z=this.roundLength(H.x/X-P.x);P=this.roundLength(H.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=d(Z,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Z=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*Z.x)+"%, "+Math.round(100*Z.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),H.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2652,464 +2651,464 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
-!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,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=z-this.width),this.y<this.first.y&&(this.y=O-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",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var H=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(H)||mxEvent.isPopupTrigger(H)&&(null==x.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(x,H){F.apply(this,arguments);mxEvent.isTouchEvent(H.getEvent())&&this.graph.isCellSelected(H.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var H=x.getEvent();return mxEvent.isLeftMouseButton(H)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(H)&&!mxEvent.isShiftDown(H))||this.usePopupTrigger&&mxEvent.isPopupTrigger(H)};mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,H){if(this.cancelled)this.cancelled=!1,H.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,Z=null,fa=x=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,Z=this.first.y,x=(this.currentX-X)/this.graph.view.scale,fa=(this.currentY-Z)/this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(x=this.graph.snap(x),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(P){if(this.isSpaceEvent(H)){this.graph.model.beginUpdate();try{var la=this.graph.getCellsBeyond(X,Z,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<la.length;P++)if(this.graph.isCellMovable(la[P])){var za=this.graph.view.getState(la[P]),ua=this.graph.getCellGeometry(la[P]);null!=za&&null!=ua&&(ua=ua.clone(),ua.translate(x,fa),this.graph.model.setGeometry(la[P],ua))}}finally{this.graph.model.endUpdate()}}else la=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(la,H.getEvent());H.consume()}}};mxRubberband.prototype.mouseMove=function(x,H){if(!H.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=H.getX()+P.x;P=H.getY()+P.y;var X=this.first.x-x,Z=this.first.y-P,fa=this.graph.tolerance;if(null!=this.div||Math.abs(X)>fa||Math.abs(Z)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(H)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=x-this.width),this.y<this.first.y&&(this.y=P-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)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.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 Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=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(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=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(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
-O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
-J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
-null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
-function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
-function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
-u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
-t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
-K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
-function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.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)};
-la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
-n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};la.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),H.consume()}};var S=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);S.apply(this,arguments)};var ba=(new Date).getTime(),U=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,H,P,X){ca.apply(this,arguments);P!=this.currentTerminalState?(ba=(new Date).getTime(),
+U=0):U=(new Date).getTime()-ba;this.currentTerminalState=P};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(x,H,P){H=null!=x&&0==x;var X=this.state.getVisibleTerminalState(H);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,H):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(H),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
+new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,H,P){this.handleImage=H==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:H==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return na.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var H=this.graph.getModel(),P=H.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(H.isEdge(P)&&null!=X&&X.relative&&(H=this.graph.view.getState(x[0]),null!=H&&2>H.width&&2>H.height&&null!=H.text&&null!=H.text.boundingBox))return mxRectangle.fromRectangle(H.text.boundingBox)}return ra.apply(this,arguments)};var ya=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var x=ya.apply(this,arguments),H=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&H.push(x[P]);return H};var va=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var H=this.graph.getModel(),P=H.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return H.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(H=x.text.unrotatedBoundingBox||
+x.text.boundingBox,new mxRectangle(Math.round(H.x),Math.round(H.y),Math.round(H.width),Math.round(H.height))):va.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,H){var P=this.graph.getModel(),X=P.getParent(this.state.cell),Z=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(H)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==Z||!Z.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),H=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&H==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var pa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,H){pa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,H){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var xa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){xa.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var H=0;4>H;H++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=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(Z,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(Z,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+H=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(H,P);if(null!=H||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,H){try{if(null==x&&(null==H||0==H.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=H&&0<H.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
+P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=H)for(P=0;P<H.length;P++){var Z=document.createElement("div");Z.style.marginTop=null!=x||0<P?"6px":"0px";Z.appendChild(this.graph.createLinkForHint(H[P].getAttribute("href"),mxUtils.getTextContent(H[P])));this.linkHint.appendChild(Z)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ma=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ma.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=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(X,Z){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var H=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=H||null!=P&&0<P.length)this.updateLinkHint(H,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
+5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var H=this.cornerHandles,P=H[0].bounds.height/2;H[0].bounds.x=this.state.x-H[0].bounds.width/2+x;H[0].bounds.y=this.state.y-P+x;H[0].redraw();H[1].bounds.x=H[0].bounds.x+this.state.width-2*x;H[1].bounds.y=H[0].bounds.y;H[1].redraw();H[2].bounds.x=H[0].bounds.x;H[2].bounds.y=this.state.y+this.state.height-2*x;H[2].redraw();H[3].bounds.x=
+H[1].bounds.x;H[3].bounds.y=H[2].bounds.y;H[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+H=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(H,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,H=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=H&&(P=Math.max(P,H.y+H.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var La=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){La.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
+null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ba=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ba.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Xa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Xa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,v){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function N(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function M(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function e(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function k(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function t(){mxActor.call(this)}function B(){mxActor.call(this)}function I(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function y(){mxActor.call(this)}function ia(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,da.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,da.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,da.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,da.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,da.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,da.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function qa(){mxActor.call(this)}function sa(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function T(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function W(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
+function S(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function na(){mxShape.call(this)}function ra(){mxShape.call(this)}function ya(){mxCylinder.call(this)}function va(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function pa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function xa(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxArrowConnector.call(this);
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function La(){mxActor.call(this)}function Ba(){mxActor.call(this)}function ab(){mxActor.call(this)}function Xa(){mxActor.call(this)}function x(){mxActor.call(this)}function H(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}
+function oa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Ra(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Ja(){mxActor.call(this)}function Qa(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
+function eb(c,m,v,n,u,A,C,ha,K,wa){C+=K;var ma=n.clone();n.x-=u*(2*C+K);n.y-=A*(2*C+K);u*=C+K;A*=C+K;return function(){c.ellipse(ma.x-u-C,ma.y-A-C,2*C,2*C);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var v=this.line[m];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,m,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,v,n){if(null!=m){var u=null;c.begin();for(var A=0;A<m.length;A++){var C=m[A];null!=C&&(null==u?c.moveTo(C.x+v,C.y+n):null!=u&&c.lineTo(C.x+v,C.y+n));u=C}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!m;n++){var u=this.line[n];null!=u&&null!=v&&(m=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,C=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-v));A||this.outline||!(C&&ha<u||!C&&ha<n)||this.paintForeground(c,m,v,n,u)};d.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.state){var A=this.flipH,C=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=C;C=ha}c.rotate(-this.getShapeRotation(),A,C,m+n/2,v+u/2);s=this.scale;m=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,m,v,n,u)}};d.prototype.paintTableForeground=function(c,m,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],m,v)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+d);mxUtils.extend(g,d);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};l.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/cb);c.translate((n-m)/2,(u-m)/2+m/4);c.moveTo(0,
+.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(n,u/(.5+cb));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(u-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
+m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,
+-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,u-m),c.curveTo(n,u+m/3,0,u+m/3,0,u-m),c.close())};N.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",N);mxUtils.extend(R,mxCylinder);R.prototype.size=30;R.prototype.darkOpacity=0;R.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",R);mxUtils.extend(G,R);mxCellRenderer.registerShape("note2",G);G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(M,mxShape);M.prototype.isoAngle=15;M.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(m,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",M);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
+15;e.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"lid",!0);c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),C?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+C&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(k,mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.arcSize=.1;
+k.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),C=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));m=Math.max(m,K);m=Math.min(n-K,m);C||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,v)):(c.moveTo(n-m,v),c.lineTo(n-m,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));C?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",k);k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);var A=mxUtils.getValue(this.style,"rounded",!1),C=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);C||(m*=Math.min(n,u));m=Math.min(m,.5*n,.5*u);A||(m=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,u-m);c.arcTo(m,m,0,0,1,n-m,u);c.lineTo(A+m,u);c.arcTo(m,m,0,0,1,A,u-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",z);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=
+function(c,m,v,n,u){m=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,v,n-2*m);m*=v;return new mxRectangle(c.x+m,c.y,v-2*m,n)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};I.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n-m,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",O);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(y,mxActor);y.prototype.size=.5;y.prototype.redrawPath=function(c,m,v,n,u){c.setFillColor(null);
+m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(m,0),new mxPoint(m,u/2),new mxPoint(0,u/2),new mxPoint(m,u/2),new mxPoint(m,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",y);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(c,m,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+m=n/5;c.rect(0,0,m,u);c.fillAndStroke();c.rect(2*m,0,m,u);c.fillAndStroke();c.rect(4*m,0,m,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ia);da.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};da.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)};
+da.prototype.quadTo=function(c,m,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};da.prototype.curveTo=function(c,m,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};da.prototype.arcTo=function(c,m,v,n,u,A,C){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=C};da.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(m-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var C=Math.round(A/10),ha=this.defaultVariation;5>C&&(C=5,ha/=3);var K=v(c-this.lastX)*n/C;v=v(m-this.lastY)*u/C;n/=A;u/=A;for(A=0;A<C;A++){var wa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=m};da.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var mb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){mb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var vb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){vb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new da(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var Bb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Bb.apply(this,arguments)};var Ya=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=da)Ya.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
-l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
-2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
-Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
-40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
-K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
-u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
-K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
-u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
-32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
-K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
-za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
-l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
-l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
-v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
-n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
-l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Oa,
-mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+A,u*A)),c.moveTo(m+A,v),c.lineTo(m+n-A,v),c.quadTo(m+n,v,m+n,v+A),c.lineTo(m+n,v+u-A),c.quadTo(m+n,v+u,m+n-A,v+u),c.lineTo(m+A,v+u),c.quadTo(m,v+u,m,v+u-A),c.lineTo(m,v+A),c.quadTo(m,v,m+A,v)):(c.moveTo(m,v),c.lineTo(m+n,v),c.lineTo(m+n,v+u),c.lineTo(m,v+u),c.lineTo(m,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ja,mxRectangleShape);ja.prototype.size=.1;ja.prototype.fixedSize=!1;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,v=c.height;c=new mxRectangle(c.x,c.y,m,v);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ja.prototype.paintForeground=function(c,m,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),C=parseFloat(mxUtils.getValue(this.style,"size",this.size));C=A?Math.max(0,Math.min(n,C)):n*Math.max(0,Math.min(1,C));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.max(C,Math.min(n*A,u*A)));C=Math.round(C);c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.moveTo(m+n-C,v);c.lineTo(m+n-C,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ja);mxCellRenderer.registerShape("process2",ja);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(c,m,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};aa.prototype.paintForeground=function(c,m,v,n,u){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(qa,mxHexagon);qa.prototype.size=30;qa.prototype.position=.5;qa.prototype.position2=.5;qa.prototype.base=20;qa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,m,v,n,u){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),C=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ha),u-v),new mxPoint(C,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",qa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,
+m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(0,u),new mxPoint(m,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+sa);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(n-m,0),new mxPoint(n,.5*u),new mxPoint(n-m,u),new mxPoint(m,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(m+n/2,v+A);c.lineTo(m+n/2,v+u-A);c.moveTo(m+A,v+u/2);c.lineTo(m+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,v,n,u){Za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),Za.apply(this,[c,m,v,n,u]))}};mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};T.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var C=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=C){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Wa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Wa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Wa+=bb,jb+=bb);bb=m;var Ga=v;bb=ha==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(n-wa-Wa):bb+Wa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ha=new C;ha.style=this.style;C.prototype.paintVertexShape.call(ha,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=C)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",T);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,m,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(W,mxShape);W.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",W);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,v+u);c.lineTo(m+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(S,mxShape);
+S.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};S.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};S.prototype.paintForeground=function(c,m,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=
+40;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};ba.prototype.paintBackground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"participant");null==C||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,m,v,n,A):(C=this.state.view.graph.cellRenderer.getShape(C),null!=C&&C!=ba&&(C=new C,C.apply(this.state),c.save(),C.paintVertexShape(c,m,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+n/2,v+A),c.lineTo(m+n/2,v+u),c.end(),c.stroke())};ba.prototype.paintForeground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,v,n,
+Math.min(u,A))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(U,mxShape);U.prototype.width=60;U.prototype.height=30;U.prototype.corner=10;U.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};U.prototype.paintBackground=function(c,m,v,n,u){var A=this.corner,C=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,v,n,u),c.setGradient(this.fill,this.gradient,m,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,v);c.lineTo(m+C,v);c.lineTo(m+C,v+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,C-A),v+ha);c.lineTo(m,v+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+n,v);c.lineTo(m+n,v+u);c.lineTo(m,v+u);c.lineTo(m,v+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(c,m,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,v,n){n=ba.prototype.size;null!=m&&(n=mxUtils.getValue(m.style,"size",n)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;v.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,v,n){n=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(n+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",qa.prototype.size))*m.view.scale))),m.style),m,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?O.prototype.fixedSize:O.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha+u),new mxPoint(C+
+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,v,n){var u="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=u?J.prototype.fixedSize:J.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+
+u,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+
+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?sa.prototype.fixedSize:sa.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,c),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,c),new mxPoint(C+K,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa),new mxPoint(ma,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(ma,ha+
+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?L.prototype.fixedSize:L.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u),new mxPoint(ma,ha)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,v);c.begin();c.moveTo(n/2,A+C);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-C,A/2);c.quadTo((n-A)/2-C,A+C,n/2,A+C);c.quadTo((n+A)/2+C,A+C,(n+A)/2+C,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=20;ya.prototype.jettyHeight=10;ya.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=C/2;C=v+C/2;var ha=Math.min(m,u-m),K=Math.min(ha+2*m,u-m);A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("module",ya);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=
+32;va.prototype.jettyHeight=12;va.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=C/2;C=v+C/2;var ha=.3*u-m/2,K=.7*u-m/2;A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("component",va);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,m,v,n,u){var A=n/2,C=u/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,v),new mxPoint(m+n,v+C),new mxPoint(m+A,v+u),new mxPoint(m,v+C)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(pa,mxDoubleEllipse);pa.prototype.outerStroke=!0;pa.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(m+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",pa);mxUtils.extend(Aa,pa);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(xa,mxArrowConnector);
+xa.prototype.defaultWidth=4;xa.prototype.isOpenEnded=function(){return!0};xa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};xa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",xa);mxUtils.extend(Ma,mxArrowConnector);Ma.prototype.defaultWidth=10;Ma.prototype.defaultArrowWidth=20;Ma.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ma.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ma.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ma);mxUtils.extend(Oa,mxActor);Oa.prototype.size=30;Oa.prototype.isRoundable=function(){return!0};Oa.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,m),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Oa);mxUtils.extend(Na,mxRectangleShape);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isHtmlAllowed=function(){return!1};Na.prototype.paintForeground=function(c,m,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*C,u*C))}C=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,v+A);c.lineTo(m+n,v+A);c.end();c.stroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Na);
+mxUtils.extend(La,mxActor);La.prototype.dx=20;La.prototype.dy=20;La.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(m,v),
+new mxPoint(m,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",La);mxUtils.extend(Ba,mxActor);Ba.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ba);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+m)/2,v),new mxPoint((n+m)/2,u),new mxPoint((n-m)/2,u),new mxPoint((n-m)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Xa,
+mxActor);Xa.prototype.arrowWidth=.3;Xa.prototype.arrowSize=.2;Xa.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-
+m,u),new mxPoint(n-m,A),new mxPoint(0,A)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Xa);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(m,0),new mxPoint(m,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(n-m,A),new mxPoint(m,A),new mxPoint(m,u)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(H,mxActor);H.prototype.size=.1;H.prototype.fixedSize=20;H.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,u/2,n,u);c.lineTo(m,u);c.quadTo(m-2*m,u/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",H);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
+m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,
+.8*m),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-m),new mxPoint(n/2,u),new mxPoint(0,u-m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/2,v+u);c.lineTo(m+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(m+n/2,v);c.lineTo(m+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*n,v+.145*u);c.lineTo(m+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(m+.855*n,v+.145*u);c.lineTo(m+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(c,m,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,m,v,n,u){c.begin();c.moveTo(m,v);c.lineTo(m+n,v);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,v+u);c.lineTo(m+n,v+u);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,v,n,u){var A=c.state.strokeWidth/2,C=10+2*A,ha=v+u-C/2;c.begin();c.moveTo(m,v);c.lineTo(m,v+u);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha-C/2);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha+C/2);c.moveTo(m+A,ha);c.lineTo(m+n-A,ha);c.moveTo(m+n,v);c.lineTo(m+n,v+u);c.moveTo(m+n-A,ha);c.lineTo(m+n-C-A,ha-C/2);c.moveTo(m+
+n-A,ha);c.lineTo(m+n-C-A,ha+C/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,m,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,C=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||C||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||C||this.outline||ha||wa||ma||K?(c.rect(m,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,v),this.outline||ha?c.lineTo(m+n,v):c.moveTo(m+n,v),this.outline||wa?c.lineTo(m+n,v+u):c.moveTo(m+n,v+u),this.outline||ma?c.lineTo(m,v+u):c.moveTo(m,v+u),(this.outline||K)&&c.lineTo(m,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+n/2,v),c.lineTo(m+n/2,v+u)):(c.moveTo(m,v+u/2),c.lineTo(m+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(c,
+m,v,n,u){m=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Ra);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,n);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(u-A)/2;v=m+A;var C=(n-A)/2;A=C+A;c.moveTo(0,m);c.lineTo(C,m);c.lineTo(C,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(n,m);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(C,u);c.lineTo(C,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/2);v=Math.min(n-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(Qa,
+mxActor);Qa.prototype.cst={RECT2:"mxgraph.basic.rect"};Qa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Qa.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,
+v);this.strictDrawShape(c,0,0,n,u)};Qa.prototype.strictDrawShape=function(c,m,v,n,u,A){var C=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
-A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
-l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
-wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
-c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
-K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
-l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
-La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
-Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
-l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
-K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
-K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
-v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
-l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
-l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
-u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
-l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
-B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
-A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
-A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
-Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
-function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
-c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
-u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
-c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
-c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
-A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
-c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
-wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
-u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
-v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
-n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
-K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+Jb=Math.max(0,Math.min(50,K));A=Qa.prototype;c.setDashed(Wa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ha||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ha||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||Ka||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,m,v,n,u,C,Sa,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),Ka&&A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),Ia&&
+A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),Ha&&A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Wa=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Wa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ha,Wa),c.begin(),Ga?A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
+m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),Ka&&Ga&&A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,m,v,n,u,C,Sa,Ta,Ua,Va,K,Ga,Ka,Ia,Ha),c.stroke()));Ga||Ka||Ia||!Ha?Ga||Ka||!Ia||Ha?!Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==
+wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ka||Ia||Ha?!Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,
+K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,
+m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&
+Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga||Ka||Ia||Ha?
+Ga&&!Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,
+m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,
+K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,
+K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,
+v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,
+m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,
+m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,
+u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,
+m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ka&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,
+C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),
+A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),
+A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,v,n,u,C,Sa,Ta,
+Ua,Va,K,Ga,Ka,Ia,Ha);c.stroke()};Qa.prototype.moveNW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Qa.prototype.moveNE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ha,0)};Qa.prototype.moveSE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ha)};Qa.prototype.moveSW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ha,u)};Qa.prototype.paintNW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Qa.prototype.paintTop=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ha,0)};Qa.prototype.paintNE=
+function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n,ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n,ha);else c.lineTo(n,0)};Qa.prototype.paintRight=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ha)};Qa.prototype.paintLeft=function(c,m,v,n,u,A,C,ha,K){"square"==
+C||"default"==C&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Qa.prototype.paintSE=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n-ha,u)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-ha,u);else c.lineTo(n,u)};Qa.prototype.paintBottom=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ha,u)};Qa.prototype.paintSW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,u-ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(0,u-ha);else c.lineTo(0,u)};Qa.prototype.paintNWInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Qa.prototype.paintTopInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Qa.prototype.paintNEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-ha-.5*K,K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-ha-K,K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-ha-.5*K,K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,ha+K),c.lineTo(n-ha-K,K)};Qa.prototype.paintRightInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):c.lineTo(n-K,ha+K):c.lineTo(n-K,0):c.lineTo(n,0)};Qa.prototype.paintLeftInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):c.lineTo(K,u-ha-K):
+c.lineTo(K,u):c.lineTo(0,u)};Qa.prototype.paintSEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-K,u-ha-.5*K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-K,u-ha-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-K,u-ha-.5*K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,u-ha-K),c.lineTo(n-K,u-ha-K)};Qa.prototype.paintBottomInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==C||"default"==C&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-ha-.5*K,u-K):c.lineTo(n-ha-K,u-K):c.lineTo(n,u)};Qa.prototype.paintSWInner=function(c,m,v,n,u,A,C,ha,K,wa){if(!wa)c.lineTo(K,u);else if("square"==C||"default"==C&&"square"==A)c.lineTo(K,u-K);else if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,u-K);else if("invRound"==C||"default"==C&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,u-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(ha+.5*K,u-K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,u-ha-K),c.lineTo(K+ha,u-K)};Qa.prototype.moveSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(K,u-ha-K):
+c.moveTo(0,u-K)};Qa.prototype.lineSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,u-ha-K):c.lineTo(0,u-K)};Qa.prototype.moveSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,u-ha-K):c.moveTo(n-K,u)};Qa.prototype.lineSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,u-ha-K):
+c.lineTo(n-K,u)};Qa.prototype.moveNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,ha+K):c.moveTo(n,K)};Qa.prototype.lineNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,ha+K):c.lineTo(n,K)};Qa.prototype.moveNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==C||"default"==C&&"square"==A?c.moveTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==
+C&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Qa.prototype.lineNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Qa.prototype.paintFolds=function(c,m,v,n,u,A,C,ha,K,wa,ma,Wa,jb,bb,Ga){if("fold"==
+A||"fold"==C||"fold"==ha||"fold"==K||"fold"==wa)("fold"==C||"default"==C&&"fold"==A)&&Wa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==A)&&Wa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Qa.prototype.cst.RECT2,Qa);
+Qa.prototype.constraints=null;mxUtils.extend($a,mxConnector);$a.prototype.origPaintEdgeShape=$a.prototype.paintEdgeShape;$a.prototype.paintEdgeShape=function(c,m,v){for(var n=[],u=0;u<m.length;u++)n.push(mxUtils.clone(m[u]));u=c.state.dashed;var A=c.state.fixDash;$a.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),$a.prototype.origPaintEdgeShape.apply(this,
+[c,m,v])))};mxCellRenderer.registerShape("filledEdge",$a);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==m.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.x+ma/2,bb=n.y+Wa/2;n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb-ma/2-Wa/2,bb-Wa/2+ma/2);c.lineTo(jb-ma/2+Wa/2,bb-Wa/2-ma/2);c.lineTo(jb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);c.lineTo(jb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,v,n,u,A,C,ha,K,
+wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.moveTo(n.x-ma/2+Wa/2,n.y-Wa/2-ma/2);c.lineTo(n.x-Wa/2-3*ma/2,n.y-3*Wa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(c,m,v,n,u,A,C,ha,K,wa){var ma=n.clone(),Wa=eb.apply(this,arguments),jb=u*(C+2*K),bb=A*(C+2*K);return function(){Wa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.clone();n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb.x-Wa,jb.y+ma);c.quadTo(n.x-Wa,n.y+ma,n.x,n.y);c.quadTo(n.x+Wa,n.y-ma,jb.x+Wa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,v,n,u,A,C,ha,K,wa){m=u*K*1.118;v=A*K*1.118;u*=C+K;A*=C+K;var ma=n.clone();ma.x-=m;ma.y-=
+v;n.x+=-u-m;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,v,n,u,A,C,ha,K,wa,ma){A*=ha+wa;C*=ha+wa;var Wa=u.clone();return function(){m.begin();m.moveTo(Wa.x,Wa.y);K?m.lineTo(Wa.x-A-C/c,Wa.y-C+A/c):m.lineTo(Wa.x+C/c-A,Wa.y-C-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=
+function(c,m,v){return hb(c,["width"],m,function(n,u,A,C,ha){ha=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(C.x+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},hb=function(c,m,v,n,u){return gb(c,m,function(A){var C=c.absolutePoints,ha=C.length-1;A=c.view.translate;var K=c.view.scale,wa=v?C[0]:C[ha];C=v?C[1]:C[ha-1];ha=C.x-wa.x;var ma=C.y-wa.y,Wa=Math.sqrt(ha*ha+ma*ma);wa=
+n.call(this,Wa,ha/Wa,ma/Wa,wa,C);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,C,ha){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Wa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Wa.x;var jb=K.y-Wa.y,bb=Math.sqrt(wa*wa+jb*jb);C.x=(C.x+A.x)*ma;C.y=(C.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Wa,K,C,ha)})},qb=function(c,m){return function(v){return[hb(v,["startWidth"],!0,function(n,u,A,C,ha){ha=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+m;return new mxPoint(C.x+
+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-m})]}},kb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Xa.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Xa.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},ib=function(c){return function(m){return[gb(m,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},ub=function(c,m,v){return function(n){var u=[gb(n,["size"],
+function(A){var C=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+C,A.y+C)},function(A,C){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,C.x-A.x),Math.min(A.height,C.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},ob=function(c,m,v,n,u){v=null!=v?v:.5;return function(A){var C=[gb(A,["size"],function(ha){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,wa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,wa){ha=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(v,(K.x-ha.x)/ha.width));this.state.style.size=ha},!1,n)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&C.push(lb(A));return C}},nb=function(c,m,v){c=null!=c?c:.5;return function(n){var u=[gb(n,["size"],
+function(A){var C=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",C?v:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(C?.75:.75*A.width)),A.y+A.height/4)},function(A,C){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?C.x-A.x:Math.max(0,Math.min(c,(C.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},wb=
+function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m}},lb=function(c,m){return gb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=m?m:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},gb=function(c,m,v,n,
+u,A,C){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(wa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);C&&C(wa)};ha.getPosition=v;ha.setPosition=n;ha.ignoreGrid=null!=u?u:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ha},tb={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,
+C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(lb(c,v/2))}m.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
-u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
-Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
-bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var C=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&u.isSwimlane(A[ha])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ha]))==n&&C.push(A[ha]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],C)}}));return m},label:wb(),ext:wb(),rectangle:wb(),triangle:wb(),rhombus:wb(),umlLifeline:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",ba.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(m){var v=Math.max(U.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",U.prototype.width))),n=Math.max(1.5*U.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",U.prototype.height)));return new mxPoint(m.x+v,m.y+n)},function(m,
+v){this.state.style.width=Math.round(Math.max(U.prototype.corner,Math.min(m.width,v.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*U.prototype.corner,Math.min(m.height,v.y-m.y)))},!1)]},process:function(c){var m=[gb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},cross:function(c){return[gb(c,["size"],function(m){var v=Math.min(m.width,m.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)))*v/2;return new mxPoint(m.getCenterX()-v,m.getCenterY()-v)},function(m,v){var n=Math.min(m.width,m.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-v.y)/n*2,Math.max(0,m.getCenterX()-v.x)/n*2)))})]},note:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},note2:function(c){return[gb(c,["size"],function(m){var v=
+Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},manualInput:function(c){var m=[gb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Oa.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},dataStorage:function(c){return[gb(c,["size"],function(m){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?H.prototype.fixedSize:H.prototype.size));return new mxPoint(m.x+m.width-n*(v?1:m.width),m.getCenterY())},function(m,v){m="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-v.x)):Math.max(0,Math.min(1,(m.x+m.width-v.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[gb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));mxUtils.getValue(this.state.style,"base",qa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",qa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),gb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",qa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),gb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",qa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},internalStorage:function(c){var m=[gb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",ya.prototype.jettyWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"jettyHeight",ya.prototype.jettyHeight)));return new mxPoint(m.x+v/2,m.y+
+2*n)},function(m,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,v.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",La.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",La.prototype.dy)));return new mxPoint(m.x+v,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,
+Math.min(m.width,v.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+v)/2,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,v.x-m.x-m.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",k.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=m.width-v);return new mxPoint(m.x+v,m.y+n)},function(m,v){var n=Math.max(0,Math.min(m.width,v.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v*m.height/2)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",M.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(v),.5*m.height))},function(m,v){this.state.style.isoAngle=Math.max(0,50*(v.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});m.push(c);return m},step:ob(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(y.prototype.size,!1),display:ob(Ja.prototype.size,!1),cube:ub(1,
+l.prototype.size,!1),card:ub(.5,t.prototype.size,!0),loopLimit:ub(.5,Z.prototype.size,!0),trapezoid:nb(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:nb(1,O.prototype.size,O.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var C=c.absolutePoints,ha=C[0];C=C[C.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==C&&null!=v&&(C=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=C&&null!=ha){c=function(Ga,Ka,Ia){Ga-=bb.x;var Ha=Ka-bb.y;Ka=(Wa*Ga-ma*Ha)/(K*Wa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Wa);jb?(Ia&&(bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga)):(Ia&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka));u.push(bb)};var bb=ha;null==n&&(n=new mxPoint(ha.x+(C.x-ha.x)/2,ha.y+(C.y-ha.y)/2));c(n.x,n.y,!0);c(C.x,C.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(m,v/(.5+n));m=(m-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v+.75*n));return c};M.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(m*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};qa.prototype.getConstraints=function(c,m,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
-ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];X.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)];sa.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,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};t.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};e.prototype.getConstraints=function(c,m,v){c=[];m=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};k.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Na.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,m,v){c=[];var n=Math.min(m,v/2),u=Math.min(m-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ya.prototype.getConstraints=function(c,m,v){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ya.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ya.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return n};Z.prototype.constraints=mxRectangleShape.prototype.constraints;fa.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)];W.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)];va.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)];y.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)];I.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)];na.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)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.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)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=
-function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.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)];U.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)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];O.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ab.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};La.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));return c};Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Xa.prototype.getConstraints=
+function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};x.prototype.getConstraints=function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ca.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.min(v,m),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,C=(m-u)/2;u=C+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,n));return c};ba.prototype.constraints=null;P.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
-t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
-f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
-x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
-try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(d){d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.addSelectionCells(p.getEdges(d))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var d=p.getSelectionCells(),f=p.getCurrentCellStyle(p.getSelectionCell()),g=1==mxUtils.getValue(f,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,g,d);p.setCellStyles(mxConstants.STYLE_RESIZABLE,g,d);p.setCellStyles(mxConstants.STYLE_ROTATABLE,g,d);p.setCellStyles(mxConstants.STYLE_DELETABLE,g,d);p.setCellStyles(mxConstants.STYLE_EDITABLE,
-g,d);p.setCellStyles("connectable",g,d)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(d){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(d){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var d=mxUtils.sortCells(p.getSelectionCells(),!0);1!=d.length||p.isTable(d[0])||p.isTableRow(d[0])?
-(d=p.getCellsForGroup(d),1<d.length&&p.setSelectionCell(p.groupCells(null,0,d))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var d=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var f=p.ungroupCells();if(null!=d)for(var g=0;g<d.length;g++)p.model.contains(d[g])&&(0==p.model.getChildCount(d[g])&&p.model.isVertex(d[g])&&p.setCellStyles("container","0",[d[g]]),f.push(d[g]))}finally{p.model.endUpdate()}0<
-f.length&&p.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var d=p.getSelectionCells();if(null!=d){for(var f=[],g=0;g<d.length;g++)p.isTableRow(d[g])||p.isTableCell(d[g])||f.push(d[g]);p.removeCellsFromParent(f)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var d=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(d)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f="";if(mxUtils.isNode(d.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&d.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g=d.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=d.value.getAttribute("tooltip"));null!=g&&(f=g)}f=new TextareaDialog(m,mxResources.get("editTooltip")+":",f,function(x){p.setTooltipForCell(d,
-x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,y){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",y)},!0,p.getLinkTargetForCell(d))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
-y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
-!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
-p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
-x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
-(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
-m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
-g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
-f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
-0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
-L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
-L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
-m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
-try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});
-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var d=p.getSelectionCells(),f=p.getCurrentCellStyle(d[0]),
-g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
-p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),M=0;M<G.length;M++)p.cellLabelChanged(G[M],"")}finally{p.getModel().endUpdate()}}}function g(G,M,Q,e,f){f.getModel().beginUpdate();try{var k=f.getCellGeometry(G);null!=k&&Q&&e&&(Q/=e,k=k.clone(),1<Q?k.height=k.width/Q:k.width=k.height*Q,f.getModel().setGeometry(G,
+k));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,M,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var l=this.editorUi,D=l.editor,p=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,
+M=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&M==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(G,M){try{var Q=mxUtils.parseXml(G);D.graph.setSelectionCells(D.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(l);l.showDialog(G.container,620,420,!0,!1);G.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=l.copyXml(),null!=G&&p.removeCells(G,!1)}catch(M){}null==G&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){l.handleError(G)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(M){if(null!=M){p.getModel().beginUpdate();try{l.pasteXml(M,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),G=!0)}catch(M){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(e){if(null!=e){for(var f=!0,k=0;k<
+e.length&&f;k++)f=f&&p.model.isEdge(e[k]);var z=p.view.translate;k=p.view.scale;var t=z.x,B=z.y;z=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(z=I.getTerminalPoint(!0))}z=null!=z?z:p.getBoundingBoxFromGeometry(e,f);null!=z&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/k-t)),k=Math.round(p.snap(p.popupMenuHandler.triggerY/k-B)),p.cellsMoved(e,f-z.x,k-z.y))}}function Q(){p.getModel().beginUpdate();try{M(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{M(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),G=!0)}catch(e){}G||Q()}});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(l.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),M=0;M<G.length;M++)if(p.getModel().isVertex(G[M])){var Q=p.getCellGeometry(G[M]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(G[M],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
+null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(l.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,M){function Q(k,z){var t=e.getValue(k);z=k.cloneValue(z);z.removeAttribute("placeholders");null==t||isNaN(t.nodeType)||z.setAttribute("placeholders",t.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||z.setAttribute("label",p.convertValueToString(k));e.setValue(k,z)}G=null!=M?M:G;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(M=0;M<f.length;M++)Q(f[M],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,M){G=null!=M?M:G;null!=G&&mxEvent.isShiftDown(G)?d():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){d()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){l.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=l.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var G=l.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,M){G=null!=M?M:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),M=p.getCurrentCellStyle(p.getSelectionCell()),Q=1==mxUtils.getValue(M,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,Q,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,Q,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,Q,G);p.setCellStyles(mxConstants.STYLE_DELETABLE,Q,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,
+Q,G);p.setCellStyles("connectable",Q,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?
+(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var M=p.ungroupCells();if(null!=G)for(var Q=0;Q<G.length;Q++)p.model.contains(G[Q])&&(0==p.model.getChildCount(G[Q])&&p.model.isVertex(G[Q])&&p.setCellStyles("container","0",[G[Q]]),M.push(G[Q]))}finally{p.model.endUpdate()}0<
+M.length&&p.setSelectionCells(M)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var M=[],Q=0;Q<G.length;Q++)p.isTableRow(G[Q])||p.isTableCell(G[Q])||M.push(G[Q]);p.removeCellsFromParent(M)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(G)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var M="";if(mxUtils.isNode(G.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=G.value.getAttribute("tooltip"));null!=Q&&(M=Q)}M=new TextareaDialog(l,mxResources.get("editTooltip")+":",M,function(e){p.setTooltipForCell(G,
+e)});l.showDialog(M.container,320,200,!0,!0);M.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var M=p.getLinkForCell(G)||"";l.showLinkDialog(M,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(G,0<Q.length?Q:null);p.setAttributeForCell(G,"linkTarget",f)},!0,p.getLinkTargetForCell(G))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(G,M,Q){G=mxUtils.trim(G);if(0<G.length){var e=null,f=p.getLinkTitle(G);null!=M&&0<M.length&&(e=M[0].iconUrl,
+f=M[0].name||M[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));M=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));M.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([M],!0));M.geometry.x=e.x;M.geometry.y=e.y;p.setAttributeForCell(M,"linkTarget",Q);p.setLinkForCell(M,G);p.cellSizeUpdated(M,
+!0);p.getModel().beginUpdate();try{M=p.addCell(M),p.fireEvent(new mxEventObject("cellsInserted","cells",[M]))}finally{p.getModel().endUpdate()}p.setSelectionCell(M);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),M=p.getParentByName(G,"A",p.cellEditor.textarea),Q="";if(null==M&&null!=G&&null!=G.getElementsByTagName)for(var e=G.getElementsByTagName("a"),
+f=0;f<e.length&&null==M;f++)e[f].textContent==G.textContent&&(M=e[f]);null!=M&&"A"==M.nodeName&&(Q=M.getAttribute("href")||"",p.selectNode(M));var k=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(z){p.cellEditor.restoreSelection(k);null!=z&&p.insertLink(z)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();
+try{for(var M=0;M<G.length;M++){var Q=G[M];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var M=
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<M.length;Q++)if(state=p.getView().getState(M[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==G){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(k.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",G,[M[Q]])}else"0"==
+e&&"1"==G&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",G,[M[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",M))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),M="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&
+(M=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,M)});this.addAction("rotation",function(){var G="0",M=p.getView().getState(p.getSelectionCell());null!=M&&(G=M.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(l,G,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);
+l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var G=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),M=p.view.translate,
+Q=p.view.scale;G.x=G.x/Q-M.x;G.y=G.y/Q-M.y;G.width/=Q;G.height/=Q;null!=p.backgroundImage&&(G=mxRectangle.fromRectangle(G),G.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==G.width||0==G.height?(p.zoomTo(1),l.resetScrollbars()):(M=Editor.fitWindowBorders,null!=M&&(G.x-=M.x,G.y-=M.y,G.width+=M.width+M.x,G.height+=M.height+M.y),p.fitWindow(G))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var G=p.pageFormat,M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/G.width/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=G.y*p.view.scale-1,p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var G=p.pageFormat,
+M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*G.width)/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=Math.min(G.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(G.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var G=p.getPagePadding();p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&
+0<M&&p.zoomTo(M/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&(M=new ChangePageSetup(l,null,null,null,M/100),M.ignoreColor=!0,M.ignoreImage=!0,p.model.execute(M))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,
+300,80,!0,!0);G.init()}));var N=null;N=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();l.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.isGridEnabled()});N.setEnabled(!1);N=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;l.fireEvent(new mxEventObject("guidesEnabledChanged"))});N.setToggleAction(!0);
+N.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});N.setEnabled(!1);N=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());l.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});N=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(l);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});
+N.setToggleAction(!0);N.setSelectedCallback(function(){return p.foldingEnabled});N.isEnabled=E;N=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.scrollbars});N=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));N.setToggleAction(!0);N.setSelectedCallback(function(){return p.pageVisible});N=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionArrowsEnabled});N=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});N=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+l.fireEvent(new mxEventObject("copyConnectChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});N.isEnabled=E;N=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});N.setToggleAction(!0);N.setSelectedCallback(function(){return l.editor.autosave});N.isEnabled=E;N.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+G+".html")});var R=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){R||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){R=!1}),R=!0)}));N=mxUtils.bind(this,function(G,M,Q,e){return this.addAction(G,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,M,f);(M&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(f,function(z){z.style.fontWeight=null;"B"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(z){z.style.fontStyle=null;"I"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(z){z.style.textDecoration=null;"U"==z.nodeName&&p.replaceElement(z)});for(var k=0;k<f.length;k++)0==p.model.getChildCount(f[k])&&p.autoSizeCell(f[k],
+!1)}finally{p.getModel().endUpdate()}}},null,null,e)});N("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");N("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");N("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
+try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});
+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),M=p.getCurrentCellStyle(G[0]),
+Q="1"==mxUtils.getValue(M,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),M="1";null!=G&&null!=p.getFoldingImage(G)&&(M="0");p.setCellStyles("collapsible",M);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[M],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var M=p.getModel();M=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",M.getStyle(G[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),G)},null,null,400,220);this.editorUi.showDialog(M.container,420,300,!0,!0);M.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var M=D.graph.selectionCellsHandler.getHandler(G);if(M instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;G=p.getModel().getParent(G);for(var k=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=k;)f+=k.x,Q+=k.y,G=
+p.getModel().getParent(G),k=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));M.addPointAt(M.state,f,e)}}});this.addAction("removeWaypoint",function(){var G=l.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearWaypoints",function(G,M){G=null!=M?M:G;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
+0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var k=p.getCellGeometry(f);null!=M&&mxEvent.isShiftDown(G)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=k&&(k=k.clone(),k.points=null,k.x=0,k.y=0,k.offset=null,p.getModel().setGeometry(f,k))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");N=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");N=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",M=p.getView().getState(p.getSelectionCell()),
+Q="",e=null;null!=M&&(Q=M.style[mxConstants.STYLE_IMAGE]||Q,e=M.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(G,Q,function(k,z,t,B,I,O){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(k,z,t);else{var J=p.getSelectionCells();if(null!=k&&(0<k.length||0<J.length)){var y=null;p.getModel().beginUpdate();try{if(0==J.length){J=[p.insertVertex(p.getDefaultParent(),null,"",0,0,z,t,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=ia.x;J[0].geometry.y=ia.y;null!=B&&g(J[0],B,I,O,p);y=J;p.fireEvent(new mxEventObject("cellsInserted","cells",y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<k.length?k:null,J);var da=p.getCurrentCellStyle(J[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==k.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,J);if(null!=z&&null!=t)for(k=0;k<J.length;k++){var ja=J[k];if("0"!=p.getCurrentCellStyle(ja).expand){var aa=p.getModel().getGeometry(ja);null!=aa&&(aa=aa.clone(),aa.width=z,aa.height=t,p.getModel().setGeometry(ja,aa))}null!=B&&g(ja,B,I,O,p)}}finally{p.getModel().endUpdate()}null!=y&&(p.setSelectionCells(y),p.scrollCellToVisible(y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=G){var M=p.getCurrentCellStyle(G),Q=M[mxConstants.STYLE_IMAGE],e=M[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(M=new CropImageDialog(l,Q,M[mxConstants.STYLE_CLIP_PATH],function(f,k,z){g(G,f,k,z,p)}),l.showDialog(M.container,300,390,!0,!0))}}).isEnabled=E;N=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+N=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));N=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=
+p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var M=new ConnectionPointsDialog(l,G);l.showDialog(M.container,350,450,!0,!1,function(){M.destroy()});M.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,g,l,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,g,l,D))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,g,l,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=g?g:!0;this.iconCls=l;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
-e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
-"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
-DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
-(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
-DrawioFile.prototype.saveFile=function(b,e,k,m){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(g){this.sync.cleanup(b,d,g)}),d):this.updateFile(b,d)};
+DrawioFile.prototype.updateFile=function(b,d,g,l){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=D?this.mergeFile(D,b,d,l):this.reloadFile(b,
+d))}catch(p){null!=d&&d(p)}}),d))};
+DrawioFile.prototype.mergeFile=function(b,d,g,l){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var N=[this.ui.diffPages(null!=l?l:p,E)],R=this.ignorePatches(N);this.setShadowPages(E);if(R)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};R={};var G=this.ui.patchPages(p,N[0]),M=this.ui.getHashValueForPages(G,
+l),Q=this.ui.getHashValueForPages(E,R);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",N,"backup",this.backupPatch,"checksum",M,"current",Q,"valid",M==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=M&&M!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(G)),k=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(g,N,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+M+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(R)+"\nFrom: "+k+"\nTo: "+z+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",M,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var t=this.sync.patchRealtime(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==t||mxUtils.isEmptyObject(t)||N.push(t)}this.patch(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(O){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(O);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,O);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,O)}}catch(J){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),g=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var D=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,D,!0);g.appendChild(D)}return mxUtils.getPrettyXml(g)};
+DrawioFile.prototype.compressReportData=function(b,d,g){d=null!=d?d:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,d,g,l,D,p,E,N){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);var G=mxUtils.bind(this,function(z){var t=this.compressReportData(JSON.stringify(d,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+t+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==l?G(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==l?G(z):G(null)}),function(){})}else{var M=this.getCurrentUser(),Q=null!=M?M.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,k=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);
+k=JSON.stringify(d);k=null!=k&&250>k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var t=null!=k?"Report":"Error",B=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+t+" in "+D+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=N?
+"-rev_"+this.ui.hashValue(N):"")+(null!=B?"-latest_"+B:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:D,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(z){}};
+DrawioFile.prototype.sendErrorReport=function(b,d,g,l){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),N=null!=E?this.ui.hashValue(E.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),M=G.lastIndexOf(".");E="xml";0<M&&(E=G.substring(M));var Q=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+N+R+"\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!=d?"\n\n"+d:
+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+D+"\n\nData:\n"+p,l)}catch(e){}};
+DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var g=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,D=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var N=this.ui.getCurrentFile();null!=N&&(N.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):
+g()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,g){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),g)};
+DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var g=0;g<b.length&&d;g++)d=d&&mxUtils.isEmptyObject(b[g]);return d};
+DrawioFile.prototype.patch=function(b,d,g){if(null!=b){var l=this.ui.editor.undoManager,D=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var N=this.changeListenerEnabled;this.changeListenerEnabled=g;var R=E.foldingEnabled,G=E.mathEnabled,M=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());M.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=M;this.changeListenerEnabled=N;g||(l.history=D,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)G!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(R!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",g)}return b};
+DrawioFile.prototype.save=function(b,d,g,l,D,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",D,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=g)g({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=g)g(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,g){};
+DrawioFile.prototype.saveFile=function(b,d,g,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,g){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var m=0;null!=k&&m<k.length;m++){var C=k[m];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(g){for(var l=0;null!=g&&l<g.length;l++){var D=g[l];null!=D.id&&0==D.id.indexOf("extFont_")&&D.parentNode.removeChild(D)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(g){b(g)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
-DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};
-DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
+DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};
+DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>");e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length&&(e[0].style.cursor="pointer",mxEvent.addListener(e[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{e=this.getErrorMessage(b);if(null==e&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(e=mxResources.get("lastSaved",[k]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+
-e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+'"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
+"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var g=this.ui.timeSince(new Date(this.lastSaved));null!=g&&(d=mxResources.get("lastSaved",[g]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
+d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
0))}};
-DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();e=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(g){"IMG"!=mxEvent.getSource(g).nodeName&&
b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,e)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-e)}};
+DrawioFile.prototype.showRefreshDialog=function(b,d,g){null==g&&(g=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),g),this.ui.showError(mxResources.get("warning")+" ("+g+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,d,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var D=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=
+g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+d)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,m,C):this.invalidChecksum?this.showRefreshDialog(k,m,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,m)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){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(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.handleConflictError=function(b,d){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,l,D):this.invalidChecksum?this.showRefreshDialog(g,l,this.getErrorMessage(b)):d?this.showConflictDialog(D,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(g,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){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(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(g){b(d,g)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,d,g,l,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,d,g,l,D)}catch(R){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=l&&l(R);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,R);else{var E=this.getCurrentUser(),N=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),N,R)}}catch(G){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,d,g,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=g&&g(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=d.lastIndexOf(".");return b===(0<g?d.substring(g):"")}return b==d};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
-function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
-LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
-{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
-graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
-edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
-fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
-edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,g){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,g,l,D,p){DrawioFile.call(this,b,d);this.title=g;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,g){this.saveAs(this.title,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
+LocalFile.prototype.saveFile=function(b,d,g,l,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),N=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),R=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var M=mxUtils.bind(this,
+function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(G,"image/png"):G).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){try{var z=this.desc;this.savingFile=!1;this.desc=k;this.fileSaved(E,z,N,M);this.removeDraft()}catch(t){M(t)}}),M)}),M)}),M):(this.inConflictState=!0,M())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;M(f)}))}),M)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,p?"image/png":"text/xml",p);else if(G.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(G)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(G)}));N()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){R(G)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):R(E)};
+LocalFile.prototype.rename=function(b,d,g){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
+fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
+{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
+gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
+gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
+{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3129,580 +3128,583 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,E){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-E){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
+F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&E.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
+isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,E){return E.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,E){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,E){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=q&&(E.isSwimlane(q)||0<E.model.getChildCount(q))},
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,E){var Q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=Q&&(E.isContainer(Q)&&"0"!=q.style.collapsible||!E.isContainer(Q)&&"1"==q.style.collapsible)},isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length&&!E.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,E){E=E.editorUi.editor.graph.model;return 0<q.vertices.length?E.isVertex(E.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,E){q=0<q.vertices.length?E.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var S=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=S&&(F.isContainer(S)&&"0"!=q.style.collapsible||!F.isContainer(S)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
-E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
-0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
-"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
-this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
-qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
-qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
-va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
-va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
-qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
-Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
-this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
-mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
-ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
-q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
-null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
-mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
-null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
-!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
-R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
-(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
-q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
-StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
-q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
-Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
-var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
-null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
-!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
-EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
-(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
-(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
-"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
-"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
-!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
-E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
-"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
-E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,E){q=null!=q?q:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style",
-this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
-/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
-function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
-Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
-3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
-63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
-ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
-retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
-R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
-[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
-"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
-function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
-(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
-"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
-"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
-this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
-ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
-function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
-Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
-sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
-E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
-this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
-DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
-destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
-function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
-{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};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:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);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:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
-font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
-{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
-{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
-ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
-ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
-"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
-Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
-ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
-Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
-document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
-ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
-ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
-"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
-document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
-1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
-!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
-parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
-index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="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(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){var ja=
-document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
-null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
-0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
-null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
-mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
-q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
-E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",E)):(null==Q&&(Q='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}'),q=document.createElement("style"),mxUtils.write(q,Q));return q};Graph.addFont=function(q,E,Q){if(null!=q&&0<q.length&&null!=E&&0<E.length){var Y=q.toLowerCase();if("helvetica"!=Y&&"arial"!=q&&"sans-serif"!=
-Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
-return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
-null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
-Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
-Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
-za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
-Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
-z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
-else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
-"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
-O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
-"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
-(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
-za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
-(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
-q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
-q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
-Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
-arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
-!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
-sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
-sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
-(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
-!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
-[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
-Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
-ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
-0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
-1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
-da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
-"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
-q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
-[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
-STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
-mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
-[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
-Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
-tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
-0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
-ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
-Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
-kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
-ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
-R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
-q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
-cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
-function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
-DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
-da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
-!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
-"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
-Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
-Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
-"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
-function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
-"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
-da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
-function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
-(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.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 X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
-ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var S=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==S||S==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
+F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(S){var ba=S.sets||[];S=S.options||this.getDefaultOptions();for(var U=0;U<ba.length;U++){var ca=ba[U];switch(ca.type){case "path":null!=S.stroke&&this._drawToContext(q,ca,S);break;case "fillPath":this._drawToContext(q,ca,S);break;case "fillSketch":this.fillSketch(q,ca,S)}}};F.fillSketch=function(S,ba,U){var ca=q.state.strokeColor,ea=q.state.strokeWidth,na=q.state.strokeAlpha,ra=q.state.dashed,
+ya=U.fillWeight;0>ya&&(ya=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(ya);q.setDashed(!1);this._drawToContext(S,ba,U);q.setDashed(ra);q.setStrokeWidth(ea);q.setStrokeColor(ca);q.setStrokeAlpha(na)};F._drawToContext=function(S,ba,U){S.begin();for(var ca=0;ca<ba.ops.length;ca++){var ea=ba.ops[ca],na=ea.data;switch(ea.op){case "move":S.moveTo(na[0],na[1]);break;case "bcurveTo":S.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":S.lineTo(na[0],
+na[1])}}S.end();"fillPath"===ba.type&&U.filled?S.fill():S.stroke()};return F};(function(){function q(ca,ea,na){this.canvas=ca;this.rc=ea;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
+this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
+mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ca,ea){var na=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var ya=0;ya<ra.length;ya++)na=(na<<5)-na+ra.charCodeAt(ya)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};ra=this.rc.getDefaultOptions();na.stroke=ca?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(na.filled=ea)?(na.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):na.fill="";na.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);na.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);na.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+ra.curveFitting);na.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);na.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);na.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);na.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);na.hachureGap="auto"==ea?-1:ea;na.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",ea);na.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);na.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);na.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=na.fill&&(null!=ca||null!=ea&&na.fill==ea)?"solid":
+ra.fillStyle);na.fillStyle=ea;return na};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};q.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ca,
+ea,na,ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,na,ra),this.lastX=na,this.lastY=ra)};q.prototype.curveTo=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,na,ra,ya,va),this.lastX=ya,this.lastY=va)};q.prototype.arcTo=function(ca,ea,na,ra,ya,va,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var pa=mxUtils.arcToCurves(this.lastX,this.lastY,
+ca,ea,na,ra,ya,va,Da);if(null!=pa)for(var Aa=0;Aa<pa.length;Aa+=6)this.curveTo(pa[Aa],pa[Aa+1],pa[Aa+2],pa[Aa+3],pa[Aa+4],pa[Aa+5]);this.lastX=va;this.lastY=Da}};q.prototype.rect=function(ca,ea,na,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,na,ra,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ca,ea,na,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
+na/2,ea+ra/2,na,ra,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+ya,ea),this.lineTo(ca+na-ya,ea),this.quadTo(ca+na,ea,ca+na,ea+va),this.lineTo(ca+na,ea+ra-va),this.quadTo(ca+na,ea+ra,ca+na-ya,ea+ra),this.lineTo(ca+ya,ea+ra),this.quadTo(ca,ea+ra,ca,ea+ra-va),this.lineTo(ca,ea+va),this.quadTo(ca,ea,ca+ya,ea))};q.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),ca)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
+function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
+this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ca){return new q(ca,Editor.createRoughCanvas(ca),this)};var F=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var S=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,na,ra,ya){null!=ca.handJiggle&&ca.handJiggle.passThrough||S.apply(this,arguments)};var ba=mxShape.prototype.paint;mxShape.prototype.paint=
+function(ca){var ea=ca.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==q&&!this.outline){ca.save();var ra=this.fill,ya=this.stroke;this.stroke=this.fill=null;var va=this.configurePointerEvents,Da=ca.setStrokeColor;ca.setStrokeColor=function(){};var pa=ca.setFillColor;ca.setFillColor=function(){};na||null==ra||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;ba.apply(this,
+arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=pa;ca.setStrokeColor=Da;this.configurePointerEvents=va;this.stroke=ya;this.fill=ra;ca.restore();na&&null!=ra&&(ca.addTolerance=function(){})}ba.apply(this,arguments);ca.addTolerance=ea};var U=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,na,ra,ya,va){null!=ca.handJiggle&&ca.handJiggle.constructor==q?(ca.handJiggle.passThrough=!0,U.apply(this,arguments),ca.handJiggle.passThrough=!1):U.apply(this,arguments)}})();
+Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,S){if(null!=q&&"undefined"!==typeof pako){var ba=q.ownerDocument.getElementsByTagName("div"),U=[];if(null!=ba&&0<ba.length)for(var ca=0;ca<ba.length;ca++)if("mxgraph"==ba[ca].getAttribute("class")){U.push(ba[ca]);
+break}0<U.length&&(ba=U[0].getAttribute("data-mxgraph"),null!=ba?(U=JSON.parse(ba),null!=U&&null!=U.xml&&(q=mxUtils.parseXml(U.xml),q=q.documentElement)):(U=U[0].getElementsByTagName("div"),0<U.length&&(ba=mxUtils.getTextContent(U[0]),ba=Graph.decompress(ba,null,S),0<ba.length&&(q=mxUtils.parseXml(ba),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(ba=q.getAttribute("content"),null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(cont,ba))),null!=
+ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba)),null!=ba&&0<ba.length)q=mxUtils.parseXml(ba).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(U=null,"diagram"==q.nodeName?U=q:"mxfile"==q.nodeName&&(ba=q.getElementsByTagName("diagram"),0<ba.length&&(U=ba[Math.max(0,Math.min(ba.length-1,urlParams.page||0))])),null!=U&&(q=Editor.parseDiagramNode(U,S)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,
+F){var S=mxUtils.trim(mxUtils.getTextContent(q)),ba=null;0<S.length?(q=Graph.decompress(S,null,F),null!=q&&0<q.length&&(ba=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(ba=mxUtils.createXmlDocument(),ba.appendChild(ba.importNode(q[0],!0)),ba=ba.documentElement));return ba};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),S=null;0<F.length?S=Graph.decompress(F):null!=q.firstChild&&(S=mxUtils.getXml(q.firstChild));return S};Editor.extractGraphModelFromPdf=
+function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var S=q.indexOf("stream",F)+9;if(0<q.substring(F,S).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",S-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(S,F)),{to:"string"})}return null}S=null;F="";for(var ba=0,U=0,ca=[],ea=null;U<q.length;){var na=q.charCodeAt(U);U+=1;10!=na&&(F+=String.fromCharCode(na));
+na=="/Subject (%3Cmxfile".charCodeAt(ba)?ba++:ba=0;if(19==ba){var ra=q.indexOf("%3C%2Fmxfile%3E)",U)+15;U-=9;if(ra>U){S=q.substring(U,ra);break}}10==na&&("endobj"==F?ea=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(ea=[],ca[F.split(" ")[0]]=ea):null!=ea&&ea.push(F),F="")}null==S&&(S=Editor.extractGraphModelFromXref(ca));null!=S&&(S=decodeURIComponent(S.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return S};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,S=null;
+null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),S=q.substring(1,q.length-1))))));return S};Editor.extractParserError=function(q,F){var S=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(S=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(S=mxUtils.getTextContent(F[0])));return null!=
+S?mxUtils.trim(S):S};Editor.addRetryToError=function(q,F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||
+ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));
+null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",
+Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var F=document.createElement("style");
+F.setAttribute("type","text/css");F.appendChild(document.createTextNode(q.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(F,S)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=
+q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);
+null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(F=parseFloat(q.zoomFactor),!isNaN(F)&&1<F?Graph.prototype.zoomFactor=F:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(F=parseInt(q.gridSteps),!isNaN(F)&&0<F?mxGraphView.prototype.gridSteps=F:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(F=parseInt(q.pageFormat.width),S=parseInt(q.pageFormat.height),!isNaN(F)&&0<F&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=
+new mxRectangle(0,0,F,S),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);
+q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
+null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var S=document.createElement("style");
+S.setAttribute("type","text/css");S.appendChild(document.createTextNode(q));F.parentNode.insertBefore(S,F);q=q.split("url(");for(S=1;S<q.length;S++){var ba=q[S].indexOf(")");ba=Editor.trimCssUrl(q[S].substring(0,ba));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",ba);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],S=0;S<q;S++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
+F)F!=this.graph.currentStyle&&(S=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=S&&(ba=new mxCodec(S.ownerDocument),ba.decode(S,this.graph.getStylesheet())));else{var S=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=S){var ba=new mxCodec(S.ownerDocument);ba.decode(S,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
+"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),S=0;S<F.length;S++)this.graph.addExtFont(F[S].name,
+F[S].url)}catch(U){console.log("ExtFonts format error: "+U.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var S=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&S.setAttribute("style",
+this.graph.currentStyle);var ba=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=ba&&S.setAttribute("backgroundImage",JSON.stringify(ba));S.setAttribute("math",this.graph.mathEnabled?"1":"0");S.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(ba=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),S.setAttribute("extFonts",ba.join("|")));return S};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
+if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var S=mxUtils.parseXml(F).documentElement;return"mxfile"==S.nodeName||"mxGraphModel"==S.nodeName}}catch(ba){}return!1};Editor.prototype.extractGraphModel=function(q,F,S){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
+"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
+function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([U]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var S=Editor.prototype.init;
+Editor.prototype.init=function(){S.apply(this,arguments);var U=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var ba=document.createElement("script");ba.setAttribute("type","text/javascript");ba.setAttribute("src",q);F[0].parentNode.appendChild(ba)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",S=[""],ba=0,U=!0,ca;q=$jscomp.makeIterator(q);for(ca=q.next();!ca.done;ca=q.next())ca=ca.value,'"'===ca?(U&&ca===F&&(S[ba]+=ca),U=!U):","===ca&&U?ca=S[++ba]="":S[ba]+=ca,F=ca;return S}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
+F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var S="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+S+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,S=this;q.convert=function(ba){if(null!=ba){var U="http://"==ba.substring(0,7)||"https://"==ba.substring(0,8);U&&!navigator.onLine?ba=Editor.svgBrokenImage.src:!U||ba.substring(0,q.baseUrl.length)==q.baseUrl||S.crossOriginImages&&S.isCorsEnabledForUrl(ba)?"chrome-extension://"==
+ba.substring(0,19)||mxClient.IS_CHROMEAPP||(ba=F.apply(this,arguments)):ba=PROXY_URL+"?url="+encodeURIComponent(ba)}return ba};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var S=!0,ba=window.setTimeout(mxUtils.bind(this,function(){S=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ca){window.clearTimeout(ba);
+S&&F(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(ba);if(S)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=U.height;ca.width=U.width;ea.drawImage(U,0,0);F(ca.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)};U.src=
+q}}catch(ca){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,S,ba){null==ba&&(ba=this.createImageUrlConverter());var U=0,ca=S||{};S=mxUtils.bind(this,function(ea,na){ea=q.getElementsByTagName(ea);for(var ra=0;ra<ea.length;ra++)mxUtils.bind(this,function(ya){try{if(null!=ya){var va=ba.convert(ya.getAttribute(na));if(null!=va&&"data:"!=va.substring(0,5)){var Da=ca[va];null==Da?(U++,this.convertImageToDataUri(va,function(pa){null!=pa&&(ca[va]=pa,ya.setAttribute(na,pa));U--;
+0==U&&F(q)})):ya.setAttribute(na,Da)}else null!=va&&ya.setAttribute(na,va)}}catch(pa){}})(ea[ra])});S("image","xlink:href");S("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",S=0,ba=q.length,U,ca,ea;S<ba;){U=q.charCodeAt(S++)&255;if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}ca=q.charCodeAt(S++);if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);F+="=";break}ea=q.charCodeAt(S++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
+6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return F};Editor.prototype.loadUrl=function(q,F,S,ba,U,ca,ea,na){try{var ra=!ea&&(ba||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var ya=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(va){if(200<=va.getStatus()&&299>=va.getStatus()){if(null!=F){var Da=va.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){va=mxUtilsBinaryToArray(va.request.responseBody).toArray();Da=Array(va.length);for(var pa=0;pa<va.length;pa++)Da[pa]=String.fromCharCode(va[pa]);Da=Da.join("")}ca=null!=ca?ca:"data:image/png;base64,";Da=ca+Editor.base64Encode(Da)}F(Da)}}else null!=S&&(0==va.getStatus()?S({message:mxResources.get("accessDenied")},va):404==va.getStatus()?S({code:va.getStatus()},va):S({message:mxResources.get("error")+" "+va.getStatus()},va))}),function(va){null!=S&&
+S({message:mxResources.get("error")+" "+va.getStatus()})},ra,this.timeout,function(){U&&null!=S&&S({code:App.ERROR_TIMEOUT,retry:ya})},na)});ya()}catch(va){null!=S&&S(va)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var S=q.split("url(");if(0<S.length){F=[S[0]];q=window.location.pathname;var ba=null!=q?q.lastIndexOf("/"):-1;0<=ba&&(q=q.substring(0,ba+1));ba=document.getElementsByTagName("base");var U=null;null!=ba&&0<ba.length&&(U=ba[0].getAttribute("href"));for(var ca=1;ca<
+S.length;ca++)if(ba=S[ca].indexOf(")"),0<ba){var ea=Editor.trimCssUrl(S[ca].substring(0,ba));this.graph.isRelativeUrl(ea)&&(ea=null!=U?U+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);F.push('url("'+ea+'"'+S[ca].substring(ba))}else F.push(S[ca])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,S){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));S(q,F)};Editor.prototype.embedCssFonts=
+function(q,F){var S=q.split("url("),ba=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==ba){for(var ra=[S[0]],ya=1;ya<S.length;ya++){var va=S[ya].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(S[ya].substring(0,va))]);ra.push('"'+S[ya].substring(va))}F(ra.join(""))}});if(0<S.length){for(q=1;q<S.length;q++){var ca=S[q].indexOf(")"),ea=null,na=S[q].indexOf("format(",ca);0<na&&(ea=Editor.trimCssUrl(S[q].substring(na+7,S[q].indexOf(")",
+na))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=ra;ba++;var ya="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ra))ya="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ra))ya="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ra))ya="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ra))ya="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ra))ya="application/vnd.ms-fontobject";
+else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(ra))ya="application/font-sfnt";this.mapFontUrl(ya,ra,mxUtils.bind(this,function(va,Da){this.loadUrl(Da,mxUtils.bind(this,function(pa){this.cachedFonts[ra]=pa;ba--;U()}),mxUtils.bind(this,function(pa){ba--;U()}),!0,null,"data:"+va+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(S[q].substring(0,ca)),ea)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
+F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var S=[],ba=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==ba&&this.embedCssFonts(S.join(""),q)}),ca=0;ca<F.length;ca++)mxUtils.bind(this,function(ea,
+na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(ba++,this.loadUrl(na,mxUtils.bind(this,function(ra){this.cachedGoogleFonts[na]=ra;S.push(ra+"\n");ba--;U()}),mxUtils.bind(this,function(ra){ba--;S.push("@import url("+na+");\n");U()}))):S.push(this.cachedGoogleFonts[na]+"\n"):S.push('@font-face {font-family: "'+ea+'";src: url("'+na+'")}\n')})(F[ca].name,F[ca].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
+S=0;S<F.length;S++){var ba=mxUtils.getTextContent(F[S]);0>ba.indexOf("mxPageSelector")&&0<ba.indexOf("MathJax")&&q[0].appendChild(F[S].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var S=q.getElementsByTagName("defs"),ba=q.ownerDocument;0==S.length?(S=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"defs"):ba.createElement("defs"),null!=q.firstChild?q.insertBefore(S,q.firstChild):q.appendChild(S)):S=S[0];q=null!=
+ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);S.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,S){var ba=mxClient.IS_FF?8192:16384;return Math.min(S,Math.min(ba/q,ba/F))};Editor.prototype.exportToCanvas=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa,xa,Ma,Oa,Na){try{ca=null!=
+ca?ca:!0;ea=null!=ea?ea:!0;Da=null!=Da?Da:this.graph;pa=null!=pa?pa:0;var La=ra?null:Da.background;La==mxConstants.NONE&&(La=null);null==La&&(La=ba);null==La&&0==ra&&(La=Ma?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,pa,Aa,null,ea,null,null,null,ya,null,Ma,Oa,Na),mxUtils.bind(this,function(Ba){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){Z.drawImage(ab,0,0);q(H,Ba)},0):(Z.drawImage(ab,
+0,0),q(H,Ba))},H=document.createElement("canvas"),P=parseInt(Ba.getAttribute("width")),X=parseInt(Ba.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=ca?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);H.setAttribute("width",P);H.setAttribute("height",X);var Z=H.getContext("2d");null!=La&&(Z.beginPath(),Z.rect(0,0,P,X),Z.fillStyle=La,Z.fill());1!=na&&Z.scale(na,na);if(xa){var fa=Da.view,la=fa.scale;fa.scale=1;var za=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor))));
+fa.scale=la;za="data:image/svg+xml;base64,"+za;var ua=Da.gridSize*fa.gridSteps*na,oa=Da.getGraphBounds(),ta=fa.translate.x*la,Ea=fa.translate.y*la,Fa=ta+(oa.x-ta)/la-pa,Pa=Ea+(oa.y-Ea)/la-pa,Ra=new Image;Ra.onload=function(){try{for(var Ca=-Math.round(ua-mxUtils.mod((ta-Fa)*na,ua)),Ja=-Math.round(ua-mxUtils.mod((Ea-Pa)*na,ua));Ca<P;Ca+=ua)for(var Qa=Ja;Qa<X;Qa+=ua)Z.drawImage(Ra,Ca/na,Qa/na);x()}catch($a){null!=U&&U($a)}};Ra.onerror=function(Ca){null!=U&&U(Ca)};Ra.src=za}else x()}catch(Ca){null!=
+U&&U(Ca)}});ab.onerror=function(x){null!=U&&U(x)};ya&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ba,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(Ba,x),this.loadFonts(Xa)}catch(H){null!=U&&U(H)}}))}catch(x){null!=U&&U(x)}}),S,va)}catch(Ba){null!=U&&U(Ba)}};
+Editor.crcTable=[];for(var D=0;256>D;D++)for(var p=D,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[D]=p;Editor.updateCRC=function(q,F,S,ba){for(var U=0;U<ba;U++)q=Editor.crcTable[(q^F.charCodeAt(S+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,S=0;S<q.length;S++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(S))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,S,ba,U){function ca(va,Da){var pa=ra;ra+=Da;return va.substring(pa,ra)}function ea(va){va=ca(va,4);
+return va.charCodeAt(3)+(va.charCodeAt(2)<<8)+(va.charCodeAt(1)<<16)+(va.charCodeAt(0)<<24)}function na(va){return String.fromCharCode(va>>24&255,va>>16&255,va>>8&255,va&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ra=0;if(ca(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(ca(q,4),"IHDR"!=ca(q,4))null!=U&&U();else{ca(q,17);U=q.substring(0,ra);do{var ya=ea(q);if("IDAT"==ca(q,4)){U=q.substring(0,ra-8);"pHYs"==F&&"dpi"==
+S?(S=Math.round(ba/.0254),S=na(S)+na(S)+String.fromCharCode(1)):S=S+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+ba;ba=4294967295;ba=Editor.updateCRC(ba,F,0,4);ba=Editor.updateCRC(ba,S,0,S.length);U+=na(S.length)+F+S+na(ba^4294967295);U+=q.substring(ra-8,q.length);break}U+=q.substring(ra-8,ra-4+ya);ca(q,ya);ca(q,4)}while(ya);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";
+var N=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){N.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var S=null;null!=q.editor.graph.getModel().getParent(F)?S=F.getId():null!=q.currentPage&&
+(S=q.currentPage.getId());return S});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var M=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?M.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,S=F.editor.graph,ba=this.createOption(mxResources.get("shadow"),function(){return S.shadowVisible},function(U){var ca=new ChangePageSetup(F);ca.ignoreColor=!0;
+ca.ignoreImage=!0;ca.shadowVisible=U;S.model.execute(ca)},{install:function(U){this.listener=function(){U(S.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(ba.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(ba,60));q.appendChild(ba)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
+var F=this.editorUi,S=F.editor.graph;if(S.isEnabled()){var ba=F.getCurrentFile();if(null!=ba&&ba.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(ea){F.editor.setAutosave(ea);F.editor.autosave&&ba.isModified()&&ba.fileChanged()},{install:function(ea){this.listener=function(){ea(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
+S.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return S.mathEnabled},function(ea){F.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(S.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var ca=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position=
+"relative";ca.style.marginLeft="6px";ca.style.top="2px";U.appendChild(ca)}return q};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:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
+type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+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:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
+font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
+stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,S){if(null!=F){var ba=function(ca){if(null!=ca)if(S)for(var ea=0;ea<ca.length;ea++)F[ca[ea].name]=ca[ea];else for(var na in F){var ra=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==na&&ca[ea].type==F[na].type){ra=!0;break}ra||
+delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),ba(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{ba(JSON.parse(q))}catch(ca){}}};var f=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},S=q.vertices,ba=q.edges,U=0;U<S.length;U++)this.findCommonProperties(S[U],F,0==U);for(U=0;U<ba.length;U++)this.findCommonProperties(ba[U],F,0==S.length&&0==U);null!=Object.getOwnPropertyNames&&
+0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,S){function ba(Z,fa,la,za){Da.getModel().beginUpdate();try{var ua=[],oa=[];if(null!=la.index){for(var ta=[],Ea=la.parentRow.nextSibling;Ea&&
+Ea.getAttribute("data-pName")==Z;)ta.push(Ea.getAttribute("data-pValue")),Ea=Ea.nextSibling;la.index<ta.length?null!=za?ta.splice(za,1):ta[la.index]=fa:ta.push(fa);null!=la.size&&ta.length>la.size&&(ta=ta.slice(0,la.size));fa=ta.join(",");null!=la.countProperty&&(Da.setCellStyles(la.countProperty,ta.length,Da.getSelectionCells()),ua.push(la.countProperty),oa.push(ta.length))}Da.setCellStyles(Z,fa,Da.getSelectionCells());ua.push(Z);oa.push(fa);if(null!=la.dependentProps)for(Z=0;Z<la.dependentProps.length;Z++){var Fa=
+la.dependentPropsDefVal[Z],Pa=la.dependentPropsVals[Z];if(Pa.length>fa)Pa=Pa.slice(0,fa);else for(var Ra=Pa.length;Ra<fa;Ra++)Pa.push(Fa);Pa=Pa.join(",");Da.setCellStyles(la.dependentProps[Z],Pa,Da.getSelectionCells());ua.push(la.dependentProps[Z]);oa.push(Pa)}if("function"==typeof la.onChange)la.onChange(Da,fa);va.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ua,"values",oa,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function U(Z,fa,la){var za=mxUtils.getOffset(q,
+!0),ua=mxUtils.getOffset(Z,!0);fa.style.position="absolute";fa.style.left=ua.x-za.x+"px";fa.style.top=ua.y-za.y+"px";fa.style.width=Z.offsetWidth+"px";fa.style.height=Z.offsetHeight-(la?4:0)+"px";fa.style.zIndex=5}function ca(Z,fa,la){var za=document.createElement("div");za.style.width="32px";za.style.height="4px";za.style.margin="2px";za.style.border="1px solid black";za.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(va,function(ua){this.editorUi.pickColor(fa,
+function(oa){za.style.background="none"==oa?"url('"+Dialog.prototype.noColorImage+"')":oa;ba(Z,oa,la)});mxEvent.consume(ua)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(za);return btn}function ea(Z,fa,la,za,ua,oa,ta){null!=fa&&(fa=fa.split(","),pa.push({name:Z,values:fa,type:la,defVal:za,countProperty:ua,parentRow:oa,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(va,function(Ea){for(var Fa=oa,Pa=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==
+Z)Fa=Fa.nextSibling,Pa++;else break;var Ra={type:la,parentRow:oa,index:Pa,isDeletable:!0,defVal:za,countProperty:ua};Pa=ya(Z,"",Ra,0==Pa%2,ta);ba(Z,za,Ra);Fa.parentNode.insertBefore(Pa,Fa.nextSibling);mxEvent.consume(Ea)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(Z,fa,la,za,ua,oa,ta){if(0<ua){var Ea=Array(ua);fa=null!=fa?fa.split(","):[];for(var Fa=0;Fa<ua;Fa++)Ea[Fa]=null!=fa[Fa]?fa[Fa]:null!=za?za:"";pa.push({name:Z,values:Ea,type:la,defVal:za,
+parentRow:oa,flipBkg:ta,size:ua})}return document.createElement("div")}function ra(Z,fa,la){var za=document.createElement("input");za.type="checkbox";za.checked="1"==fa;mxEvent.addListener(za,"change",function(){ba(Z,za.checked?"1":"0",la)});return za}function ya(Z,fa,la,za,ua){var oa=la.dispName,ta=la.type,Ea=document.createElement("tr");Ea.className="gePropRow"+(ua?"Dark":"")+(za?"Alt":"")+" gePropNonHeaderRow";Ea.setAttribute("data-pName",Z);Ea.setAttribute("data-pValue",fa);za=!1;null!=la.index&&
+(Ea.setAttribute("data-index",la.index),oa=(null!=oa?oa:"")+"["+la.index+"]",za=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";oa=mxResources.get(oa,null,oa);mxUtils.write(Fa,oa);Fa.setAttribute("title",oa);za&&(Fa.style.textAlign="right");Ea.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ta)Fa.appendChild(ca(Z,fa,la));else if("bool"==ta||"boolean"==ta)Fa.appendChild(ra(Z,fa,la));else if("enum"==ta){var Pa=la.enumList;for(ua=0;ua<Pa.length;ua++)if(oa=
+Pa[ua],oa.val==fa){mxUtils.write(Fa,mxResources.get(oa.dispName,null,oa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(va,function(){var Ra=document.createElement("select");U(Fa,Ra);for(var Ca=0;Ca<Pa.length;Ca++){var Ja=Pa[Ca],Qa=document.createElement("option");Qa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(Qa,mxResources.get(Ja.dispName,null,Ja.dispName));Ra.appendChild(Qa)}Ra.value=fa;q.appendChild(Ra);mxEvent.addListener(Ra,"change",function(){var $a=mxUtils.htmlEntities(Ra.value);
+ba(Z,$a,la)});Ra.focus();mxEvent.addListener(Ra,"blur",function(){q.removeChild(Ra)})}))}else"dynamicArr"==ta?Fa.appendChild(ea(Z,fa,la.subType,la.subDefVal,la.countProperty,Ea,ua)):"staticArr"==ta?Fa.appendChild(na(Z,fa,la.subType,la.subDefVal,la.size,Ea,ua)):"readOnly"==ta?(ua=document.createElement("input"),ua.setAttribute("readonly",""),ua.value=fa,ua.style.width="96px",ua.style.borderWidth="0px",Fa.appendChild(ua)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(Fa,
+"click",mxUtils.bind(va,function(){function Ra(){var Ja=Ca.value;Ja=0==Ja.length&&"string"!=ta?0:Ja;la.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",ta="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=la.min&&Ja<la.min?Ja=la.min:null!=la.max&&Ja>la.max&&(Ja=la.max);Ja=encodeURIComponent(("int"==ta?parseInt(Ja):Ja)+"");ba(Z,Ja,la)}var Ca=document.createElement("input");U(Fa,Ca,!0);Ca.value=decodeURIComponent(fa);Ca.className="gePropEditor";"int"!=ta&&"float"!=ta||la.allowAuto||
+(Ca.type="number",Ca.step="int"==ta?"1":"any",null!=la.min&&(Ca.min=parseFloat(la.min)),null!=la.max&&(Ca.max=parseFloat(la.max)));q.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ja){13==Ja.keyCode&&Ra()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Ra()})})));la.isDeletable&&(ua=mxUtils.button("-",mxUtils.bind(va,function(Ra){ba(Z,"",la,la.index);mxEvent.consume(Ra)})),ua.style.height="16px",ua.style.width="25px",ua.style.float="right",ua.className="geColorBtn",Fa.appendChild(ua));
+Ea.appendChild(Fa);return Ea}var va=this,Da=this.editorUi.editor.graph,pa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var xa=document.createElement("tr");xa.className="gePropHeader";var Ma=document.createElement("th");Ma.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";Ma.appendChild(Oa);
+mxUtils.write(Ma,mxResources.get("property"));xa.style.cursor="pointer";var Na=function(){var Z=Aa.querySelectorAll(".gePropNonHeaderRow");if(va.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var fa="none";for(var la=q.childNodes.length-1;0<=la;la--)try{var za=q.childNodes[la],ua=za.nodeName.toUpperCase();"INPUT"!=ua&&"SELECT"!=ua||q.removeChild(za)}catch(oa){}}else Oa.src=Sidebar.prototype.expandedImage,fa="";for(la=0;la<Z.length;la++)Z[la].style.display=fa};mxEvent.addListener(xa,
+"click",function(){va.editorUi.propertiesCollapsed=!va.editorUi.propertiesCollapsed;Na()});xa.appendChild(Ma);Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.innerHTML=mxResources.get("value");xa.appendChild(Ma);Aa.appendChild(xa);var La=!1,Ba=!1;xa=null;1==S.vertices.length&&0==S.edges.length?xa=S.vertices[0].id:0==S.vertices.length&&1==S.edges.length&&(xa=S.edges[0].id);null!=xa&&Aa.appendChild(ya("id",mxUtils.htmlEntities(xa),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(xa=
+F[ab],"function"!=typeof xa.isVisible||xa.isVisible(S,this)){var Xa=null!=S.style[ab]?mxUtils.htmlEntities(S.style[ab]+""):null!=xa.getDefaultValue?xa.getDefaultValue(S,this):xa.defVal;if("separator"==xa.type)Ba=!Ba;else{if("staticArr"==xa.type)xa.size=parseInt(S.style[xa.sizeProperty]||F[xa.sizeProperty].defVal)||0;else if(null!=xa.dependentProps){var x=xa.dependentProps,H=[],P=[];for(Ma=0;Ma<x.length;Ma++){var X=S.style[x[Ma]];P.push(F[x[Ma]].subDefVal);H.push(null!=X?X.split(","):[])}xa.dependentPropsDefVal=
+P;xa.dependentPropsVals=H}Aa.appendChild(ya(ab,Xa,xa,La,Ba));La=!La}}for(Ma=0;Ma<pa.length;Ma++)for(xa=pa[Ma],F=xa.parentRow,S=0;S<xa.values.length;S++)ab=ya(xa.name,xa.values[S],{type:xa.type,parentRow:xa.parentRow,isDeletable:xa.isDeletable,index:S,defVal:xa.defVal,countProperty:xa.countProperty,size:xa.size},0==S%2,xa.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(xa){mxEvent.addListener(xa,
+"mouseenter",function(){xa.style.opacity="1"});mxEvent.addListener(xa,"mouseleave",function(){xa.style.opacity="0.5"})}var S=this.editorUi,ba=S.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var ca="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(" "),
+ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var na=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var ya=document.createElement("div");ya.style.display="inline-block";ya.style.width="6px";ya.style.height="6px";ya.style.marginLeft="4px";ya.style.marginRight="3px";ya.style.borderRadius="3px";ya.style.cursor="pointer";ya.style.background="transparent";ya.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(xa){mxEvent.addListener(ya,"click",mxUtils.bind(this,function(){va(xa)}))})(ra);na.push(ya);ea.appendChild(ya)}var va=mxUtils.bind(this,function(xa){null!=na[xa]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=xa,Da(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(xa){var Ma=mxUtils.bind(this,
+function(Na){var La=mxUtils.button("",mxUtils.bind(this,function(Xa){ba.getModel().beginUpdate();try{for(var x=S.getSelectionState().cells,H=0;H<x.length;H++){for(var P=ba.getModel().getStyle(x[H]),X=0;X<ca.length;X++)P=mxUtils.removeStylename(P,ca[X]);var Z=ba.getModel().isVertex(x[H])?ba.defaultVertexStyle:ba.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Xa)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(Z,
+mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Xa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Xa)||!ba.getModel().isVertex(x[H])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Xa)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
+Na.stroke||mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),ba.getModel().isVertex(x[H])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,
+null))));ba.getModel().setStyle(x[H],P)}}finally{ba.getModel().endUpdate()}}));La.className="geStyleButton";La.style.width="36px";La.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";La.style.margin="0px 6px 6px 0px";if(null!=Na){var Ba="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(Ba=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?La.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+Na.gradient+
+"', GradientType=0)":La.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?La.style.background="url('"+Dialog.prototype.noColorImage+"')":La.style.backgroundColor=""==Na.fill?mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");La.style.border=Na.stroke==mxConstants.NONE?
+Ba+" transparent":""==Na.stroke?Ba+" "+mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ba+" "+(Na.stroke||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&La.setAttribute("title",Na.title)}else{Ba=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+"#000000");La.style.backgroundColor=Ba;La.style.border="1px solid "+ab}La.style.borderRadius="0";U.appendChild(La)});U.innerText="";for(var Oa=0;Oa<xa.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),Ma(xa[Oa])});null==this.format.currentScheme?va(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):va(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var pa=document.createElement("div");pa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(pa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(pa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(pa);F(Aa);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),S=this.editorUi.editor.graph,ba=null;1==F.cells.length&&(ba=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),ba.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),ba.style.width="210px",ba.style.marginBottom="2px",q.appendChild(ba));S=1==F.cells.length?S.view.getState(F.cells[0]):null;null!=S&&null!=S.shape&&null!=S.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
+mxResources.get("editShape")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(U){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft=
+"2px"),q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
+F){var S=Graph.fontMapping[F];null==S&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==S&&(S='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,S));return q};Graph.addFont=function(q,F,S){if(null!=q&&0<q.length&&null!=F&&0<F.length){var ba=q.toLowerCase();if("helvetica"!=ba&&"arial"!=q&&"sans-serif"!=
+ba){var U=Graph.customFontElements[ba];null!=U&&U.url!=F&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=F,"http:"==F.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(F)),U={name:q,url:F,elt:Graph.createFontElement(q,U)},Graph.customFontElements[ba]=U,Graph.recentCustomFonts[ba]=U,F=document.getElementsByTagName("head")[0],null!=S&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=S,U.elt.onerror=S):S()),null!=F&&F.appendChild(U.elt)):null!=S&&S()}else null!=S&&S()}else null!=S&&
+S();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var S=q[F].getAttribute("data-font-src");if(null!=S){var ba="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=ba&&Graph.addFont(ba,S)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var S=mxUtils.getValue(q,
+mxConstants.STYLE_FONTFAMILY,null);null!=S&&Graph.addFont(S,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";
+Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
+F};var S=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):S.apply(this,arguments)};var ba=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var ca=this.graph.getCellStyle(U);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||
+0;ea.marginTop=ca.marginTop||0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return ba.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(t.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,S,ba,U,ca,ea,na,ra,ya,va){B.apply(this,arguments);Graph.processFontAttributes(va)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,S){function ba(){for(var xa=ea.getSelectionCells(),Ma=[],Oa=0;Oa<xa.length;Oa++)ea.isCellVisible(xa[Oa])&&Ma.push(xa[Oa]);ea.setSelectionCells(Ma)}function U(xa){ea.setHiddenTags(xa?[]:na.slice());
+ba();ea.refresh()}function ca(xa,Ma){ya.innerText="";if(0<xa.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=xa&&0<xa.length)for(var La=0;La<xa.length;La++)(function(Ba){var ab=0>mxUtils.indexOf(ea.hiddenTags,Ba),Xa=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var H=document.createElement("img");
+H.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);H.setAttribute("title",mxResources.get(ab?"hideIt":"show",[Ba]));mxUtils.setOpacity(H,ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";x.appendChild(H);mxEvent.addListener(H,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(ea.hiddenTags,Ba)):(ea.toggleHiddenTag(Ba),ba(),ea.refresh());mxEvent.consume(X)});Xa.appendChild(x);x=document.createElement("td");
+x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",Ba);a=document.createElement("a");mxUtils.write(a,Ba);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var Z=ea.getCellsForTags([Ba],null,null,!0);ea.isEnabled()?ea.setSelectionCells(Z):ea.highlightCells(Z)}else if(ab&&
+0<ea.hiddenTags.length)U(!0);else{Z=na.slice();var fa=mxUtils.indexOf(Z,Ba);Z.splice(fa,1);ea.setHiddenTags(Z);ba();ea.refresh()}mxEvent.consume(X)});Xa.appendChild(x);if(ea.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==Ma){x.style.align="center";x.style.width="16px";H=document.createElement("img");H.setAttribute("src",Editor.crossImage);H.setAttribute("title",mxResources.get("removeIt",[Ba]));mxUtils.setOpacity(H,
+ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";mxEvent.addListener(H,"click",function(X){var Z=mxUtils.indexOf(na,Ba);0<=Z&&na.splice(Z,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ba]);ea.refresh();mxEvent.consume(X)});x.appendChild(H)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=Ma&&0<=mxUtils.indexOf(Ma,
+Ba);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[Ba]));mxEvent.addListener(P,"change",function(X){P.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ba]):ea.removeTagsForCells(ea.getSelectionCells(),[Ba]);mxEvent.consume(X)});x.appendChild(P)}Xa.appendChild(x)}Na.appendChild(Xa)})(xa[La]);Oa.appendChild(Na);ya.appendChild(Oa)}}var ea=this,na=ea.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect=
+"none";ra.style.overflow="hidden";ra.style.padding="10px";ra.style.height="100%";var ya=document.createElement("div");ya.style.boxSizing="border-box";ya.style.borderRadius="4px";ya.style.userSelect="none";ya.style.overflow="auto";ya.style.position="absolute";ya.style.left="10px";ya.style.right="10px";ya.style.top="10px";ya.style.border=ea.isEnabled()?"1px solid #808080":"none";ya.style.bottom=ea.isEnabled()?"48px":"10px";ra.appendChild(ya);var va=mxUtils.button(mxResources.get("reset"),function(xa){ea.setHiddenTags([]);
+mxEvent.isShiftDown(xa)||(na=ea.hiddenTags.slice());ba();ea.refresh()});va.setAttribute("title",mxResources.get("reset"));va.className="geBtn";va.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=S&&S(na,function(xa){na=xa;pa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";ea.addListener(mxEvent.ROOT,function(){na=ea.hiddenTags.slice()});var pa=mxUtils.bind(this,function(xa,Ma){if(q()){xa=ea.getAllTags();for(Ma=0;Ma<
+xa.length;Ma++)0>mxUtils.indexOf(na,xa[Ma])&&na.push(xa[Ma]);na.sort();ea.isSelectionEmpty()?ca(na):ca(na,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,pa);ea.model.addListener(mxEvent.CHANGE,pa);ea.addListener(mxEvent.REFRESH,pa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
+Aa.style.left="10px";ea.isEnabled()&&(Aa.appendChild(va),Aa.appendChild(Da),ra.appendChild(Aa));return{div:ra,refresh:pa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var S=Graph.customFontElements[F];q.push({name:S.name,url:S.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var S=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q,
+F);for(var ba=0;ba<S.length;ba++)S[ba].getAttribute("face")==q&&S[ba].getAttribute("data-font-src")!=F&&S[ba].setAttribute("data-font-src",F)}};var O=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return O.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(S){null!=window.console&&console.log("Error in vars URL parameter: "+S)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=J.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa){var xa=null,Ma=null,Oa=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(xa=this.stylesheet,Ma=this.shapeForegroundColor,Oa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=y.apply(this,arguments),La=this.getCustomFonts();if(va&&0<La.length){var Ba=Na.ownerDocument,ab=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"style"):Ba.createElement("style");null!=Ba.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Xa="",x="",H=0;H<La.length;H++){var P=
+La[H].name,X=La[H].url;Graph.isCssFontUrl(X)?Xa+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(Ba.createTextNode(Xa+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=xa&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=Ma,this.stylesheet=xa,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){da.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
+arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var S=q.view.scale,ba=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*S,q.y+4*S,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==ba&&F.scale==S||(F.bounds=q,F.value=ba,F.scale=
+S,F.redraw())}};var aa=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){aa.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var qa=Graph.prototype.refresh;Graph.prototype.refresh=function(){qa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var sa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){sa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var S=!1,ba=0,U=0,ca=mxUtils.bind(this,function(){S||(S=!0,this.model.beginUpdate())}),ea=
+mxUtils.bind(this,function(){S&&(S=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<ba&&ba--;0==ba&&ra()}),ra=mxUtils.bind(this,function(){if(U<q.length){var ya=this.stoppingCustomActions,va=q[U++],Da=[];if(null!=va.open)if(ea(),this.isCustomLink(va.open)){if(!this.customLinkClicked(va.open))return}else this.openLink(va.open);null==va.wait||ya||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;na()}),ba++,this.pendingWaitThread=
+window.setTimeout(this.pendingExecuteNextAction,""!=va.wait?parseInt(va.wait):1E3),ea());null!=va.opacity&&null!=va.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(va.opacity,!0)),va.opacity.value);null!=va.fadeIn&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeIn,!0)),0,1,na,ya?0:va.fadeIn.delay));null!=va.fadeOut&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeOut,!0)),1,0,na,ya?0:va.fadeOut.delay));null!=
+va.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeIn,!0),!0)));null!=va.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeOut,!0),!1)));null!=va.toggle&&(ca(),this.toggleCells(this.getCellsForAction(va.toggle,!0)));if(null!=va.show){ca();var pa=this.getCellsForAction(va.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(pa),1);this.setCellsVisible(pa,!0)}null!=va.hide&&(ca(),pa=this.getCellsForAction(va.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(pa),
+0),this.setCellsVisible(pa,!1));null!=va.toggleStyle&&null!=va.toggleStyle.key&&(ca(),this.toggleCellStyles(va.toggleStyle.key,null!=va.toggleStyle.defaultValue?va.toggleStyle.defaultValue:"0",this.getCellsForAction(va.toggleStyle,!0)));null!=va.style&&null!=va.style.key&&(ca(),this.setCellStyles(va.style.key,va.style.value,this.getCellsForAction(va.style,!0)));pa=[];null!=va.select&&this.isEnabled()&&(pa=this.getCellsForAction(va.select),this.setSelectionCells(pa));null!=va.highlight&&(pa=this.getCellsForAction(va.highlight),
+this.highlightCells(pa,va.highlight.color,va.highlight.duration,va.highlight.opacity));null!=va.scroll&&(pa=this.getCellsForAction(va.scroll));null!=va.viewbox&&this.fitWindow(va.viewbox,va.viewbox.border);0<pa.length&&this.scrollCellToVisible(pa[0]);if(null!=va.tags){pa=[];null!=va.tags.hidden&&(pa=pa.concat(va.tags.hidden));if(null!=va.tags.visible)for(var Aa=this.getAllTags(),xa=0;xa<Aa.length;xa++)0>mxUtils.indexOf(va.tags.visible,Aa[xa])&&0>mxUtils.indexOf(pa,Aa[xa])&&pa.push(Aa[xa]);this.setHiddenTags(pa);
+this.refresh()}0<Da.length&&(ba++,this.executeAnimations(Da,na,ya?1:va.steps,ya?0:va.delay));0==ba?ra():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=F&&F()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var S=this.getLinkForCell(F);null!=S&&"data:action/json,"==S.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,S));if(this.isHtmlLabel(F)){var ba=document.createElement("div");ba.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var U=
+ba.getElementsByTagName("a"),ca=!1,ea=0;ea<U.length;ea++)S=U[ea].getAttribute("href"),null!=S&&"data:action/json,"==S.substring(0,17)&&(U[ea].setAttribute("href",this.updateCustomLink(q,S)),ca=!0);ca&&this.labelChanged(F,ba.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var S=JSON.parse(F.substring(17));null!=S.actions&&(this.updateCustomLinkActions(q,S.actions),F="data:action/json,"+JSON.stringify(S))}catch(ba){}return F};Graph.prototype.updateCustomLinkActions=
+function(q,F){for(var S=0;S<F.length;S++){var ba=F[S],U;for(U in ba)this.updateCustomLinkAction(q,ba[U],"cells"),this.updateCustomLinkAction(q,ba[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,S){if(null!=F&&null!=F[S]){for(var ba=[],U=0;U<F[S].length;U++)if("*"==F[S][U])ba.push(F[S][U]);else{var ca=q[F[S][U]];null!=ca?""!=ca&&ba.push(ca):ba.push(F[S][U])}F[S]=ba}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,
+null,F));if(null!=q.excludeCells){for(var S=[],ba=0;ba<F.length;ba++)0>q.excludeCells.indexOf(F[ba].id)&&S.push(F[ba]);F=S}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var S=0;S<q.length;S++)if("*"==q[S]){var ba=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(ca){return ca!=ba},ba))}else{var U=this.model.getCell(q[S]);null!=U&&F.push(U)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;
+for(var F=0;F<q.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,S,ba){var U=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},na=0;na<q.length;na++)0<q[na].length&&(ea[q[na]]=!0,ca++);for(na=0;na<F.length;na++)if(S&&this.model.getParent(F[na])==this.model.root||this.model.isVertex(F[na])||this.model.isEdge(F[na])){var ra=this.getTagsForCell(F[na]),ya=!1;if(0<ra.length&&(ra=ra.split(" "),
+ra.length>=q.length)){for(var va=ya=0;va<ra.length&&ya<ca;va++)null!=ea[ra[va]]&&ya++;ya=ya==ca}ya&&(1!=ba||this.isCellVisible(F[na]))&&U.push(F[na])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,S=[],ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);S=[];if(0<U.length){U=U.split(" ");for(var ca={},ea=0;ea<U.length;ea++)if(null==F||null!=F[U[ea]])ca[U[ea]]=
+!0,S.push(U[ea]);F=ca}else return[]}return S};Graph.prototype.getTagsForCells=function(q){for(var F=[],S={},ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);if(0<U.length){U=U.split(" ");for(var ca=0;ca<U.length;ca++)null==S[U[ca]]&&(S[U[ca]]=!0,F.push(U[ca]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){for(var ba=
+this.getTagsForCell(q[S]),U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.trim(F[ea]);""!=na&&0>mxUtils.indexOf(U,na)&&(ba=0<ba.length?ba+" "+na:na,ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",ba)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){var ba=this.getTagsForCell(q[S]);if(0<ba.length){for(var U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.indexOf(U,
+F[ea]);0<=na&&(U.splice(na,1),ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",U.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var S=0;S<q.length;S++)this.model.setVisible(q[S],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(q,F,S,ba){for(var U=0;U<q.length;U++)this.highlightCell(q[U],F,S,ba)};Graph.prototype.highlightCell=function(q,F,S,ba,U){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;S=null!=S?S:1E3;q=this.view.getState(q);var ca=null;null!=q&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+U),ca=new mxCellHighlight(this,F,U,!1),null!=ba&&(ca.opacity=ba),ca.highlight(q),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition",
+"all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},1200)},S));return ca};Graph.prototype.addSvgShadow=function(q,F,S,ba){S=null!=S?S:!1;ba=null!=ba?ba:!0;var U=q.ownerDocument,ca=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"filter"):U.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):U.createElement("feGaussianBlur");ea.setAttribute("in",
+"SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feOffset"):U.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feFlood"):U.createElement("feFlood");ea.setAttribute("flood-color",
+this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result","offsetColor");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feComposite"):U.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feBlend"):U.createElement("feBlend");
+ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);ea=q.getElementsByTagName("defs");0==ea.length?(U=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"defs"):U.createElement("defs"),null!=q.firstChild?q.insertBefore(U,q.firstChild):q.appendChild(U)):U=ea[0];U.appendChild(ca);S||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&ba&&(q.setAttribute("width",
+parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),
+F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var S=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(S),"locked","0"));null!=S&&this.setDefaultParent(S)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=
+[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+
+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
+[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
+STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,
+5)&&(F="mxgraph.sysml"));return F};var V=mxMarker.createMarker;mxMarker.createMarker=function(q,F,S,ba,U,ca,ea,na,ra,ya){if(null!=S&&null==mxMarker.markers[S]){var va=this.getPackageForType(S);null!=va&&mxStencilRegistry.getStencil(va)}return V.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,S,ba,U,ca){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,
+arguments)};PrintDialog.prototype.create=function(q,F){function S(){pa.value=Math.max(1,Math.min(na,Math.max(parseInt(pa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(na,Math.min(parseInt(pa.value),parseInt(Da.value))))}function ba(oa){function ta(Ya,Za,fb){var hb=Ya.useCssTransforms,qb=Ya.currentTranslate,kb=Ya.currentScale,ib=Ya.view.translate,ub=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,
+0),Ya.view.scale=1);var ob=Ya.getGraphBounds(),nb=0,wb=0,lb=za.get(),gb=1/Ya.pageScale,tb=Na.checked;if(tb){gb=parseInt(fa.value);var Cb=parseInt(la.value);gb=Math.min(lb.height*Cb/(ob.height/Ya.view.scale),lb.width*gb/(ob.width/Ya.view.scale))}else gb=parseInt(Oa.value)/(100*Ya.pageScale),isNaN(gb)&&(Ea=1/Ya.pageScale,Oa.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Ea);lb.height=Math.ceil(lb.height*Ea);gb*=Ea;!tb&&Ya.pageVisible?(ob=Ya.getPageLayout(),nb-=ob.x*lb.width,
+wb-=ob.y*lb.height):tb=!0;if(null==Za){Za=PrintDialog.createPrintPreview(Ya,gb,lb,0,nb,wb,tb);Za.pageSelector=!1;Za.mathEnabled=!1;Aa.checked&&(Za.isCellVisible=function(pb){return Ya.isCellSelected(pb)});nb=q.getCurrentFile();null!=nb&&(Za.title=nb.getTitle());var xb=Za.writeHead;Za.writeHead=function(pb){xb.apply(this,arguments);mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),pb.writeln("}"),pb.writeln("</style>"));
+null!=q.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(q.editor.fontCss),pb.writeln("</style>"));for(var yb=Ya.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,m=yb[Ab].url;Graph.isCssFontUrl(m)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),pb.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var zb=Za.renderPage;Za.renderPage=function(pb,yb,Ab,c,m,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}nb=null;wb=U.shapeForegroundColor;tb=U.shapeBackgroundColor;lb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(nb=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",
+U.shapeBackgroundColor="#ffffff",U.refresh());Za.open(null,null,fb,!0);U.enableFlowAnimation=lb;null!=nb&&(U.shapeForegroundColor=wb,U.shapeBackgroundColor=tb,U.stylesheet=nb,U.refresh())}else{lb=Ya.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";Za.backgroundColor=lb;Za.autoOrigin=tb;Za.appendGraph(Ya,gb,nb,wb,fb,!0);fb=Ya.getCustomFonts();if(null!=Za.wnd)for(nb=0;nb<fb.length;nb++)wb=fb[nb].name,tb=fb[nb].url,Graph.isCssFontUrl(tb)?Za.wnd.document.writeln('<link rel="stylesheet" href="'+
+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(Za.wnd.document.writeln('<style type="text/css">'),Za.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(wb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),Za.wnd.document.writeln("</style>"))}hb&&(Ya.useCssTransforms=hb,Ya.currentTranslate=qb,Ya.currentScale=kb,Ya.view.translate=ib,Ya.view.scale=ub);return Za}var Ea=parseInt(ua.value)/100;isNaN(Ea)&&(Ea=1,ua.value="100 %");Ea*=.75;var Fa=null,Pa=U.shapeForegroundColor,
+Ra=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(Fa=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Ca=Da.value,Ja=pa.value,Qa=!ya.checked,$a=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ya.checked,Ca,Ja,Na.checked,fa.value,la.value,parseInt(Oa.value)/100,parseInt(ua.value)/100,za.get());else{Qa&&(Qa=Aa.checked||Ca==ra&&Ja==ra);if(!Qa&&null!=q.pages&&q.pages.length){var eb=
+0;Qa=q.pages.length-1;ya.checked||(eb=parseInt(Ca)-1,Qa=parseInt(Ja)-1);for(var cb=eb;cb<=Qa;cb++){var db=q.pages[cb];Ca=db==q.currentPage?U:null;if(null==Ca){Ca=q.createTemporaryGraph(U.stylesheet);Ca.shapeForegroundColor=U.shapeForegroundColor;Ca.shapeBackgroundColor=U.shapeBackgroundColor;Ja=!0;eb=!1;var rb=null,mb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ja=db.viewState.pageVisible,eb=db.viewState.mathEnabled,rb=db.viewState.background,mb=db.viewState.backgroundImage,
+Ca.extFonts=db.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=q.createImageForPageLink(mb.originalSrc,db));Ca.background=rb;Ca.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;Ca.pageVisible=Ja;Ca.mathEnabled=eb;var vb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var Ya=vb.apply(this,arguments),Za=this.backgroundImage;if(null!=Za&&null!=Za.width&&null!=Za.height){var fb=this.view.translate,hb=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((fb.x+
+Za.x)*hb,(fb.y+Za.y)*hb,Za.width*hb,Za.height*hb))}return Ya};var Bb=Ca.getGlobalVariable;Ca.getGlobalVariable=function(Ya){return"page"==Ya?db.getName():"pagenumber"==Ya?cb+1:"pagecount"==Ya?null!=q.pages?q.pages.length:1:Bb.apply(this,arguments)};document.body.appendChild(Ca.container);q.updatePageRoot(db);Ca.model.setRoot(db.root)}$a=ta(Ca,$a,cb!=Qa);Ca!=U&&Ca.container.parentNode.removeChild(Ca.container)}}else $a=ta(U);null==$a?q.handleError({message:mxResources.get("errorUpdatingPreview")}):
+($a.mathEnabled&&(Qa=$a.wnd.document,oa&&($a.wnd.IMMEDIATE_PRINT=!0),Qa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),$a.closeDocument(),!$a.mathEnabled&&oa&&PrintDialog.printPreview($a));null!=Fa&&(U.shapeForegroundColor=Pa,U.shapeBackgroundColor=Ra,U.stylesheet=Fa,U.refresh())}}var U=q.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,
+F||mxResources.get("print"));ca.appendChild(ea);var na=1,ra=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ya=document.createElement("input");ya.style.cssText="margin-right:8px;margin-bottom:8px;";ya.setAttribute("value","all");ya.setAttribute("type","radio");ya.setAttribute("name","pages-printdialog");ea.appendChild(ya);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));ea.appendChild(F);
+mxUtils.br(ea);var va=ya.cloneNode(!0);ya.setAttribute("checked","checked");va.setAttribute("value","range");ea.appendChild(va);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");ea.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type","number");Da.setAttribute("min","1");Da.style.width="50px";ea.appendChild(Da);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));
+ea.appendChild(F);var pa=Da.cloneNode(!0);ea.appendChild(pa);mxEvent.addListener(Da,"focus",function(){va.checked=!0});mxEvent.addListener(pa,"focus",function(){va.checked=!0});mxEvent.addListener(Da,"change",S);mxEvent.addListener(pa,"change",S);if(null!=q.pages&&(na=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){ra=F+1;Da.value=ra;pa.value=ra;break}Da.setAttribute("max",na);pa.setAttribute("max",na);q.isPagesEnabled()?1<na&&(ca.appendChild(ea),va.checked=
+!0):va.checked=!0;mxUtils.br(ea);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var xa=document.createElement("div");xa.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",xa.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",ea.appendChild(Aa));F=document.createElement("span");
+mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var Ma=document.createElement("input");Ma.style.marginRight="8px";Ma.setAttribute("value","adjust");Ma.setAttribute("type","radio");Ma.setAttribute("name","printZoom");xa.appendChild(Ma);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));xa.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
+Oa.style.width="50px";xa.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){Ma.checked=!0});ca.appendChild(xa);ea=ea.cloneNode(!1);var Na=Ma.cloneNode(!0);Na.setAttribute("value","fit");Ma.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);ea.appendChild(F);xa=document.createElement("table");xa.style.display="inline-block";var La=document.createElement("tbody"),Ba=document.createElement("tr"),
+ab=Ba.cloneNode(!0),Xa=document.createElement("td"),x=Xa.cloneNode(!0),H=Xa.cloneNode(!0),P=Xa.cloneNode(!0),X=Xa.cloneNode(!0),Z=Xa.cloneNode(!0);Xa.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Xa,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min","1");fa.setAttribute("type","number");fa.style.width="40px";x.appendChild(fa);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+H.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var la=fa.cloneNode(!0);X.appendChild(la);mxEvent.addListener(fa,"focus",function(){Na.checked=!0});mxEvent.addListener(la,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));Z.appendChild(F);Ba.appendChild(Xa);Ba.appendChild(x);Ba.appendChild(H);ab.appendChild(P);ab.appendChild(X);ab.appendChild(Z);La.appendChild(Ba);La.appendChild(ab);xa.appendChild(La);ea.appendChild(xa);
+ca.appendChild(ea);ea=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));ea.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var za=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));ea.appendChild(F);var ua=
+document.createElement("input");ua.style.cssText="margin:0 8px 0 8px;";ua.setAttribute("value","100 %");ua.style.width="60px";ea.appendChild(ua);ca.appendChild(ea);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&F.appendChild(ea);q.isOffline()||(xa=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+xa.className="geBtn",F.appendChild(xa));PrintDialog.previewEnabled&&(xa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();ba(!1)}),xa.className="geBtn",F.appendChild(xa));xa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();ba(!0)});xa.className="geBtn gePrimaryBtn";F.appendChild(xa);q.editor.cancelFirst||F.appendChild(ea);ca.appendChild(F);this.container=ca};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
+function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
+this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var W=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{W.getContext("2d").drawImage(ka,
+0,0);var q=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
-function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
-d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,f,k,z,t,B,I){B=null!=B?B:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var O=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(e);(new Image).src=O+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=z?":colno:"+
+encodeURIComponent(z):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(J){}try{I||null==window.console||console.error(B,e,f,k,z,t)}catch(J){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
+function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
+e)}}catch(k){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
-d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
-H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
-3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
-G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
-t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
-la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
-fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
-Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
-f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
-I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
-D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&
-null!=t.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
-Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
-"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
-d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
-"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
-D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
-"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
-d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
-this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
-D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
-this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
-(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
-D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
-"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
-T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
-if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
-D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
-oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
-y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
-"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
-d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
-d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
-H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
-f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
-mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
-return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
-(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border",
-"0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
-this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
-18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
-w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
-M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
-null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
-6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
-da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
-0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
-"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
-0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
-d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
-41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
-Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
-f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{G?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
-0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
-ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
-I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
-G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
-D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
-G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
-document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
-2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
-"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
-var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
-420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
-mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
-g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
-var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
-t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
-":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
-"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
-f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,
-mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
-"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
-mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
-"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
-function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
-function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
-300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,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%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
-fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
-!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
-document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";
-t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
-x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
-var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
-"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
-"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
-"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
-"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
-G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
-mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
-"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
-T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
-Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
-null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
-"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
-280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(y?"&edit=_blank":
-"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
-function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
-arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
-f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
-y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
-ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
-this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
-H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
-null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
-M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
-var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
-if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
-function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
-null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
-" "),mxUtils.bind(this,function(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
-null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
-oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
-EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
-"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
-this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
-H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
-d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
-this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
-function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
-function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
-va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
-3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
-var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
-ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(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(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
-function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
-function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(t,
-!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):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
-G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
-function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
-return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
-na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
-config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
-"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
-ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
-1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
-this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
-V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
-H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
-null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
-var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
-fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
-this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
-mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
-na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
-function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
-N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.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,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
-null!=fa&&(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)})),fa.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
-null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
-ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
-this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
-ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
-function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
-null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&
-!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
-5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
-"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var G=mxEvent.getSource(t);
-null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
-this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
-"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
-function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
-"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
-H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
-"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
-this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
-(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
-function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
-(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
-this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
-"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
-y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
-H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
-[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
-G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
-"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
-"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
-null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
-d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
-"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
-mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(t){}try{var f=document.createElement("canvas"),k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var t=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(B){}};k.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(t){}try{f=document.createElement("canvas");f.width=f.height=1;var z=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==z.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(e,f,k){return this.editor.graph.openLink(e,f,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,k){localStorage.setItem(e,f);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(e,f,k){var z=null==e||null==f;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=t.spin;t.spin=function(O,J){var y=!1;this.active||(B.call(this,O),this.active=!0,null!=J&&(z&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),y=document.createElement("div"),
+y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,e)+"px",y.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=J.substring(J.length-3,J.length)&&"!"!=J.charAt(J.length-1)&&(J+="..."),y.innerHTML=J,O.appendChild(y),t.status=y),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(O,J)}));this.stop();return ia}),y=!0);return y};var I=t.stop;t.stop=function(){I.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};
+return t};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(z){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,z=this.editor.graph,t=this;f.getFunction=function(B){if(z.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var I=t.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&t.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&t.movePage(I,0)};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,t.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&t.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&t.selectPage(t.pages[0])};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.selectNextPage(!0)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+z.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?k.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var k=e.indexOf("&lt;mxfile ");if(0<=k){var z=e.lastIndexOf("&lt;/mxfile&gt;");z>k&&(f=e.substring(k,z+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var t=mxUtils.parseXml(e),B=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,z=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var t=z.length-1;0<=t;t--){var B=this.updatePageRoot(new DiagramPage(z[t]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,B,0==t?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=k)for(t=0;t<k.length;t++)f.model.execute(new ChangePage(this,k[t],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,k,z,t,B,I,O,J,y,ia){f=null!=f?f:this.editor.graph;t=null!=t?t:!1;J=null!=J?J:!0;var da=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var ja="_blank";else da=ja=z;if(null==e)return"";var aa=e;if("mxfile"!=aa.nodeName.toLowerCase()){if(ia){var qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
+qa.appendChild(e)}else{qa=Graph.zapGremlins(mxUtils.getXml(e));aa=Graph.compress(qa);if(Graph.decompress(aa)!=qa)return qa;qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,aa)}aa=e.ownerDocument.createElement("mxfile");aa.appendChild(qa)}y?(aa=aa.cloneNode(!0),aa.removeAttribute("modified"),aa.removeAttribute("host"),aa.removeAttribute("agent"),aa.removeAttribute("etag"),aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),
+aa.removeAttribute("type")):(aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),aa.removeAttribute("pages"),aa.removeAttribute("type"),mxClient.IS_CHROMEAPP?aa.setAttribute("host","Chrome"):EditorUi.isElectronApp?aa.setAttribute("host","Electron"):aa.setAttribute("host",window.location.hostname),aa.setAttribute("modified",(new Date).toISOString()),aa.setAttribute("agent",navigator.appVersion),aa.setAttribute("version",EditorUi.VERSION),aa.setAttribute("etag",
+Editor.guid()),e=null!=k?k.getMode():this.mode,null!=e&&aa.setAttribute("type",e),1<aa.getElementsByTagName("diagram").length&&null!=this.pages&&aa.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(aa):mxUtils.getXml(aa);if(!B&&!t&&(I||null!=k&&/(\.html)$/i.test(k.getTitle())))ia=this.getHtml2(mxUtils.getXml(aa),f,null!=k?k.getTitle():null,ja,da);else if(B||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(z=null),
+ia=this.getEmbeddedSvg(ia,f,z,null,O,J,da);return ia};EditorUi.prototype.getXmlFileData=function(e,f,k,z){e=null!=e?e:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.compressXml;var t=this.editor.getGraphXml(e,z);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(J){var y=J.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&k?(y=mxUtils.trim(mxUtils.getTextContent(J)),J=J.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&J.appendChild(mxUtils.parseXml(y).documentElement))):
+null==y||k?J=J.cloneNode(!0):(J=J.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(y)));t.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var O=new mxCodec(mxUtils.createXmlDocument());O=O.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+O,null,z);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(O));delete B.needsUpdate}else z&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(O=new mxCodec(mxUtils.createXmlDocument()),O=O.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,O,null,z),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(O))));e(I)}return t};EditorUi.prototype.anonymizeString=function(e,f){for(var k=[],z=0;z<e.length;z++){var t=e.charAt(z);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));
+e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(B){e[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var z in e[EditorUi.DIFF_UPDATE]){var t=e[EditorUi.DIFF_UPDATE][z];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(B){var I=t.cells[B];if(null!=I){for(var O in I)null!=I[O].value&&(I[O].value="["+I[O].value.length+"]"),null!=I[O].xmlValue&&(I[O].xmlValue="["+I[O].xmlValue.length+"]"),null!=I[O].style&&(I[O].style=
+"["+I[O].style.length+"]"),mxUtils.isEmptyObject(I[O])&&delete I[O];mxUtils.isEmptyObject(I)&&delete t.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete e[EditorUi.DIFF_UPDATE][z]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&
+e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,f));if(null!=e.childNodes)for(k=0;k<e.childNodes.length;k++)this.anonymizeAttributes(e.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+
+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(e,f,k,z,t,B,I,
+O,J,y,ia){t=null!=t?t:!0;B=null!=B?B:!1;var da=this.editor.graph;if(f||!e&&null!=J&&/(\.svg)$/i.test(J.getTitle())){var ja=null!=da.themes&&"darkTheme"==da.defaultThemeName;y=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var aa=da.getGlobalVariable;da=this.createTemporaryGraph(ja?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(sa){return"page"==sa?qa.getName():"pagenumber"==sa?1:aa.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}I=null!=I?I:this.getXmlFileData(t,B,y,ia);J=null!=J?J:this.getCurrentFile();e=this.createFileData(I,da,J,window.location.href,e,f,k,z,t,O,y);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return e};EditorUi.prototype.getHtml=
+function(e,f,k,z,t,B){B=null!=B?B:!0;var I=null,O=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var J=f.view.scale;B=Math.floor(I.x/J-f.view.translate.x);J=Math.floor(I.y/J-f.view.translate.y);I=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(O=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",B);e.setAttribute("y0",J)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
+"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=z&&e.setAttribute("edit",z));null!=t&&(t=t.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";z=Graph.compress(e);Graph.decompress(z)!=e&&(z=encodeURIComponent(e));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?
+"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+z+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+O+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,k,z,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\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(e))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
+null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){k=null;this.fileNode=f;this.pages=[];for(var z=0;z<e.length;z++)null==
+e[z].getAttribute("id")&&e[z].setAttribute("id",z),f=new DiagramPage(e[z]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[z+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(k=f);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");f={};for(z=0;z<t.length;z++)f[t[z]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(z=0;z<I.length;z++){var O=I[z];B.setVisible(O,f[O.id]||!1)}}catch(J){}};EditorUi.prototype.getBaseFilename=function(e){var f=
+this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
+function(e,f,k,z,t,B,I,O,J,y,ia,da){try{z=null!=z?z:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!t),aa=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,z,t,null,null,null,f);this.saveData(aa,e,qa,"text/xml")}else if("html"==e)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(aa,e,qa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==e)aa=ja+".png";else if("jpeg"==e)aa=ja+".jpg";else if("remoteSvg"==e){aa=ja+".svg";e="svg";var sa=parseInt(J);"string"===typeof O&&0<O.indexOf("%")&&(O=parseInt(O)/100);if(0<sa){var L=this.editor.graph,V=L.getGraphBounds();var T=Math.ceil(V.width*O/L.view.scale+2*sa);var Y=Math.ceil(V.height*O/L.view.scale+2*sa)}}this.saveRequest(aa,e,mxUtils.bind(this,function(S,ba){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ca=this.createDownloadRequest(S,
+e,z,ba,I,t,O,J,y,ia,da,T,Y);this.editor.graph.pageVisible=U;return ca}catch(ea){this.handleError(ea)}}))}else{var W=null,ka=mxUtils.bind(this,function(S){S.length<=MAX_REQUEST_SIZE?this.saveData(aa,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,z);k&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(S){this.spinner.stop();ka(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(S))})))}else aa=ja+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(S){this.spinner.stop();ka(S)}),z)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){var aa=this.editor.graph,qa=aa.getGraphBounds();k=this.getFileData(!0,null,null,
+null,k,0==B?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var sa="",L="";if(qa.width*qa.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==B&&(L="&allPages=1"));"xmlpng"==f&&(y="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){sa="&from="+B;break}B=aa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?
+t||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;t={globalVars:aa.getExportVariables()};J&&(t.grid={size:aa.gridSize,steps:aa.view.gridSteps,color:aa.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+sa+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+z+"&embedXml="+y+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=I?
+"&scale="+I:"")+(null!=O?"&border="+O:"")+(da&&isFinite(da)?"&w="+da:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,k){var z=window.location.hash,t=mxUtils.bind(this,function(I){var O=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<O.length&&(O+="\n"),O+=I);I=new LocalFile(this,"csv"!=e.format&&0<O.length?O:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return z};this.fileLoaded(I);"csv"==e.format&&this.importCsv(O,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var J=null!=e.interval?parseInt(e.interval):6E4,y=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ja===this.currentPage&&(200<=aa.getStatus()&&
+300>=aa.getStatus()?(this.updateDiagram(aa.getText()),da()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(y);y=window.setTimeout(ia,J)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ia()}));da();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var B=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){t(I)}),
+mxUtils.bind(this,function(I){null!=k&&k(I)}))}else t("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var W=new mxCellOverlay(Y.image||t.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);W.addListener(mxEvent.CLICK,function(ka,q){z.alert(Y.tooltip)});return W}var k=null,z=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var t=this.editor.graph,B=t.getModel();B.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
+e;){if("update"==e.nodeName){var O=B.getCell(e.getAttribute("id"));if(null!=O){try{var J=e.getAttribute("value");if(null!=J){var y=mxUtils.parseXml(J).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))B.setValue(O,y);else for(var ia=y.attributes,da=0;da<ia.length;da++)t.setAttributeForCell(O,ia[da].nodeName,0<ia[da].nodeValue.length?ia[da].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+O.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&t.model.setStyle(O,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+O.id+": "+Y)}try{var aa=e.getAttribute("icon");if(null!=aa){var qa=0<aa.length?JSON.parse(aa):null;null!=qa&&qa.append||t.removeCellOverlays(O);null!=qa&&t.addCellOverlay(O,f(qa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}try{var sa=e.getAttribute("geometry");if(null!=sa){sa=JSON.parse(sa);var L=t.getCellGeometry(O);if(null!=L){L=L.clone();for(key in sa){var V=parseFloat(sa[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(sa[key])}t.model.setGeometry(O,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}}}else if("model"==e.nodeName){for(var T=e.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(new mxCodec(e.firstChild)).decode(T,B)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(t.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))t.view.translate=
+new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return k};EditorUi.prototype.getCopyFilename=function(e,f){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var z=k.lastIndexOf(".");0<=z&&(e=k.substring(z),k=k.substring(0,z));if(f){f=k;var t=new Date;
+k=t.getFullYear();z=t.getMonth()+1;var B=t.getDate(),I=t.getHours(),O=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+z+"-"+B+"-"+I+"-"+O+"-"+t))}return k=mxResources.get("copyOf",[k])+e};EditorUi.prototype.fileLoaded=function(e,f){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
+if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
+null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
+z=!0;if(!this.isOffline()&&null!=e.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(O){}e=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||t():t()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else t();return z};EditorUi.prototype.getHashValueForPages=function(e,f){var k=0,z=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<e.length;B++){this.updatePageRoot(e[B]);var I=
+e[B].node.cloneNode(!1);I.removeAttribute("name");z.root=e[B].root;var O=t.encode(z);this.editor.graph.saveViewState(e[B].viewState,O,!0);O.removeAttribute("pageWidth");O.removeAttribute("pageHeight");I.appendChild(O);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(I,function(J,y,ia,da){return!da||"mxGeometry"!=J.nodeName&&"mxPoint"!=J.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?da&&"mxCell"==J.nodeName&&
+"previous"==y?null:ia:Math.round(ia)},f)<<0}return k};EditorUi.prototype.hashValue=function(e,f,k){var z=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(z^=this.hashValue(e.nodeName,f,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var t=0;t<e.attributes.length;t++){var B=e.attributes[t].name,I=null!=f?f(e,B,e.attributes[t].value,!0):e.attributes[t].value;null!=I&&(z^=this.hashValue(B,
+f,k)+this.hashValue(I,f,k))}}if(null!=e.childNodes)for(t=0;t<e.childNodes.length;t++)z=(z<<5)-z+this.hashValue(e.childNodes[t],f,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=k&&(k.byteCount+=e.length);for(t=0;t<e.length;t++)f=(f<<5)-f+e.charCodeAt(t)<<0;z^=f}return z};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,k,z,t,B,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(e));f.appendChild(k);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
+if(null==e){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(e=k[k.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;k=f.lastChild;var z=k.previousSibling;f.insertBefore(k,e);f.insertBefore(z,k)};EditorUi.prototype.loadLibrary=function(e,f){var k=mxUtils.parseXml(e.getData());if("mxlibrary"==k.documentElement.nodeName){var z=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(e,z,k.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,k,z){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var t=this.sidebar.palettes[e.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var B=null,I=mxUtils.bind(this,function(T,Y){0==T.length&&e.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(T,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var O=this.sidebar.addPalette(e.getHash(),k,null!=z?z:!0,mxUtils.bind(this,function(T){I(f,T)}));this.repositionLibrary(t);var J=O.parentNode.previousSibling;z=J.getAttribute("title");
+null!=z&&0<z.length&&".scratchpad"!=e.title&&J.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+z);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";J.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var da=null;if(".scratchpad"!=e.title||this.closableScratchpad)y.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(T){if(!mxEvent.isConsumed(T)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(T)}}));
+if(e.isEditable()){var ja=this.editor.graph,aa=null,qa=mxUtils.bind(this,function(T){this.showLibraryDialog(e.getTitle(),O,f,e,e.getMode());mxEvent.consume(T)}),sa=mxUtils.bind(this,function(T){e.setModified(!0);e.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=ia.cloneNode(!1),aa.setAttribute("src",Editor.spinImage),aa.setAttribute("title",mxResources.get("saving")),aa.style.cursor="default",aa.style.marginRight="2px",aa.style.marginTop="-2px",y.insertBefore(aa,y.firstChild),
+J.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&(aa.parentNode.removeChild(aa),J.style.paddingRight=18*y.childNodes.length+"px")})):null==da&&(da=ia.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),y.insertBefore(da,y.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
+LocalLibrary,!0,function(){null==da||e.isModified()||(J.style.paddingRight=18*y.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(Y)})),J.style.paddingRight=18*y.childNodes.length+"px")}),L=mxUtils.bind(this,function(T,Y,W,ka){T=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(T)));for(var q=0;q<T.length;q++){var F=ja.getCellGeometry(T[q]);null!=F&&F.translate(-Y.x,-Y.y)}O.appendChild(this.sidebar.createVertexTemplateFromCells(T,Y.width,Y.height,ka||"",!0,null,
+!1));T={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(T))),w:Y.width,h:Y.height};null!=ka&&(T.title=ka);f.push(T);sa(W);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),V=mxUtils.bind(this,function(T){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(T),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),W=ja.view.getBounds(Y),
+ka=ja.view.scale;W.x/=ka;W.y/=ka;W.width/=ka;W.height/=ka;W.x-=ja.view.translate.x;W.y-=ja.view.translate.y;L(Y,W)}mxEvent.consume(T)});mxEvent.addGestureListeners(O,function(){},mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),O.style.backgroundColor="#f1f3f4",O.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(T))}),
+mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(O.style.backgroundColor="",O.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(T),mxEvent.consume(T))}));mxEvent.addListener(O,"mouseleave",mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
+O.style.backgroundColor="",O.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(T){O.style.backgroundColor="#f1f3f4";T.dataTransfer.dropEffect="copy";O.style.cursor="copy";this.sidebar.hideTooltip();T.stopPropagation();T.preventDefault()})),mxEvent.addListener(O,"drop",mxUtils.bind(this,function(T){O.style.cursor="";O.style.backgroundColor="";0<T.dataTransfer.files.length&&this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,
+mxUtils.bind(this,function(Y,W,ka,q,F,S,ba,U,ca){if(null!=Y&&"image/"==W.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,S),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,S),T,mxEvent.isAltDown(T)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var ea=!1,na=mxUtils.bind(this,function(ra,
+ya){null!=ra&&"application/pdf"==ya&&(ya=Editor.extractGraphModelFromPdf(ra),null!=ya&&0<ya.length&&(ra=ya));if(null!=ra)if(ra=mxUtils.parseXml(ra),"mxlibrary"==ra.documentElement.nodeName)try{var va=JSON.parse(mxUtils.getTextContent(ra.documentElement));I(va,O);f=f.concat(va);sa(T);this.spinner.stop();ea=!0}catch(xa){}else if("mxfile"==ra.documentElement.nodeName)try{var Da=ra.documentElement.getElementsByTagName("diagram");for(va=0;va<Da.length;va++){var pa=this.stringToCells(Editor.getDiagramNodeXml(Da[va])),
+Aa=this.editor.graph.getBoundingBoxFromGeometry(pa);L(pa,new mxRectangle(0,0,Aa.width,Aa.height),T)}ea=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}ea||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=ca&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(ca,function(ra){na(ra,"text/xml")},null,ba):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(Y,ba)&&null!=ca?this.isExternalDataComms()?this.parseFile(ca,mxUtils.bind(this,function(ra){4==ra.readyState&&(this.spinner.stop(),200<=ra.status&&299>=ra.status?na(ra.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ra.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,W)}}));T.stopPropagation();T.preventDefault()})),
+mxEvent.addListener(O,"dragleave",function(T){O.style.cursor="";O.style.backgroundColor="";T.stopPropagation();T.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));y.insertBefore(ia,y.firstChild);mxEvent.addListener(ia,"click",qa);mxEvent.addListener(O,"dblclick",function(T){mxEvent.getSource(T)==O&&qa(T)});z=ia.cloneNode(!1);z.setAttribute("src",Editor.plusImage);z.setAttribute("title",mxResources.get("add"));y.insertBefore(z,
+y.firstChild);mxEvent.addListener(z,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(z=document.createElement("span"),z.setAttribute("title",mxResources.get("help")),z.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(z,"?"),mxEvent.addGestureListeners(z,mxUtils.bind(this,function(T){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(T)})),y.insertBefore(z,y.firstChild))}J.appendChild(y);J.style.paddingRight=
+18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var k=0;k<e.length;k++){var z=e[k],t=z.data;if(null!=t){t=this.convertDataUri(t);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==z.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+t,z.w,z.h,"",z.title||"",!1,null,!0))}else null!=z.xml&&(t=this.stringToCells(Graph.decompress(z.xml)),0<t.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(t,
+z.w,z.h,z.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};"1"!=urlParams["live-ui"]&&EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,k,
+z,t,B,I){e=new ImageDialog(this,e,f,k,z,t,B,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(k,z){z||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,k,z,t){e=new LibraryDialog(this,
+e,f,k,z,t);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));e.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");
+e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var k=f.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(z){z.preventDefault()}));mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(z){this.actions.get("shapes").funct();mxEvent.consume(z)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,k,z,t,B,I){var O=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,
+e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(aa){}if(null!=J||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=J){null!=J.retry&&(y=mxResources.get("cancel"),ia=function(){O();J.retry()});if(404==J.code||404==J.status||403==J.code){I=403==J.code?null!=J.message?mxUtils.htmlEntities(J.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=t?null:null!=B?B:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==J.code||404==J.status)){da="#U"==
+da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(e,f,k,z,t)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function aa(){V.innerText="";for(var T=0;T<qa.length;T++){var Y=document.createElement("option");mxUtils.write(Y,qa[T].displayName);Y.value=T;V.appendChild(Y);Y=document.createElement("option");
+Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,"<"+qa[T].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=qa.length;V.appendChild(Y)}var qa=this.drive.getUsersList(),sa=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");sa.appendChild(L);var V=document.createElement("select");V.style.width="200px";aa();
+mxEvent.addListener(V,"change",mxUtils.bind(this,function(){var T=V.value,Y=qa.length!=T;Y&&this.drive.setUser(qa[T]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(qa=this.drive.getUsersList(),aa())}),mxUtils.bind(this,function(W){this.handleError(W)}),!0)}));sa.appendChild(V);sa=new CustomDialog(this,sa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(sa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();
+null!=k&&k()}),480,150);return}}null!=J.message?I=""==J.message&&null!=J.name?mxUtils.htmlEntities(J.name):mxUtils.htmlEntities(J.message):null!=J.response&&null!=J.response.error?I=mxUtils.htmlEntities(J.response.error):"undefined"!==typeof window.App&&(J.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):J.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof J&&0<J.length&&(I=mxUtils.htmlEntities(J)))}var ja=B=null;null!=J&&null!=J.helpLink?
+(B=mxResources.get("help"),ja=mxUtils.bind(this,function(){return this.editor.graph.openLink(J.helpLink)})):null!=J&&null!=J.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+J.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(J.ownerEmail))}));this.showError(f,I,y,k,ia,null,null,B,ja,null,null,null,z?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,f,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),
+f);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,f,k,z,t,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=k&&k()},z,t,null,null,null,null,O);this.showDialog(e.container,340,46+O,!0,B);e.init()};EditorUi.prototype.showBanner=function(e,f,k,z){var t=!1;if(!(this.bannerShowing||this["hideBanner"+e]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var B=document.createElement("div");B.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition",
+"all 1s ease");B.className="geBtn gePrimaryBtn";t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(t);t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(z?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(t);mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!z){f.appendChild(I);var O=document.createElement("label");O.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(O,mxResources.get("doNotShowAgain"));f.appendChild(O);
+B.style.paddingBottom="30px";B.appendChild(f)}var J=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||z)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);J()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){J()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(ia){var da=mxEvent.getSource(ia);da!=I&&da!=O?(null!=k&&k(),J(),mxEvent.consume(ia)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,k,z){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<z&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",z));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,k,z,t){var B="jpeg"==k?"jpg":k;z=this.getBaseFilename(z)+(null!=f?".drawio":"")+"."+B;e=this.createImageDataUri(e,
+f,k,t);this.saveData(z,B,e.substring(e.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
+!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,k,z,t,B){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=z?this.base64ToBlob(e,k):new Blob([e],{type:k}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(e,!0):(k.document.write(e),
+k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,k,z);else{var I=document.createElement("a");B=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var O=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(O?parseInt(O[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(z?this.base64ToBlob(e,k):new Blob([e],{type:k}));B?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(J){}}else this.createEchoRequest(e,f,k,z,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,k,z,t,B){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
+k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(z?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var k=e.length,z=Math.ceil(k/1024),t=Array(z),B=0;B<z;++B){for(var I=1024*B,O=Math.min(I+1024,k),J=Array(O-I),y=0;I<O;++y,++I)J[y]=e[I].charCodeAt(0);t[B]=new Uint8Array(J)}return new Blob(t,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,k,z,t,B,I,O){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(B);isLocalStorage&&t++;var J=4>=t?2:6<t?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(y,ia){try{if("_blank"==ia)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,k,z);else if(null!=k&&"text/html"==k.substring(0,9)){var da=new EmbedDialog(this,e);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,y,k,z,null,O):null!=y&&0<y.length&&this.pickFolder(ia,mxUtils.bind(this,function(aa){try{this.exportFile(e,y,k,z,ia,aa)}catch(qa){this.handleError(qa)}}))}catch(aa){this.handleError(aa)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,B,I,null,1<t,J,e,k,z);B=this.isServices(t)?t>J?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(e,f,k){var z=window.open("about:blank");null==z||null==z.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),z.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):z.document.write("<html>"+e+"</html>"):z.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),z.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(z){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
+Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;
+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=f.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);
+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(z)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var z=this.editor.graph.getAllTags();f.style.display=0<z.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=e(mxUtils.bind(this,function(z){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var B=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.zIndex;var I=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});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(O){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var J=this.createImageDataUri(O,null,"png");O=document.createElement("img");O.style.maxWidth="140px";O.style.maxHeight="140px";O.style.cursor="pointer";O.style.backgroundColor="white";O.setAttribute("title",mxResources.get("openInNewWindow"));
+O.setAttribute("border","0");O.setAttribute("src",J);this.exportDialog.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.openInNewWindow(J.substring(J.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(z)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,k,z,t){this.isLocalFileSave()?this.saveLocalFile(k,e,z,t,f):this.saveRequest(e,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(k,B,z,t,f,I)}),k,t,z)};EditorUi.prototype.saveRequest=function(e,f,k,z,t,B,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var O=this.getServiceCount(!1);isLocalStorage&&O++;var J=4>=O?2:6<O?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,ia){if("_blank"==
+ia||null!=y&&0<y.length){var da=k("_blank"==ia?null:y,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=da&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?da.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=z)try{this.exportFile(z,y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(aa){this.spinner.stop();this.handleError(aa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<O,J,z,B,t);O=this.isServices(O)?4<O?390:280:160;this.showDialog(e.container,420,O,!0,!0);e.init()};EditorUi.prototype.isServices=
+function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,k,z,t,B){};EditorUi.prototype.pickFolder=function(e,f,k){f(null)};EditorUi.prototype.exportSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();k=null!=k?k:qa;var sa=f?null:this.editor.graph.background;sa==mxConstants.NONE&&(sa=null);null==sa&&0==f&&(sa=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(sa,e,I,O,null,k,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!ja,ia,da);z&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(t?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(W)}))});var T=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,J,null,null,null,!1));aa(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(W){B?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});ja?this.embedFonts(L,
+Y):(this.editor.addFontCss(L),Y(L))}catch(W){this.handleError(W)}};EditorUi.prototype.addRadiobox=function(e,f,k,z,t,B,I){return this.addCheckbox(e,k,z,t,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;var J=document.createElement("input");J.style.marginRight="8px";J.style.marginTop="16px";J.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();J.id=I;null!=O&&J.setAttribute("name",O);k&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);
+z&&J.setAttribute("disabled","disabled");B&&(e.appendChild(J),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",I),e.appendChild(k),t||mxUtils.br(e));return J};EditorUi.prototype.addEditButton=function(e,f){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var z=this.getCurrentFile(),t="";null!=z&&z.getMode()!=App.MODE_DEVICE&&z.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("makeCopy"));B.appendChild(z);z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");B.appendChild(z);e.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,t,mxResources.get("ok"),
+function(O){null!=O?t=O:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===B.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(e,f){function k(){var O=document.createElement("div");O.style.width="100%";O.style.height="100%";O.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(O.style.border="1px solid black",O.style.backgroundColor=B):(O.style.backgroundPosition="center center",O.style.backgroundRepeat="no-repeat",O.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(O)}mxUtils.write(e,mxResources.get("links")+":");var z=document.createElement("select");z.style.width=
+"100px";z.style.padding="0px";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));z.appendChild(t);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),z.appendChild(f));e.appendChild(z);mxUtils.write(e,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(O){this.pickColor(B||"none",function(J){B=J;k()});mxEvent.consume(O)}));k();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return B},getTarget:function(){return z.value},focus:function(){z.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,k,z,t,B,I){I=null!=I?I:[];z&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&I.push("edit="+encodeURIComponent(t)),B&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,k,z,t,B,I,O,J,y){J=this.createUrlParameters(e,f,k,z,t,B,J);e=this.getCurrentFile();f=!0;null!=I?k="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
+O||null==e||e.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&J.push("title="+encodeURIComponent(e.getTitle()));y&&1<k.length&&(J.push("open="+k.substring(1)),k="");return(z&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<J.length?"?"+J.join("&"):"")+k};EditorUi.prototype.createHtml=function(e,f,k,z,t,B,I,O,J,y,ia,da){this.getBasenames();var ja={};""!=t&&t!=mxConstants.NONE&&(ja.highlight=t);"auto"!==z&&(ja.target=z);y||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(ja.zoom=k/100);k=[];I&&(k.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(k.push("zoom"),ja.resize=!0);O&&k.push("layers");J&&k.push("tags");0<k.length&&(y&&k.push("lightbox"),ja.toolbar=k.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";da(f,'<script type="text/javascript" src="'+(0<e.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,f,k,z){var t=document.createElement("div");t.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+t.appendChild(B);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var O=document.createElement("input");O.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";O.setAttribute("value","url");O.setAttribute("type","radio");O.setAttribute("name","type-embedhtmldialog");B=O.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);var J=document.createElement("span");mxUtils.write(J,mxResources.get("includeCopyOfMyDiagram"));
+I.appendChild(J);mxUtils.br(I);I.appendChild(O);J=document.createElement("span");mxUtils.write(J,mxResources.get("publicDiagramUrl"));I.appendChild(J);var y=this.getCurrentFile();null==k&&null!=y&&y.constructor==window.DriveFile&&(J=document.createElement("a"),J.style.paddingLeft="12px",J.style.color="gray",J.style.cursor="pointer",mxUtils.write(J,mxResources.get("share")),I.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));
+B.setAttribute("checked","checked");null==k&&O.setAttribute("disabled","disabled");t.appendChild(I);var ia=this.addLinkSection(t),da=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";t.appendChild(ja);var aa=this.addCheckbox(t,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var qa=qa=this.addCheckbox(t,mxResources.get("allPages"),I,!I),sa=this.addCheckbox(t,mxResources.get("layers"),!0),L=this.addCheckbox(t,mxResources.get("tags"),!0),V=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;I=380;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,V);var Y=T.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?T.getEditSelect().removeAttribute("disabled"):
+T.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,t,mxUtils.bind(this,function(){z(O.checked?k:null,da.checked,ja.value,ia.getTarget(),ia.getColor(),aa.checked,qa.checked,sa.checked,L.checked,V.checked,null!=T?T.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,k,z,t,B,I,O){var J=document.createElement("div");J.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,
+e||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";J.appendChild(y);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));y.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));da.style.marginTop="12px";da.className="geBtn";y.appendChild(da);J.appendChild(y);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));
+y.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(ka){this.spinner.stop();ka=new ErrorDialog(this,null,mxResources.get(null!=ka?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(ka.container,300,80,!0,!1);ka.init()}))}))}var ja=null,aa=null;if(null!=k||null!=z)e+=30,mxUtils.write(J,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",J.appendChild(ja),mxUtils.write(J,mxResources.get("height")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginBottom="10px",aa.value=z+"px",J.appendChild(aa),mxUtils.br(J);var qa=this.addLinkSection(J,B);k=
+null!=this.pages&&1<this.pages.length;var sa=null;if(null==ia||ia.constructor!=window.DriveFile||f)sa=this.addCheckbox(J,mxResources.get("allPages"),k,!k);var L=this.addCheckbox(J,mxResources.get("lightbox"),!0,null,null,!B),V=this.addEditButton(J,L),T=V.getEditInput();B&&(T.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(J,mxResources.get("layers"),!0);Y.style.marginLeft=T.style.marginLeft;Y.style.marginTop="8px";var W=this.addCheckbox(J,mxResources.get("tags"),
+!0);W.style.marginLeft=T.style.marginLeft;W.style.marginBottom="16px";W.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),T.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));T.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,J,mxUtils.bind(this,function(){t(qa.getTarget(),qa.getColor(),null==
+sa?!0:sa.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=aa?aa.value:null,W.checked)}),null,mxResources.get("create"),I,O);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";B.appendChild(I);if(t){mxUtils.write(B,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";B.appendChild(O);mxUtils.write(B,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type",
+"text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";B.appendChild(J);mxUtils.br(B)}var y=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=z?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var da=z?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=da&&
+(da.style.marginBottom="16px");e=new CustomDialog(this,B,mxUtils.bind(this,function(){var ja=parseInt(O.value)/100||1,aa=parseInt(J.value)||0;k(!y.checked,null!=ia?ia.checked:!1,null!=da?da.checked:!1,ja,aa)}),null,e,f);this.showDialog(e.container,300,(t?25:0)+(z?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,k,z,t,B,I,O,J){I=null!=I?I:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var ia=this.editor.graph,da="jpeg"==O?220:300,ja=document.createElement("h3");
+mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(ja);mxUtils.write(y,mxResources.get("zoom")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value=this.lastExportZoom||"100%";y.appendChild(aa);mxUtils.write(y,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type",
+"text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";y.appendChild(qa);mxUtils.br(y);var sa=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
+"8px";e=["selectionOnly","diagram","page"];var T={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);T[e[ja]]=Y}J?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(V),mxUtils.br(y),da+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(sa.checked=!0)})):B&&(y.appendChild(L),mxUtils.write(y,mxResources.get("crop")),
+mxUtils.br(y),da+=30,mxEvent.addListener(sa,"change",function(){sa.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?J&&(sa.style.display="none",sa.nextSibling.style.display="none",sa.nextSibling.nextSibling.style.display="none",da-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(sa,"change",function(){V.value=sa.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(y,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=O),ka=null;Editor.isDarkMode()&&(ka=this.addCheckbox(y,mxResources.get("dark"),!0),da+=26);var q=this.addCheckbox(y,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==O||"jpeg"==O)F=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var S=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=O);S.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight=
+"8px";ba.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),T.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),ea.style.display="inline-block",
+ca.style.display="none"):"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),q.removeAttribute("disabled"),T.page.style.display="",ea.style.display="none",ca.style.display="")}));f&&(y.appendChild(ba),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),da+=60);var ca=document.createElement("select");ca.style.maxWidth="260px";ca.style.marginLeft="8px";ca.style.marginRight=
+"10px";ca.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ca.appendChild(f);var ea=document.createElement("div");mxUtils.write(ea,mxResources.get("LinksLost"));
+ea.style.margin="7px";ea.style.display="none";"svg"==O&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(ca),y.appendChild(ea),mxUtils.br(y),mxUtils.br(y),da+=50);k=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=aa.value;t(aa.value,W.checked,!sa.checked,q.checked,S.checked,ba.checked,qa.value,L.checked,!1,ca.value,null!=F?F.checked:null,null!=ka?ka.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,z);this.showDialog(k.container,
+340,da,!0,!0,null,null,null,null,!0);aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var O=document.createElement("h3");mxUtils.write(O,f);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(O)}var J=this.addCheckbox(B,mxResources.get("fit"),
+!0),y=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&z,!z),ia=this.addCheckbox(B,k),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,da),aa=ja.getEditInput(),qa=1<I.model.getChildCount(I.model.getRoot()),sa=this.addCheckbox(B,mxResources.get("layers"),qa,!qa);sa.style.marginLeft=aa.style.marginLeft;sa.style.marginBottom="12px";sa.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&sa.removeAttribute("disabled"),aa.removeAttribute("disabled")):
+(sa.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&da.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){e(J.checked,y.checked,ia.checked,da.checked,ja.getLink(),sa.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,k,z,t,B,I,O){function J(aa){var qa=" ",sa=
+"";z&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",sa+="cursor:pointer;");e&&(sa+="max-width:100%;");var L=
+"";k&&(L=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');I('<img src="'+aa+'"'+L+(""!=sa?' style="'+sa+'"':"")+qa+"/>")}var y=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var qa=z?this.getFileData(!0):null;aa=this.createImageDataUri(aa,qa,"png");J(aa)}),null,null,null,mxUtils.bind(this,function(aa){O({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,
+null,Editor.defaultBorder);else if(f=this.getFileData(!0),y.width*y.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";k&&(da="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(z?"1":"0")+da+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?J("data:image/png;base64,"+ja.getText()):O({message:mxResources.get("unknownError")})}))}else O({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(e,f,k,z,t,B,I){var O=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),J=O.getElementsByTagName("a");if(null!=J)for(var y=0;y<J.length;y++){var ia=J[y].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==J[y].getAttribute("target")&&J[y].removeAttribute("target")}z&&O.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(O);if(k){var da=" ",ja="";z&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(O,mxUtils.bind(this,function(aa){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ja?' style="'+ja+'"':"")+da+"/>")}))}else ja="",z&&(f=this.getSelectedPageIndex(),O.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(O.getAttribute("width")),t=parseInt(O.getAttribute("height")),O.setAttribute("viewBox","-0.5 -0.5 "+e+" "+t),ja+="max-width:100%;max-height:"+t+"px;",O.removeAttribute("height")),""!=ja&&O.setAttribute("style",ja),this.editor.addFontCss(O),this.editor.graph.mathEnabled&&this.editor.addMathCss(O),I(mxUtils.getXml(O))};EditorUi.prototype.timeSince=
+function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var k=null;if("diagram"==
+e.nodeName)k=e;else if("mxfile"==e.nodeName){var z=e.getElementsByTagName("diagram");if(0<z.length){k=z[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:t.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}z=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(B){}finally{this.editor.graph=z}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
+1,k=0;if(null!=e){if(e.hasAttribute("scale")){var z=parseFloat(e.getAttribute("scale"));!isNaN(z)&&0<z&&(f=z)}e.hasAttribute("border")&&(z=parseInt(e.getAttribute("border")),!isNaN(z)&&0<z&&(k=z))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,f,k,z,t){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,O=null;if(null!=k&&0<k.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),B),O=k;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var J=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&B.setBackgroundImage(y.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?y.getName():"pagenumber"==ia?1:J.apply(this,
+arguments)};document.body.appendChild(B.container);B.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==O&&(O=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ia.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(O));e(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,z,null,B.shadowVisible,null,B,t,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){O=null!=O?O:!0;ia=null!=ia?ia:0;I=null!=J?J:f.background;I==mxConstants.NONE&&(I=null);B=f.getSvg(I,y,ia,null,null,B,null,null,null,f.shadowVisible||da,null,ja,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ia);null!=e&&B.setAttribute("content",e);null!=k&&B.setAttribute("resource",k);var aa=mxUtils.bind(this,
+function(qa){qa=(z?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=t&&t(qa);return qa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=t)this.embedFonts(B,mxUtils.bind(this,function(qa){O?this.editor.convertImages(qa,mxUtils.bind(this,function(sa){aa(sa)})):aa(qa)}));else return aa(B)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),f(e)}catch(z){f(e)}}))}catch(k){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){J=null!=J?J:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var aa=this.editor.graph.isSelectionEmpty();k=null!=k?k:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();
+try{this.saveCanvas(qa,t?this.getFileData(!0,null,null,null,k,O):null,J,null==this.pages||0==this.pages.length,ia)}catch(sa){this.handleError(sa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,k,e||1,f,z,null,null,B,I,y,da,ja)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,k,z,t,B,I){f=null!=
+f?f:0;k=null!=k?k:0;var O=[];try{var J=this.editor.graph;if(null!=e&&0<e.length){J.model.beginUpdate();try{var y=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var da=ia.getElementsByTagName("diagram");if(1==da.length&&!B){if(ia=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(e[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=da[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<da.length){B=[];var aa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[da[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(da[0]),z=!1,aa=1);for(;aa<da.length;aa++){var qa=da[aa].getAttribute("id");da[aa].removeAttribute("id");var sa=this.updatePageRoot(new DiagramPage(da[aa]));e[qa]=da[aa].getAttribute("id");var L=this.pages.length;null==sa.getName()&&sa.setName(mxResources.get("pageWithNumber",
+[L+1]));J.model.execute(new ChangePage(this,sa,sa,L,!0));B.push(sa)}this.updatePageLinks(e,B)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){O=J.importGraphModel(ia,f,k,z);if(null!=O)for(aa=0;aa<O.length;aa++)this.updatePageLinksForCell(e,O[aa]);var V=J.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var T=new ChangePageSetup(this,null,V);T.ignoreColor=!0;J.model.execute(T)}}I&&this.insertHandler(O,null,null,J.defaultVertexStyle,
+J.defaultEdgeStyle,!1,!0)}finally{J.model.endUpdate()}}}catch(Y){if(t)throw Y;this.handleError(Y)}return O};EditorUi.prototype.updatePageLinks=function(e,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(e,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(e,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc=
+"data:page/id,"+k)}}catch(z){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var k=document.createElement("div"),z=this.editor.graph,t=z.getLinkForCell(f);null!=t&&z.setLinkForCell(f,this.updatePageLink(e,t));if(z.isHtmlLabel(f)){k.innerHTML=z.sanitizeHtml(z.getLabel(f));for(var B=k.getElementsByTagName("a"),I=!1,O=0;O<B.length;O++)t=B[O].getAttribute("href"),null!=t&&(B[O].setAttribute("href",this.updatePageLink(e,t)),I=!0);I&&z.labelChanged(f,k.innerHTML)}for(O=0;O<z.model.getChildCount(f);O++)this.updatePageLinksForCell(e,
+z.model.getChildAt(f,O))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var k=e[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var z=JSON.parse(f.substring(17));if(null!=z.actions){for(var t=0;t<z.actions.length;t++){var B=z.actions[t];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);k=e[I];null!=k?B.open="data:page/id,"+k:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(z)}}catch(O){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,k,z,t){z=null!=z?z:e.name;k=null!=k?k:mxUtils.bind(this,function(I){this.handleError(I)});var B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(z);try{var O="UNKNOWN-VISIO",J=z.lastIndexOf(".");if(0<=J&&J<z.length)O=z.substring(J+
+1).toUpperCase();else{var y=z.lastIndexOf("/");0<=y&&y<z.length&&(z=z.substring(y+1))}EditorUi.logEvent({category:O+"-MS-IMPORT-FILE",action:"filename_"+z,label:I?"remote":"local"})}catch(da){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,z);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(z)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=t&&ia.setRequestHeader("x-convert-custom",t);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var da=ia.response;if("text/xml"==da.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(aa){try{f(aa.target.result)}catch(qa){k({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(da)}else this.doImportVisio(da,f,k,z)}catch(aa){k(aa)}else try{""==ia.responseType||
+"text"==ia.responseType?k({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){k({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(aa){k({})}});ia.send(I)}else try{this.doImportVisio(e,f,k,z)}catch(da){k(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(e,f,k){k=null!=k?k:mxUtils.bind(this,function(t){this.handleError(t)});var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,k)}catch(t){k(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
+f,k){var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t=JSON.parse(e);f(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&B.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var I=0;I<t.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(t.svgThumbs[I]));null!=
+t.thumb&&B.push(t.thumb);console.log.apply(console,B)}}catch(O){}}catch(O){null!=window.console&&console.error(O),k(O)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",z)})})})}):mxscript("js/extensions.min.js",z))};EditorUi.prototype.generateMermaidImage=function(e,f,k,z){var t=this,B=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var O=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<O.length){var J=parseFloat(O[0].getAttribute("width")),y=parseFloat(O[0].getAttribute("height"));if(isNaN(J)||isNaN(y))try{var ia=O[0].getAttribute("viewBox").split(/\s+/);J=parseFloat(ia[2]);y=parseFloat(ia[3])}catch(da){J=J||100,y=y||100}k(t.convertDataUri(Editor.createSvgDataUri(I)),J,y)}else z({message:mxResources.get("invalidInput")})}catch(da){z(da)}})}catch(I){z(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(e,f,k,z){function t(O,J,y){c1=O>>2;c2=(O&3)<<4|J>>4;c3=(J&15)<<2|y>>6;c4=y&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(O){if(10>O)return String.fromCharCode(48+O);O-=10;if(26>O)return String.fromCharCode(65+O);O-=26;if(26>O)return String.fromCharCode(97+
+O);O-=26;return 0==O?"-":1==O?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(O){r="";for(i=0;i<O.length;i+=3)r=i+2==O.length?r+t(O.charCodeAt(i),O.charCodeAt(i+1),0):i+1==O.length?r+t(O.charCodeAt(i),0,0):r+t(O.charCodeAt(i),O.charCodeAt(i+1),O.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(O){if(200<=this.status&&300>this.status)if("txt"==
+f)k(this.response);else{var J=new FileReader;J.readAsDataURL(this.response);J.onloadend=function(y){var ia=new Image;ia.onload=function(){try{var da=ia.width,ja=ia.height;if(0==da&&0==ja){var aa=J.result,qa=aa.indexOf(","),sa=decodeURIComponent(escape(atob(aa.substring(qa+1)))),L=mxUtils.parseXml(sa).getElementsByTagName("svg");0<L.length&&(da=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}k(J.result,da,ja)}catch(V){z(V)}};ia.src=J.result};J.onerror=function(y){z(y)}}else z(O)};
+I.onerror=function(O){z(O)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,k){var z=this.editor.graph,t=null;z.getModel().beginUpdate();try{t=z.insertVertex(null,null,"<pre>"+e+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),z.updateCellSize(t,!0)}finally{z.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var J=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var y=Editor.extractGraphModelFromPdf(e);if(null!=
+y&&0<y.length)return this.importXml(y,f,k,B,!0,O)}if(Editor.isPngDataUrl(e)&&(y=Editor.extractGraphModelFromPng(e),null!=y&&0<y.length))return this.importXml(y,f,k,B,!0,O);if("data:image/svg+xml;"==e.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(y=e.substring(e.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(y,f,k,B,!0,O);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
+mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(sa,L,V){J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(sa)+";"))}),I,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),qa=Math.round(ja.width*aa);ja=Math.round(ja.height*
+aa);J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),qa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;J.getModel().beginUpdate();try{ja=J.insertVertex(J.getDefaultParent(),null,e,J.snap(f),J.snap(k),1,1,"text;"+(z?"html=1;":"")),J.updateCellSize(ja),J.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{J.getModel().endUpdate()}J.setSelectionCell(ja)}))}else{e=
+Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,k,B,null,O);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,k,B,null,O))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{J=this.editor.graph;t=null;J.getModel().beginUpdate();try{t=J.insertVertex(J.getDefaultParent(),null,"",J.snap(f),J.snap(k),1,1,"text;whiteSpace=wrap;"+(z?"html=1;":""));
+J.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");t.value=e;J.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var da=J.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=da.width;t.geometry.height=da.height}Graph.isLink(t.value)&&J.setLinkForCell(t,t.value);t.geometry.width+=J.gridSize;t.geometry.height+=
+J.gridSize}finally{J.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
+EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display=
+"none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,O){StorageFile.listFiles(this,"F",I,O)});window.openBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.getFileContent(this,I,O,J)});window.deleteBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.deleteFile(this,I,O,J)});if(!f){var z=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,O){null!=O&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(O)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(J){this.importXml(J,0,0,!0)}),null,O)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!f){var t=this.dialog,B=t.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=z;B.apply(t,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,k){var z=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(B){if(mxUtils.isEmptyObject(B.files))k();else{var I=0,O,J=!1;B.forEach(function(y,ia){y=
+ia.name.toLowerCase();"diagram/diagram.xml"==y?(J=!0,ia.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):k()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>I&&(I=y,O=ia))});0<I?O.async("string").then(function(y){(new XMLHttpRequest).upload&&z.isRemoteFileFormat(y,e.name)?z.isOffline()?z.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):z.parseFileData(y,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+k())}),e.name):k()}):J||k()}},function(B){k(B)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(e,f,k,z,t,B,I,O,J,y,ia,da){y=null!=y?y:!0;var ja=!1,aa=null,qa=mxUtils.bind(this,function(sa){var L=null;null!=sa&&"<mxlibrary"==sa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,sa,I)):L=this.importXml(sa,k,z,y,null,null!=da?mxEvent.isControlDown(da):null);null!=
+O&&O(L)});"image"==f.substring(0,5)?(J=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(aa=this.importXml(f,k,z,y,null,null!=da?mxEvent.isControlDown(da):null),J=!0)),J||(f=this.editor.graph,J=e.indexOf(";"),0<J&&(e=e.substring(0,J)+e.substring(e.indexOf(",",J+1))),y&&f.isGridEnabled()&&(k=f.snap(k),z=f.snap(z)),aa=[f.insertVertex(null,null,"",k,z,t,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,qa)):null!=J&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(J,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,t=mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status?qa(sa.responseText):null!=O&&O(null))}),null!=e?this.parseFileData(e,t,I):this.parseFile(J,
+t,I)):0==e.indexOf("PK")&&null!=J?(ja=!0,this.importZipFile(J,qa,mxUtils.bind(this,function(){aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y);O(aa)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y,null,null!=da?mxEvent.isControlDown(da):null));ja||null==O||O(aa);return aa};EditorUi.prototype.importFiles=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){z=null!=z?z:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var aa=
+null!=f&&null!=k,qa=!0;f=null!=f?f:0;k=null!=k?k:0;var sa=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){sa=!0;break}var T=mxUtils.bind(this,function(){var Y=this.editor.graph,W=Y.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,ca,ea,na,ra,ya,va,Da,pa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+U,va)),null):this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,va,!0)),null):this.importFile(U,ca,ea,na,ra,ya,va,Da,pa,aa,da,ja)}catch(Aa){return this.handleError(Aa),null}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var ka=e.length,q=ka,F=[],S=mxUtils.bind(this,function(U,ca){F[U]=ca;if(0==--q){this.spinner.stop();if(null!=
+O)O(F);else{var ea=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(ea=ea.concat(na))}}finally{Y.getModel().endUpdate()}}B(ea)}}),ba=0;ba<ka;ba++)mxUtils.bind(this,function(U){var ca=e[U];if(null!=ca){var ea=new FileReader;ea.onload=mxUtils.bind(this,function(na){if(null==I||I(ca))if("image/"==ca.type.substring(0,6))if("image/svg"==ca.type.substring(0,9)){var ra=Graph.clipSvgDataUri(na.target.result),ya=ra.indexOf(",");ya=decodeURIComponent(escape(atob(ra.substring(ya+
+1))));var va=mxUtils.parseXml(ya);ya=va.getElementsByTagName("svg");if(0<ya.length){ya=ya[0];var Da=da?null:ya.getAttribute("content");null!=Da&&"<"!=Da.charAt(0)&&"%"!=Da.charAt(0)&&(Da=unescape(window.atob?atob(Da):Base64.decode(Da,!0)));null!=Da&&"%"==Da.charAt(0)&&(Da=decodeURIComponent(Da));null==Da||"<mxfile "!==Da.substring(0,8)&&"<mxGraphModel "!==Da.substring(0,14)?S(U,mxUtils.bind(this,function(){try{if(null!=va){var xa=va.getElementsByTagName("svg");if(0<xa.length){var Ma=xa[0],Oa=Ma.getAttribute("width"),
+Na=Ma.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var La=Ma.getAttribute("viewBox");if(null==La||0==La.length)Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var Ba=La.split(" ");3<Ba.length&&(Oa=parseFloat(Ba[2]),Na=parseFloat(Ba[3]))}ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var ab=Math.min(1,Math.min(z/Math.max(1,Oa)),z/Math.max(1,Na)),Xa=t(ra,ca.type,f+U*W,k+U*W,Math.max(1,
+Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),ca.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Xa[0].geometry.width=Oa;Xa[0].geometry.height=Na;Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var H=ra.indexOf(";");0<H&&(ra=ra.substring(0,H)+ra.substring(ra.indexOf(",",H+1)));Y.setCellStyles("image",ra,[Xa[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}return Xa}}}catch(H){}return null})):
+S(U,mxUtils.bind(this,function(){return t(Da,"text/xml",f+U*W,k+U*W,0,0,ca.name)}))}else S(U,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==ca.type){var pa=da?null:this.extractGraphModelFromPng(na.target.result);if(null!=pa&&0<pa.length){var Aa=new Image;Aa.src=na.target.result;S(U,mxUtils.bind(this,function(){return t(pa,"text/xml",f+U*W,k+U*W,Aa.width,Aa.height,ca.name)}));ya=!0}}ya||(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(na.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,na.target.result,mxUtils.bind(this,function(Ma,Oa,Na){S(U,mxUtils.bind(this,function(){if(null!=Ma&&Ma.length<y){var La=qa&&this.isResampleImageSize(ca.size,ia)?Math.min(1,Math.min(z/Oa,z/Na)):1;return t(Ma,ca.type,f+U*W,k+U*W,Math.round(Oa*La),Math.round(Na*La),ca.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),qa,z,ia,ca.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ra=na.target.result,t(ra,ca.type,f+U*W,k+U*W,240,160,ca.name,function(xa){S(U,function(){return xa})},ca)});/(\.v(dx|sdx?))($|\?)/i.test(ca.name)||/(\.vs(x|sx?))($|\?)/i.test(ca.name)?t(null,ca.type,f+U*W,k+U*W,240,160,ca.name,function(na){S(U,function(){return na})},ca):"image"==ca.type.substring(0,5)||"application/pdf"==ca.type?ea.readAsDataURL(ca):ea.readAsText(ca)}})(ba)});
+if(sa){sa=[];for(V=0;V<e.length;V++)sa.push(e[V]);e=sa;this.confirmImageResize(function(Y){qa=Y;T()},J)}else T()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(e,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+null,t=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();k();e(I)};null==z||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){t(B,!0)},function(B){t(B,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
+!0,!0):t(!1,z)};EditorUi.prototype.parseFile=function(e,f,k){k=null!=k?k:e.name;var z=new FileReader;z.onload=mxUtils.bind(this,function(){this.parseFileData(z.result,f,k)});z.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,k){var z=new XMLHttpRequest;z.open("POST",OPEN_URL);z.setRequestHeader("Content-Type","application/x-www-form-urlencoded");z.onreadystatechange=function(){f(z)};z.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
+action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,k,z,t,B,I){t=null!=t?t:this.maxImageSize;var O=Math.max(1,e.width),J=Math.max(1,e.height);if(z&&this.isResampleImageSize(null!=I?I:f.length,B))try{var y=Math.max(O/t,J/t);if(1<y){var ia=Math.round(O/y),da=Math.round(J/y),ja=document.createElement("canvas");ja.width=ia;ja.height=da;ja.getContext("2d").drawImage(e,0,0,
+ia,da);var aa=ja.toDataURL();if(aa.length<f.length){var qa=document.createElement("canvas");qa.width=ia;qa.height=da;var sa=qa.toDataURL();aa!==sa&&(f=aa,O=ia,J=da)}}}catch(L){}k(f,O,J)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,k){try{var z=new Image;z.onload=function(){z.width=0<z.width?z.width:120;z.height=0<z.height?z.height:120;f(z)};null!=k&&(z.onerror=k);z.src=e}catch(t){if(null!=k)k(t);else throw t;
+}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&
+(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("plantUml")+
+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(W,Y.format,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+ka+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(ka),[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=q,S.height=F,f.cellsResized([L],[S],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:W,format:Y.format}))}finally{f.getModel().endUpdate()}},
+function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(W,Y.config,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",ka,[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=Math.max(S.width,
+q),S.height=Math.max(S.height,F),f.cellsResized([L],[S],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:W,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var k=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var T=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=T)this.editPlantUmlData(L,V,T);else if(T=this.graph.getAttributeForCell(L,"mermaidData"),
+null!=T)this.editMermaidData(L,V,T);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):k.apply(this,arguments)}}catch(W){e.handleError(W)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(T){e.handleError(T)}return V};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=z.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});
+return V};var t=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:
+null;if(null!=L){var T=L.indexOf(",");if(0<T)for(L=L.substring(T+1),V=V.getProperty("patches"),T=0;T<V.length;T++)if(null!=V[T][EditorUi.DIFF_UPDATE]&&null!=V[T][EditorUi.DIFF_UPDATE][L]||null!=V[T][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[T][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var T=B.apply(this,arguments);if(null!=T&&null!=T.originalSrc)if(!V)T={src:T.originalSrc};else if(V&&null!=this.themes&&
+"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,W=this.shapeForegroundColor,ka=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";T=e.createImageForPageLink(T.originalSrc);this.shapeBackgroundColor=ka;this.shapeForegroundColor=W;this.stylesheet=Y}return T};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
+(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var O=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return O.apply(this,arguments)};var J=f.addClickHandler;f.addClickHandler=function(L,V,T){var Y=V;
+V=function(W,ka){if(null==ka){var q=mxEvent.getSource(W);"a"==q.nodeName.toLowerCase()&&(ka=q.getAttribute("href"))}null!=ka&&f.isCustomLink(ka)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&f.customLinkClicked(ka)&&mxEvent.consume(W);null!=Y&&Y(W,ka)};J.call(this,L,V,T)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,
+V,T){e.editor.graph.isSelectionEmpty()?y.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,T)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=
+null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var da=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:
+1:da.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,T){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(T)&&mxEvent.isPopupTrigger(T))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(T)}};this.editor.getOrCreateFilename=function(){var L=e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var aa=
+this.actions.get("print");aa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);aa.visible=aa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
+!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
+null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,T=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,
+function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(ka,q,F,S,ba,U){f.insertImage(ka,ba,U)},function(){},function(ka){return"image/"==ka.type.substring(0,6)},function(ka){for(var q=0;q<ka.length;q++)ka[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var W=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),
+mxUtils.bind(this,function(ka){var q=Math.max(1,ka.width);ka=Math.max(1,ka.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,ka));f.insertImage(decodeURIComponent(W),q*F,ka*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",
+!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(aa=this.editor.graph.view,aa.setUnit(mxSettings.getUnit()),aa.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,aa.unit),this.refresh());if("1"==urlParams.styledev){aa=
+document.getElementById("geFooter");null!=aa&&(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)})),aa.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?
+!0:qa.apply(this,arguments)}}aa=document.getElementById("geInfo");null!=aa&&aa.parentNode.removeChild(aa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var sa=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=sa&&(sa.parentNode.removeChild(sa),sa=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==sa&&(!mxClient.IS_IE||10<document.documentMode)&&(sa=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=sa&&(sa.parentNode.removeChild(sa),sa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),T=L.dataTransfer.files,Y=f.view.translate,W=f.view.scale,ka=V.x/W-Y.x,q=V.y/W-Y.y;if(0<T.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(T,!0)):(mxEvent.isAltDown(L)&&(q=ka=null),this.importFiles(T,ka,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=ka=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,ka,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,
+"text/html")){var S=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(S);var ba=null;T=V.getElementsByTagName("img");null!=T&&1==T.length?(S=T[0].getAttribute("src"),null==S&&(S=T[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)||(ba=!0)):(T=V.getElementsByTagName("a"),null!=T&&1==T.length?S=T[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(S=mxUtils.getTextContent(V[0]))));var U=!0,ca=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(S,ka,q,!0,ba,null,U,mxEvent.isControlDown(L)))});ba&&null!=S&&S.length>this.resampleThreshold?this.confirmImageResize(function(ea){U=ea;ca()},mxEvent.isControlDown(L)):ca()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(ea){var na=Math.max(1,ea.width);ea=Math.max(1,ea.height);var ra=this.maxImageSize;ra=Math.min(1,Math.min(ra/Math.max(1,na)),ra/Math.max(1,ea));f.setSelectionCell(f.insertVertex(null,
+null,"",ka,q,na*ra,ea*ra,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(ea){f.setSelectionCells(this.insertTextAt(F,ka,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),ka,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+aa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",aa);this.addListener("sketchModeChanged",aa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):("1"==urlParams["live-ui"]||"min"==uiTheme&&"1"!=urlParams.embedInline)&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&
+!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=f.clipboardData||f.originalEvent.clipboardData,z=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,
+5)){z=!0;break}if(!z){var B=k.items;for(index in B){var I=B[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(J,y,ia,da,ja,aa){e.insertImage(J,ja,aa)},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var y=0;y<J.length;y++)J[y]()});else{var O=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],O.x,O.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(J){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function e(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position=
+"absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var z=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(B){var I=mxEvent.getSource(B);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||z||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(k),z=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(B){var I=B.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=I&&17!=I&&91!=I&&93!=I||(z=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"cut",
+mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=B.clipboardData&&this.pasteCells(B,k,!0,!0),!mxEvent.isConsumed(B))){var I=f.container.scrollLeft,O=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=O;
+this.pasteCells(B,k,!1,!0)}),0)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function k(da){return""==da||"dark"==da||"kennedy"==da||null==da}var z=Editor.currentTheme;e=k(e)?"default":e;z=k(z)?"default":
+z;var t="sketch"==z&&"default"==e||"default"==z&&"sketch"==e;if(t&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,O=B.y,J=mxUtils.getOffset(this.editor.graph.container),y=this.editor.graph.container.scrollLeft-J.x,ia=this.editor.graph.container.scrollTop-J.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,
+function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"sketch"==z&&"default"==e?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==z&&"sketch"==
+e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var da=this.editor.graph.view.scale;J=mxUtils.getOffset(this.editor.graph.container);
+this.editor.graph.container.scrollLeft=y+J.x+(B.x-I)*da;this.editor.graph.container.scrollTop=ia+J.y+(B.y-O)*da;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return t};EditorUi.prototype.switchTheme=function(e){this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);
+this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"sketch"==e?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):
+"default"==e&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=
+e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;
+f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;"sketch"==e?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,
+10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};
+EditorUi.prototype.switchCssForTheme=function(e){"sketch"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"sketch"==
+e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(e){if("sketch"==e&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),k=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));e=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";k.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",e);
+this.actions.get("redo").addListener("stateChanged",e);e();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(e){if("sketch"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var k=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var z=null!=this.pages?this.pages.length:1,t=this.getPageIndex(this.currentPage);t=null!=t?t+1:1;var B=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+t+"/"+z+")"+(null!=B?" ["+B+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
+k);this.editor.addListener("pagesPatched",k);k();e.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));k=this.createMenu("viewZoom",Editor.plusImage);k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(k);mxUtils.bind(this,function(z){mxEvent.addListener(z,
+"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var t=mxUtils.bind(this,function(){z.innerText="";mxUtils.write(z,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);this.editor.addListener("resetGraphView",t);this.editor.addListener("pageSelected",
+t)})(k);e.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("sketch"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var z=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);z.style.paddingLeft="12px";z.style.backgroundSize="";z.style.width="26px";z.style.height="30px";z.style.opacity="0.7";var t=this.createMenu("insert",Editor.plusImage);t.style.backgroundSize="";t.style.marginBottom="4px";t.style.display="block";t.style.width="30px";t.style.height="30px";t.style.padding="4px";t.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){var O=function(y,ia,da,ja){null!=ia&&y.setAttribute("title",ia);y.style.cursor="pointer";y.style.margin=
+"8px 0px";y.style.display="block";f.appendChild(y);null!=ja&&(y.style.position="relative",y.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),y.appendChild(ia));return y};O(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");O(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");O(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");O(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var J=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,0),!1);J.geometry.points=
+[];J.geometry.relative=!0;J.edge=!0;O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,J.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");J=J.clone();J.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";J.geometry.width=this.editor.graph.defaultEdgeLength+20;J.geometry.setTerminalPoint(new mxPoint(0,20),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,20),!1);
+O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));O(z,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(t)}"1"!=urlParams.embedInline&&f.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(k),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"sketch"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="4px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="relative",e.style.height="21px",e.style.width="21px",e.style.right="0px",e.style.top="3px",this.sketchMenubarElt.appendChild(e))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),
+this.statusContainer.style.marginTop=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.right="14px",e.style.top="5px",document.body.appendChild(e)))};EditorUi.prototype.createMenu=function(e,f){var k=this.menus.get(e),z=this.menubar.addMenu(mxResources.get(e),k.funct);z.className="geToolbarButton";z.style.display="inline-block";z.style.cursor="pointer";z.style.height=
+"24px";z.setAttribute("title",mxResources.get(e));this.menus.menuCreated(k,z,"geMenuItem");null!=f&&(z.style.backgroundImage="url("+f+")",z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="100% 100%",z.style.width="24px",z.innerText="");return z};EditorUi.prototype.createMenuItem=function(e,f,k){var z=document.createElement("a");z.className="geToolbarButton";z.setAttribute("title",mxResources.get(e));z.style.backgroundImage="url("+f+")";z.style.backgroundPosition=
+"center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width="24px";z.style.height="24px";var t=this.actions.get(e);null!=t&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(B){B.preventDefault()})),mxEvent.addListener(z,"click",function(B){"disabled"!=z.getAttribute("disabled")&&t.funct(B);mxEvent.consume(B)}),k||(e=function(){t.isEnabled()?
+(z.removeAttribute("disabled"),z.style.cursor="pointer"):(z.setAttribute("disabled","disabled"),z.style.cursor="default");z.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),t.addListener("stateChanged",e),e()));return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?
+580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,k,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=
+function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var N=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top=
+"0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=e?e:1)&&this.editor.graph.sizeDidChange()):N.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?
+66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }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); "+
@@ -3710,458 +3712,458 @@ mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
-p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);null==urlParams.dark&&(mxSettings.settings.darkMode=e,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var R=document.createElement("link");R.setAttribute("rel","stylesheet");R.setAttribute("href",STYLE_PATH+"/dark.css");
+R.setAttribute("charset","UTF-8");R.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
-(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
+(e=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
-null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
-d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
-"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
-f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
-f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
-mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
-this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
-function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
-EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
-this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
-0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
-decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
-x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
-t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
-299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
-document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
-200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
-this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
-function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
-d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
-I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
-pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
-null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
-(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
-!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
-H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
-[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
-"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
-this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
-ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
-xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
-function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
-data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
-return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
-X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
-ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
-mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
-sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
-mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
-null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
-null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
-H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
-try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
-"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
-mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
-mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
-this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
-mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
-mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
-f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
-null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
-T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
-g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
-Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
-"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
-D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
-Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
-H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
-null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
-parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
-0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
-!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
-null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
-mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
-"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
-Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
-ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
-x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
-this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
-this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
-this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
-this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
-this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
-this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
-t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
-mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
-!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
-!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
-ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
-localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
-f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
-X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
-mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
-"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
-function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
-ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
-!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
-Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
-ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
-I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
-0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
-mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
-(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
-H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
-mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
-mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,m=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,m);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==R.parentNode&&document.getElementsByTagName("head")[0].appendChild(R):
+null!=R.parentNode&&R.parentNode.removeChild(R)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
+e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"sketch"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
+null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"sketch"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var k=e.indexOf(",");0<k&&(f=this.getPageById(e.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(z,t){try{this.spinner.stop();var B=this.createImageDataUri(z,f,"png"),I=parseInt(t.getAttribute("width")),O=parseInt(t.getAttribute("height"));this.writeImageToClipboard(B,I,O,mxUtils.bind(this,function(J){this.handleError(J)}))}catch(J){this.handleError(J)}}),null,null,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(z){this.handleError(z)}};EditorUi.prototype.writeImageToClipboard=function(e,f,k,z){var t=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](z)};EditorUi.prototype.copyCells=function(e,f){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var z=
+mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(z));mxUtils.setTextContent(e,encodeURIComponent(t));f?(k.removeCells(z,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,k,z){var t=this.editor.graph,B=null;t.lastPasteXml==e?t.pasteCounter++:(t.lastPasteXml=e,t.pasteCounter=0);var I=t.pasteCounter*t.gridSize;if(k||this.isCompatibleString(e))B=this.importXml(e,I,I),t.setSelectionCells(B);else if(f&&1==t.getSelectionCount()){I=t.getStartEditingCell(t.getSelectionCell(),z);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==t.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,
+e,[I]);else{t.model.beginUpdate();try{t.labelChanged(I,e),Graph.isLink(e)&&t.setLinkForCell(I,e)}finally{t.model.endUpdate()}}t.setSelectionCell(I)}else B=t.getInsertPoint(),t.isMouseInsertPoint()&&(I=0,t.lastPasteXml==e&&0<t.pasteCounter&&t.pasteCounter--),B=this.insertTextAt(e,B.x+I,B.y+I,!0),t.setSelectionCells(B);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(e,f,k,z){if(!mxEvent.isConsumed(e)){var t=f,B=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),O=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var J=decodeURIComponent(I);this.isCompatibleString(J)&&(O=!0,I=J)}catch(qa){}O=O?null:e.clipboardData.getData("text/html");null!=O&&0<O.length?(t=this.parseHtmlData(O),B="text/plain"!=t.getAttribute("data-type")):null!=I&&0<I.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,
+O))}I=t.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))k=I[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(qa){var sa=this.editor.graph;sa.lastPasteXml==qa?sa.pasteCounter++:(sa.lastPasteXml=qa,sa.pasteCounter=0);var L=sa.pasteCounter*sa.gridSize;sa.setSelectionCells(this.importXml(qa,L,L));sa.scrollCellToVisible(sa.getSelectionCell())}),mxUtils.bind(this,
+function(qa){this.handleError(qa)})),mxEvent.consume(e));else{var y=B?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),ia=!1;try{var da=y.lastIndexOf("%3E");0<=da&&da<y.length-3&&(y=y.substring(0,da+3))}catch(qa){}try{I=t.getElementsByTagName("span"),(J=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(J)||0==J.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,y=J)}catch(qa){}try{if(null!=
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,z,ia,e)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(y,z,ia,e);try{mxEvent.consume(e)}catch(qa){}}else if(!k){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,k=0;k<e.length;k++)mxEvent.addListener(e[k],"dragleave",function(z){null!=f&&(f.parentNode.removeChild(f),f=null);z.stopPropagation();z.preventDefault()}),mxEvent.addListener(e[k],"dragover",mxUtils.bind(this,function(z){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());z.stopPropagation();z.preventDefault()})),
+mxEvent.addListener(e[k],"drop",mxUtils.bind(this,function(z){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<z.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(z.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z)):this.openFiles(z.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(z);if(null==t){var B=null!=z.dataTransfer?z.dataTransfer:
+z.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?t=B.getData("Text"):(t=null,t=0<=mxUtils.indexOf(B.types,"text/uri-list")?z.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=t&&0<t.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(t),B=B.getElementsByTagName("img"),0<B.length&&(t=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(t=B.getData("text/plain"))),
+null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}z.stopPropagation();z.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,k=0;if(null==e){var z=document.body;var t=document.documentElement;var B=(z.clientWidth||t.clientWidth)-3;z=Math.max(z.clientHeight||0,t.clientHeight)-3}else f=e.offsetTop,k=e.offsetLeft,B=e.clientWidth,
+z=e.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=f+"px";t.style.left=k+"px";t.style.width=Math.max(0,B-3)+"px";t.style.height=Math.max(0,z-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
+var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var k=new mxCodec(f.ownerDocument),z=new mxGraphModel;k.decode(f,z);f=z.getChildAt(z.getRoot(),0);for(k=0;k<z.getChildCount(f);k++)e.push(z.getChildAt(f,k))}return e};EditorUi.prototype.openFileHandle=function(e,f,k,z,t){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var B=mxUtils.bind(this,function(O){f=0<=
+f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==O.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,O,f))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(O,f,z)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(k,mxUtils.bind(this,function(O){this.spinner.stop();
+B(O)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(O){4==O.readyState&&(this.spinner.stop(),200<=O.status&&299>=O.status?B(O.responseText):this.handleError({message:mxResources.get(413==O.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(O){this.spinner.stop();this.openLocalFile(O,f,z)}),mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,z)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(t=null,z=!0,
+e=I)}this.spinner.stop();this.openLocalFile(e,f,z,t,null!=t?k:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(z){var t=new FileReader;t.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,z.name,z,f)}catch(I){this.handleError(I)}});t.onerror=mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B);window.openFile=null});"image"!==z.type.substring(0,
+5)&&"application/pdf"!==z.type||"image/svg"===z.type.substring(0,9)?t.readAsText(z):t.readAsDataURL(z)})(e[k])};EditorUi.prototype.openLocalFile=function(e,f,k,z,t){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var O=mxUtils.parseXml(e);null!=O&&(this.editor.setGraphXml(O.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,k,z,t))});if(null!=
+e&&0<e.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var k in e)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function k(I){if(null!=
+I){var O=I.lastIndexOf(".");0<O&&(I=I.substring(O+1,I.length));null==f[I]&&(f[I]=!0)}}var z=this.editor.graph,t=z.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));z.model.isEdge(e)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=z.model.getChildCount(e);for(var B=0;B<t;B++)this.addBasenamesForCell(z.model.getChildAt(e,B),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
+!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,z,t){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.model.cells,O;for(O in I){var J=I[O];null!=J&&null!=J.style&&(J.style+=";sketch=1;"+(-1==J.style.indexOf("fontFamily=")||-1<J.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=z?z:!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(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var z=f.background;if(null==z||z==mxConstants.NONE)z=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,z,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(e){var f=null,k=!1,z=!1,t=null,B=mxUtils.bind(this,function(J,y){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,B);mxEvent.addListener(window,"message",mxUtils.bind(this,function(J){if(J.source==(window.opener||window.parent)){var y=J.data,ia=null,da=mxUtils.bind(this,function(pa){if(null!=pa&&"function"===
+typeof pa.charAt&&"<"!=pa.charAt(0))try{Editor.isPngDataUrl(pa)?pa=Editor.extractGraphModelFromPng(pa):"data:image/svg+xml;base64,"==pa.substring(0,26)?pa=atob(pa.substring(26)):"data:image/svg+xml;utf8,"==pa.substring(0,24)&&(pa=pa.substring(24)),null!=pa&&("%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Aa){}return pa});if("json"==urlParams.proto){var ja=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[J],"data",
+[y])}catch(pa){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var aa=new FilenameDialog(this,y.defaultValue||"",null!=
+y.okKey?mxResources.get(y.okKey):y.ok,function(pa){null!=pa?I.postMessage(JSON.stringify({event:"prompt",value:pa,message:y}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(aa.container,300,80,!0,!1);aa.init();return}if("draft"==y.action){var qa=da(y.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();
+I.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(aa.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&
+this.actions.get("exit").funct()}));try{aa.init()}catch(pa){I.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var sa=1==y.enableRecent,L=1==y.enableSearch,V=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var T=this.getCurrentUser(),Y=new TemplatesDialog(this,function(pa,Aa,xa){pa=pa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,
+name:Aa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=T?T.id:null,sa?mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,pa,Aa)}):null,L?mxUtils.bind(this,function(pa,Aa,xa,Ma){this.remoteInvoke("searchDiagrams",[pa,Ma],null,Aa,xa)}):null,mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getFileContent",[pa.url],null,Aa,xa)}),null,
+V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}aa=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(pa,Aa,xa,Ma){pa=pa||this.emptyDiagramXml;null!=y.callback?I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Aa,tempUrl:xa,libs:Ma,builtIn:!0,message:y}),"*"):
+(e(pa,J,pa!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,sa?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(pa,Aa){this.remoteInvoke("searchDiagrams",[pa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Aa,xa){I.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Aa,
+name:xa}),"*")}),null,null,V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==y.withoutType);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(pa){this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==y.action){var W=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:W,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?
+this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var ka=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,ka):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=
+y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var q=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,S=mxUtils.bind(this,function(pa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
+y.format;Aa.message=y;Aa.data=pa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),ba=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==y.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);S(pa)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ca=mxUtils.bind(this,function(){if(null!=this.pages&&
+this.currentPage.getId()!=U){var pa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==U){Aa=this.updatePageRoot(this.pages[xa]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(La){return"page"==La?Aa.getName():"pagenumber"==La?1:pa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=y.layerIds){var Ma=F.model,Oa=Ma.getChildCells(Ma.getRoot()),Na={};for(xa=
+0;xa<y.layerIds.length;xa++)Na[y.layerIds[xa]]=!0;for(xa=0;xa<Oa.length;xa++)Ma.setVisible(Oa[xa],Na[Oa[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){ba(La.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){ba(null)}),null,null,y.scale,y.transparent,y.shadow,null,F,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(k=!0,this.setFileData(q),k=!1);ca()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":
+"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?S("data:image/png;base64,"+pa.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(ca=mxUtils.bind(this,function(){var pa=this.createLoadMessage("export");pa.message=y;if("html2"==y.format||
+"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();pa.xml=mxUtils.getXml(Aa);pa.data=this.getFileData(null,null,!0,null,null,null,Aa);pa.format=y.format}else if("html"==y.format)Aa=this.editor.getGraphXml(),pa.data=this.getHtml(Aa,this.editor.graph),pa.xml=mxUtils.getXml(Aa),pa.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=y.background?y.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);pa.xml=
+this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var xa=mxUtils.bind(this,function(Ma){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=Editor.createSvgDataUri(Ma);I.postMessage(JSON.stringify(pa),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,xa,null,null,y.embedImages,Aa,y.scale,y.border,y.shadow,y.keepTheme);
+else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(Ma){y.embedImages||null==y.embedImages?this.editor.convertImages(Ma,mxUtils.bind(this,
+function(Oa){xa(mxUtils.getXml(Oa))})):xa(mxUtils.getXml(Ma))}));return}I.postMessage(JSON.stringify(pa),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var ea=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ea.apply(this,arguments);ca()}}k=!0;this.setFileData(y.xml);k=!1;this.editor.graph.mathEnabled||ca()}else ca();return}if("load"==y.action){ja=y.toSketch;z=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=
+y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var na=Editor.sketchMode;this.doSetSketchMode(y.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(na=Editor.darkMode,this.doSetDarkMode(y.dark),na!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=
+y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var ra=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";ia=mxUtils.bind(this,function(){var pa=this.editor.graph,Aa=pa.maxFitScale;pa.maxFitScale=y.maxFitScale;pa.fit(2*ra);pa.maxFitScale=Aa;pa.container.scrollTop-=2*ra;pa.container.scrollLeft-=2*ra;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(pa){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var ya=this.getCurrentFile();null!=ya&&(qa=da(y.xml),null!=qa&&""!=qa&&ya.mergeFile(new LocalFile(this,qa),function(){I.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(pa){I.postMessage(JSON.stringify({event:"merge",message:y,error:pa}),"*")}))}else"remoteInvokeReady"==
+y.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,J.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(pa){this.handleError(pa)}}var va=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Da=mxUtils.bind(this,function(pa,Aa){k=!0;
+try{e(pa,Aa,null,ja)}catch(xa){this.handleError(xa)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=va();z&&null==f&&(f=mxUtils.bind(this,function(xa,Ma){xa=va();xa==t||k||(Ma=this.createLoadMessage("autosave"),Ma.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));t=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=pa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=
+y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(da="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(pa){Da(pa,J)},mxUtils.bind(this,function(pa){this.handleError(pa)}),da)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,
+mxUtils.bind(this,function(pa){4==pa.readyState&&200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)&&Da(pa.responseText,J)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(pa){Da(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=da(y),Da(y,J)):this.loadDescriptor(y,mxUtils.bind(this,function(pa){Da(va(),J)}),
+mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");if("json"==urlParams.proto){var O=this.editor.graph.openLink;this.editor.graph.openLink=function(J,y,ia){O.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:J,target:y,allowOpener:ia}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.menubar&&"1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";e.style.position="absolute";e.style.paddingTop="2px";e.style.paddingLeft="8px";e.style.paddingBottom="2px";e.style.marginRight="12px";e.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):
+mxResources.get("saveAndExit");mxUtils.write(f,k);f.setAttribute("title",k);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));e.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),e.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
+mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),e.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,k),f.setAttribute("title",k),f.className="geBigButton geBigStandardButton",
+f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),e.appendChild(f));this.toolbar.container.appendChild(e);this.toolbar.staticElements.push(e)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
+null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var k=e.split("\n"),z=[],t=[],B=[],I={};if(0<k.length){var O={},J=this.editor.graph,y=null,ia=null,
+da=null,ja=null,aa=null,qa=null,sa=null,L="whiteSpace=wrap;html=1;",V=null,T=null,Y="",W="auto",ka="auto",q=!1,F=null,S=null,ba=40,U=40,ca=100,ea=0,na=mxUtils.bind(this,function(){null!=f?f(Fa):(J.setSelectionCells(Fa),J.scrollCellToVisible(J.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ra=J.getFreeInsertPoint(),ya=ra.x,va=ra.y;ra=va;var Da=null,pa="auto";T=null;for(var Aa=[],xa=null,Ma=null,Oa=0;Oa<k.length&&"#"==
+k[Oa].charAt(0);){e=k[Oa].replace(/\r$/,"");for(Oa++;Oa<k.length&&"\\"==e.charAt(e.length-1)&&"#"==k[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(k[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var La=mxUtils.trim(e.substring(1,Na)),Ba=mxUtils.trim(e.substring(Na+1));"label"==La?Da=J.sanitizeHtml(Ba):"labelname"==La&&0<Ba.length&&"-"!=Ba?aa=Ba:"labels"==La&&0<Ba.length&&"-"!=Ba?sa=JSON.parse(Ba):"style"==La?ia=Ba:"parentstyle"==La?L=Ba:"unknownStyle"==La&&"-"!=
+Ba?qa=Ba:"stylename"==La&&0<Ba.length&&"-"!=Ba?ja=Ba:"styles"==La&&0<Ba.length&&"-"!=Ba?da=JSON.parse(Ba):"vars"==La&&0<Ba.length&&"-"!=Ba?y=JSON.parse(Ba):"identity"==La&&0<Ba.length&&"-"!=Ba?V=Ba:"parent"==La&&0<Ba.length&&"-"!=Ba?T=Ba:"namespace"==La&&0<Ba.length&&"-"!=Ba?Y=Ba:"width"==La?W=Ba:"height"==La?ka=Ba:"collapsed"==La&&"-"!=Ba?q="true"==Ba:"left"==La&&0<Ba.length?F=Ba:"top"==La&&0<Ba.length?S=Ba:"ignore"==La?Ma=Ba.split(","):"connect"==La?Aa.push(JSON.parse(Ba)):"link"==La?xa=Ba:"padding"==
+La?ea=parseFloat(Ba):"edgespacing"==La?ba=parseFloat(Ba):"nodespacing"==La?U=parseFloat(Ba):"levelspacing"==La?ca=parseFloat(Ba):"layout"==La&&(pa=Ba)}}}if(null==k[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(k[Oa].replace(/\r$/,""));Na=e=null;La=[];for(Ba=0;Ba<ab.length;Ba++)V==ab[Ba]&&(e=Ba),T==ab[Ba]&&(Na=Ba),La.push(mxUtils.trim(ab[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Da&&(Da="%"+La[0]+"%");if(null!=Aa)for(var Xa=
+0;Xa<Aa.length;Xa++)null==O[Aa[Xa].to]&&(O[Aa[Xa].to]={});V=[];for(Ba=Oa+1;Ba<k.length;Ba++){var x=this.editor.csvToArray(k[Ba].replace(/\r$/,""));if(null==x){var H=40<k[Ba].length?k[Ba].substring(0,40)+"...":k[Ba];throw Error(H+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}J.model.beginUpdate();try{for(Ba=0;Ba<V.length;Ba++){x=V[Ba];var P=null,X=null!=e?Y+x[e]:null;k=!1;null!=X&&(P=J.model.getCell(X),k=null==P||0<=mxUtils.indexOf(z,P));var Z=new mxCell(Da,new mxGeometry(ya,
+ra,0,0),ia||"whiteSpace=wrap;html=1;");Z.collapsed=q;Z.vertex=!0;Z.id=X;null==P||k||J.model.setCollapsed(P,q);for(var fa=0;fa<x.length;fa++)J.setAttributeForCell(Z,La[fa],x[fa]),null==P||k||J.setAttributeForCell(P,La[fa],x[fa]);if(null!=aa&&null!=sa){var la=sa[Z.getAttribute(aa)];null!=la&&(J.labelChanged(Z,la),null==P||k||J.cellLabelChanged(P,la))}if(null!=ja&&null!=da){var za=da[Z.getAttribute(ja)];null!=za&&(Z.style=za)}J.setAttributeForCell(Z,"placeholders","1");Z.style=J.replacePlaceholders(Z,
+Z.style,y);null==P||k?J.fireEvent(new mxEventObject("cellsInserted","cells",[Z])):(J.model.setStyle(P,Z.style),0>mxUtils.indexOf(B,P)&&B.push(P),J.fireEvent(new mxEventObject("cellsInserted","cells",[P])));k=null!=P;P=Z;if(!k)for(Xa=0;Xa<Aa.length;Xa++)O[Aa[Xa].to][P.getAttribute(Aa[Xa].to)]=P;null!=xa&&"link"!=xa&&(J.setLinkForCell(P,P.getAttribute(xa)),J.setAttributeForCell(P,xa,null));var ua=this.editor.graph.getPreferredSizeForCell(P);T=null!=Na?J.model.getCell(Y+x[Na]):null;if(P.vertex){H=null!=
+T?0:ya;Oa=null!=T?0:va;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=H+parseFloat(P.getAttribute(F)));null!=S&&null!=P.getAttribute(S)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(S)));var oa="@"==W.charAt(0)?P.getAttribute(W.substring(1)):null;P.geometry.width=null!=oa&&"auto"!=oa?parseFloat(P.getAttribute(W.substring(1))):"auto"==W||"auto"==oa?ua.width+ea:parseFloat(W);var ta="@"==ka.charAt(0)?P.getAttribute(ka.substring(1)):null;P.geometry.height=null!=ta&&"auto"!=ta?parseFloat(ta):"auto"==ka||
+"auto"==ta?ua.height+ea:parseFloat(ka);ra+=P.geometry.height+U}k?(null==I[X]&&(I[X]=[]),I[X].push(P)):(z.push(P),null!=T?(T.style=J.replacePlaceholders(T,L,y),J.addCell(P,T),t.push(T)):B.push(J.addCell(P)))}for(Ba=0;Ba<t.length;Ba++)oa="@"==W.charAt(0)?t[Ba].getAttribute(W.substring(1)):null,ta="@"==ka.charAt(0)?t[Ba].getAttribute(ka.substring(1)):null,"auto"!=W&&"auto"!=oa||"auto"!=ka&&"auto"!=ta||J.updateGroupBounds([t[Ba]],ea,!0);var Ea=B.slice(),Fa=B.slice();for(Xa=0;Xa<Aa.length;Xa++){var Pa=
+Aa[Xa];for(Ba=0;Ba<z.length;Ba++){P=z[Ba];var Ra=mxUtils.bind(this,function(Ya,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=O[fb.to][hb[qb]];if(null==kb&&null!=qa){kb=new mxCell(hb[qb],new mxGeometry(ya,va,0,0),qa);kb.style=J.replacePlaceholders(Za,kb.style,y);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+ea;kb.geometry.height=ib.height+ea;O[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];B.push(J.addCell(kb))}if(null!=
+kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=J.replacePlaceholders(Za,fb.sourcelabel,y)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+J.replacePlaceholders(kb,fb.targetlabel,y));var ub="target"==fb.placeholders==!fb.invert?kb:Ya;ub=null!=fb.style?J.replacePlaceholders(ub,fb.style,y):J.createCurrentEdgeStyle();ib=J.insertEdge(null,null,ib||"",fb.invert?kb:Ya,fb.invert?
+Ya:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=J.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Ya,nb.value,y));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Fa.push(ib);mxUtils.remove(fb.invert?
+Ya:kb,Ea)}}}});Ra(P,P,Pa);if(null!=I[P.id])for(fa=0;fa<I[P.id].length;fa++)Ra(P,I[P.id][fa],Pa)}}if(null!=Ma)for(Ba=0;Ba<z.length;Ba++)for(P=z[Ba],fa=0;fa<Ma.length;fa++)J.setAttributeForCell(P,mxUtils.trim(Ma[fa]),null);if(0<B.length){var Ca=new mxParallelEdgeLayout(J);Ca.spacing=ba;Ca.checkOverlap=!0;var Ja=function(){0<Ca.spacing&&Ca.execute(J.getDefaultParent());for(var Ya=0;Ya<B.length;Ya++){var Za=J.getCellGeometry(B[Ya]);Za.x=Math.round(J.snap(Za.x));Za.y=Math.round(J.snap(Za.y));"auto"==W&&
+(Za.width=Math.round(J.snap(Za.width)));"auto"==ka&&(Za.height=Math.round(J.snap(Za.height)))}};if("["==pa.charAt(0)){var Qa=na;J.view.validate();this.executeLayouts(J.createLayouts(JSON.parse(pa)),function(){Ja();Qa()});na=null}else if("circle"==pa){var $a=new mxCircleLayout(J);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Ya){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){$a.execute(J.getDefaultParent());Ja()},
+!0,na);na=null}else if("horizontaltree"==pa||"verticaltree"==pa||"auto"==pa&&Fa.length==2*B.length-1&&1==Ea.length){J.view.validate();var cb=new mxCompactTreeLayout(J,"horizontaltree"==pa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(J.getDefaultParent(),0<Ea.length?Ea[0]:null)},!0,na);na=null}else if("horizontalflow"==pa||"verticalflow"==pa||"auto"==pa&&1==Ea.length){J.view.validate();var db=new mxHierarchicalLayout(J,"horizontalflow"==pa?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=ba;db.interRankCellSpacing=ca;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(J.getDefaultParent(),Fa);J.moveCells(Fa,ya,va)},!0,na);na=null}else if("orgchart"==pa){J.view.validate();var rb=new mxOrgChartLayout(J,2,ca,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Ya){return mb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){rb.execute(J.getDefaultParent());Ja()},!0,na);na=
+null}else if("organic"==pa||"auto"==pa&&Fa.length>B.length){J.view.validate();var vb=new mxFastOrganicLayout(J);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Ya){return Bb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){vb.execute(J.getDefaultParent());Ja()},!0,na);na=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=na&&na()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(e){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var k="?",z;for(z in urlParams)0>mxUtils.indexOf(e,z)&&null!=urlParams[z]&&(f+=k+z+"="+urlParams[z],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+z;for(z in urlParams)0>mxUtils.indexOf(k,z)&&(e=0==f?e+"?":e+"&",null!=urlParams[z]&&(e+=z+"="+urlParams[z],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,k,z,t){e=new LinkDialog(this,e,f,k,!0,z,t);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!k);
+this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var G=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(e){var f=G.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var M=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){M.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),z=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(z);this.actions.get("autosave").setEnabled(null!=
+f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(z);this.actions.get("editData").setEnabled(e.isEnabled());this.actions.get("shadowVisible").setEnabled(z);this.actions.get("connectionArrows").setEnabled(z);this.actions.get("connectionPoints").setEnabled(z);this.actions.get("copyStyle").setEnabled(z&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(z&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(z);
+this.actions.get("createRevision").setEnabled(z);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(z&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(z&&null!=
+e&&null!=e.shape&&null!=e.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(e,f,k,z,t,B,I,O){var J=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");
+else if("svg"==k)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(J.getSvg(z,t,B)),"image/svg+xml");else{var y=e.getFileData(!0,null,null,null,null,!0),ia=J.getGraphBounds(),da=Math.floor(ia.width*t/J.view.scale),ja=Math.floor(ia.height*t/J.view.scale);if(y.length<=MAX_REQUEST_SIZE&&da*ja<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!e.isExportToCanvas()){var aa={globalVars:J.getExportVariables()};O&&(aa.grid={size:J.gridSize,steps:J.view.gridSteps,color:J.view.gridColor});e.saveRequest(f,
+k,function(qa,sa){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(sa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<I?"&dpi="+I:"")+"&bg="+(null!=z?z:"none")+"&w="+da+"&h="+ja+"&border="+B+"&xml="+encodeURIComponent(y))})}else"png"==k?e.exportImage(t,null==z||"none"==z,!0,!1,!1,B,!0,!1,null,O,I):e.exportImage(t,!1,!0,!1,!1,B,!0,!1,"jpeg",O);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var z=e;this.currentPage!=this.pages[k]&&(z=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[k]),z.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+z.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},k=document.createElement("div");
+k.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxUtils.htmlEntities(e));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(z);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var O=I[e];if("R"==
+O.substring(0,1)){var J=JSON.parse(decodeURIComponent(O.substring(1)));B[J[0]]={id:J[0],title:J[1],downloadUrl:J[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){t.innerText="";if(0==y.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<y.length;ia++){var da=y[ia];B[da.id]&&(f[da.id]=da);var ja=this.addCheckbox(t,da.title,B[da.id]);(function(aa,qa){mxEvent.addListener(qa,
+"change",function(){this.checked?f[aa.id]=aa:delete f[aa.id]})})(da,ja)}},mxUtils.bind(this,function(y){t.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));t.appendChild(ia)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,
+ia;for(ia in f)null==B[ia]&&(y++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ja){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ja,da))}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[ia]));
+0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(e){var f=e.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):k.callback&&k.callback.apply(this,
+e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,k,z,t){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),O=mxUtils.bind(this,function(){window.clearTimeout(I);B&&z.apply(this,arguments)}),J=mxUtils.bind(this,function(){window.clearTimeout(I);B&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:O,
+error:J});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var k=mxUtils.bind(this,function(y,ia){var da={event:"remoteInvokeResponse",msgMarkers:e.msgMarkers};null!=ia?da.error={errResp:ia}:null!=y&&(da.resp=y);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var z=e.funtionName,t=this.remoteInvokableFns[z];if(null!=t&&
+"function"===typeof this[z]){if(t.allowedDomains){for(var B=!1,I=0;I<t.allowedDomains.length;I++)if(f=="https://"+t.allowedDomains[I]){B=!0;break}if(!B){k(null,"Invalid Call: "+z+" is not allowed.");return}}var O=e.functionArgs;Array.isArray(O)||(O=[]);if(t.isAsync)O.push(function(){k(Array.prototype.slice.apply(arguments))}),O.push(function(y){k(null,y||"Unkown Error")}),this[z].apply(this,O);else{var J=this[z].apply(this,O);k([J])}}else k(null,"Invalid Call: "+z+" is not found.")}catch(y){k(null,
+"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var z=k.open("database",2);z.onupgradeneeded=function(t){try{var B=z.result;1>t.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};z.onsuccess=mxUtils.bind(this,function(t){var B=z.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var O=document.createElement("iframe");O.style.display="none";O.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(O);var J=!0,y=!1,ia,da=0,ja=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=ia.length)ja();else{var L=ia[da];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):aa()}),aa)}}catch(V){console.log(V)}}),sa=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],aa,aa,["filesInfo","files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==O.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(T){}"init"==V.event?(O.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||y||(J?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],J=!1,qa()):ja():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?sa(V.resp[0]):aa())}}catch(T){console.log(T)}});window.addEventListener("message",I)}})));e(B);B.onversionchange=function(){B.close()}});z.onerror=f;z.onblocked=function(){}}catch(t){null!=f&&f(t)}else null!=f&&f()}else e(this.database)};
+EditorUi.prototype.setDatabaseItem=function(e,f,k,z,t){this.openDatabase(mxUtils.bind(this,function(B){try{t=t||"objects";Array.isArray(t)||(t=[t],e=[e],f=[f]);var I=B.transaction(t,"readwrite");I.oncomplete=k;I.onerror=z;for(B=0;B<t.length;B++)I.objectStore(t[B]).put(null!=e&&null!=e[B]?{key:e[B],data:f[B]}:f[B])}catch(O){null!=z&&z(O)}}),z)};EditorUi.prototype.removeDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){z=z||"objects";Array.isArray(z)||(z=[z],e=[e]);t=t.transaction(z,
+"readwrite");t.oncomplete=f;t.onerror=k;for(var B=0;B<z.length;B++)t.objectStore(z[B]).delete(e[B])}),k)};EditorUi.prototype.getDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){try{z=z||"objects";var B=t.transaction([z],"readonly").objectStore(z).get(e);B.onsuccess=function(){f(B.result)};B.onerror=k}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],
+"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),B=[];t.onsuccess=function(I){null==I.target.result?e(B):(B.push(I.target.result.value),I.target.result.continue())};t.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){e(t.result)};t.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var k=this.getCurrentFile();null!=k?k.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,k){var z=this.getCurrentFile();
+null!=z?z.addComment(e,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=function(e,f){var k=this.getCurrentFile();return null!=k?k.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();
+return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,k,z,t,B,I,O){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,k,z,t,B,I,O)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,k,z)};EditorUi.prototype.convertImageToDataUri=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=
+function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,k,z)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,f,k,z,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,k,z,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),z=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<z.length){var t="<mxfile "===z.substring(0,8)||"<?xml"===z.substring(0,5)||"\x3c!--[if IE]>"===z.substring(0,12);z="<mxlibrary>"===z.substring(0,11);(t||z)&&e.push(k)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,g,l,D,p){function E(){for(var aa=I.getElementsByTagName("div"),qa=0,sa=0;sa<aa.length;sa++)"none"!=aa[sa].style.display&&aa[sa].parentNode==I&&qa++;O.style.display=0==qa?"block":"none"}function N(aa,qa,sa,L){function V(){qa.removeChild(W);qa.removeChild(ka);Y.style.display="block";T.style.display="block"}z={div:qa,comment:aa,saveCallback:sa,deleteOnCancel:L};var T=qa.querySelector(".geCommentTxt"),Y=qa.querySelector(".geCommentActionsList"),W=document.createElement("textarea");
+W.className="geCommentEditTxtArea";W.style.minHeight=T.offsetHeight+"px";W.value=aa.content;qa.insertBefore(W,T);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(qa.parentNode.removeChild(qa),E()):V();z=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){T.innerText="";aa.content=W.value;mxUtils.write(T,aa.content);V();sa(aa);z=null});mxEvent.addListener(W,
+"keydown",mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(F.click(),mxEvent.consume(S)):27==S.keyCode&&(q.click(),mxEvent.consume(S)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);qa.insertBefore(ka,T);Y.style.display="none";T.style.display="none";W.focus()}function R(aa,qa){qa.innerText="";aa=new Date(aa.modifiedDate);var sa=b.timeSince(aa);null==sa&&(sa=mxResources.get("lessThanAMinute"));
+mxUtils.write(qa,mxResources.get("timeAgo",[sa],"{1} ago"));qa.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function G(aa){var qa=document.createElement("img");qa.className="geCommentBusyImg";qa.src=IMAGE_PATH+"/spin.gif";aa.appendChild(qa);aa.busyImg=qa}function M(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function Q(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function e(aa,qa,sa,L,V){function T(U,ca,ea){var na=document.createElement("li");na.className=
+"geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,U);na.appendChild(ra);mxEvent.addListener(ra,"click",function(ya){ca(ya,aa);ya.preventDefault();mxEvent.consume(ya)});ba.appendChild(na);ea&&(na.style.display="none")}function Y(){function U(na){ca.push(ea);if(null!=na.replies)for(var ra=0;ra<na.replies.length;ra++)ea=ea.nextSibling,U(na.replies[ra])}var ca=[],ea=ka;U(aa);return{pdiv:ea,replies:ca}}function W(U,ca,ea,na,ra){function ya(){G(Aa);
+aa.addReply(pa,function(xa){pa.id=xa;aa.replies.push(pa);Q(Aa);ea&&ea()},function(xa){va();M(Aa);b.handleError(xa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,ra)}function va(){N(pa,Aa,function(xa){ya()},!0)}var Da=Y().pdiv,pa=b.newComment(U,b.getCurrentUser());pa.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Aa=e(pa,aa.replies,Da,L+1);ca?va():ya()}if(V||!aa.isResolved){O.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
+ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*L+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,
+aa.user.displayName||"");F.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",aa.id);R(aa,S);F.appendChild(S);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var ba=document.createElement("ul");ba.className="geCommentActionsList";q.appendChild(ba);f||aa.isLocked||0!=
+L&&!k||T(mxResources.get("reply"),function(){W("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||f||aa.isLocked||(T(mxResources.get("edit"),function(){function U(){N(aa,ka,function(){G(ka);aa.editComment(aa.content,function(){Q(ka)},function(ca){M(ka);U();b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},aa.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(ka);aa.deleteComment(function(U){if(!0===
+U){U=ka.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var ca=ka.querySelectorAll(".geCommentAction");for(U=0;U<ca.length;U++)ca[U].parentNode.removeChild(ca[U]);Q(ka);ka.style.opacity="0.5"}else{ca=Y(aa).replies;for(U=0;U<ca.length;U++)I.removeChild(ca[U]);for(U=0;U<qa.length;U++)if(qa[U]==aa){qa.splice(U,1);break}O.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){M(ka);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+aa.isResolved));f||aa.isLocked||0!=L||T(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function ca(){var ea=U.target;ea.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ea,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=aa.isResolved?"none":"",ra=Y(aa).replies,ya=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",va=0;va<ra.length;va++){ra[va].style.backgroundColor=ya;for(var Da=ra[va].querySelectorAll(".geCommentAction"),
+pa=0;pa<Da.length;pa++)Da[pa]!=ea.parentNode&&(Da[pa].style.display=na);ia||(ra[va].style.display="none")}E()}aa.isResolved?W(mxResources.get("reOpened")+": ",!0,ca,!1,!0):W(mxResources.get("markedAsResolved"),!1,ca,!0)});ka.appendChild(q);null!=sa?I.insertBefore(ka,sa.nextSibling):I.appendChild(ka);for(sa=0;null!=aa.replies&&sa<aa.replies.length;sa++)q=aa.replies[sa],q.isResolved=aa.isResolved,e(q,aa.replies,null,L+1,V);null!=z&&(z.comment.id==aa.id?(V=aa.content,aa.content=z.comment.content,N(aa,
+ka,z.saveCallback,z.deleteOnCancel),aa.content=V):null==z.comment.id&&z.comment.pCommentId==aa.id&&(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return ka}}var f=!b.canComment(),k=b.canReplyToReplies(),z=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";t.appendChild(I);var O=document.createElement("span");O.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(O,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=B;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var y=B.cloneNode();y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(y,"click",function(aa){function qa(){N(sa,L,function(V){G(L);b.addComment(V,function(T){V.id=T;da.push(V);Q(L)},function(T){M(L);qa();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),L=e(sa,da,null,0);
+qa();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y)}y=B.cloneNode();y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';y.setAttribute("title",mxResources.get("showResolved"));y.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(y,"click",function(aa){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y);b.commentsRefreshNeeded()&&(y=B.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',y.setAttribute("title",mxResources.get("refresh")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(aa){ja();aa.preventDefault();mxEvent.consume(aa)}),J.appendChild(y));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(aa){p();aa.preventDefault();
+mxEvent.consume(aa)}),J.appendChild(B));t.appendChild(J);var da=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var aa=z.div.querySelector(".geCommentEditTxtArea"),qa=z.div.querySelector(".geCommentEditBtns");z.comment.content=aa.value;aa.parentNode.removeChild(aa);qa.parentNode.removeChild(qa)}catch(sa){b.handleError(sa)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(sa){function L(V){if(null!=V){V.sort(function(Y,W){return new Date(Y.modifiedDate)-new Date(W.modifiedDate)});for(var T=0;T<V.length;T++)L(V[T].replies)}}sa.sort(function(V,T){return new Date(V.modifiedDate)-new Date(T.modifiedDate)});I.innerText="";I.appendChild(O);O.style.display="block";da=sa;for(sa=0;sa<da.length;sa++)L(da[sa].replies),e(da[sa],da,null,0,ia);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&
+(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(sa){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;J=mxUtils.bind(this,function(){function aa(T){var Y=sa[T.id];if(null!=Y)for(R(T,Y),Y=0;null!=T.replies&&Y<T.replies.length;Y++)aa(T.replies[Y])}if(this.window.isVisible()){for(var qa=I.querySelectorAll(".geCommentDate"),
+sa={},L=0;L<qa.length;L++){var V=qa[L];sa[V.getAttribute("data-commentId")]=V}for(L=0;L<da.length;L++)aa(da[L])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=new mxWindow(mxResources.get("comments"),t,d,g,l,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,g,l,D,p,E,N,R,G,M){var Q=document.createElement("div");Q.style.textAlign="center";M=null!=M?M:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=M+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=G&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",G),e.appendChild(d),Q.appendChild(e));G=document.createElement("div");
+G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=N&&(p.innerHTML=N+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var k=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=g&&
+g(f.checked)});G.appendChild(k);null!=E?(k.innerHTML=E+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||G.appendChild(p);Q.appendChild(G);R?(G.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),
+e.appendChild(D),Q.appendChild(e),mxEvent.addListener(D,"click",function(z){f.checked=!f.checked;mxEvent.consume(z)})):G.style.marginTop="12px";this.init=function(){k.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,g){this.ui=b;this.page=d;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,d,g){this.ui=b;this.oldIndex=d;this.newIndex=g}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,d,g){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=g&&(d.viewState=g,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,g=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);
+g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();g.view.validate();g.blockMathRender=!0;g.sizeDidChange();g.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,g.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,d,g,l,D){SelectPage.call(this,b,g);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=D}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
-this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
-p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
-Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
-JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){d=g;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var g=0;g<d.length;g++)if(d[g].getId()==b)return d[g];return null};
+EditorUi.prototype.createImageForPageLink=function(b,d,g){var l=b.indexOf(","),D=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(D=this.getImageForPage(l,d,g),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
+EditorUi.prototype.getImageForPage=function(b,d,g){g=null!=g?g:this.editor.graph;var l=g.getGlobalVariable,D=this.createTemporaryGraph(g.getStylesheet());D.defaultPageBackgroundColor=g.defaultPageBackgroundColor;D.shapeBackgroundColor=g.shapeBackgroundColor;D.shapeForegroundColor=g.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);D.getGlobalVariable=function(N){return"pagenumber"==N?p+1:"page"==N&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(D.container);
+this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";g=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(g)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var g=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=g&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),g=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,
+p){D=p.getProperty("edit").changes;for(p=0;p<D.length;p++)if(D[p]instanceof SelectPage||D[p]instanceof RenamePage||D[p]instanceof MovePage||D[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,d,g){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(g))};
+Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),N=b.getAttribute("extFonts");if(N)try{N=N.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}})}catch(R){console.log("ExtFonts format error: "+R.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(l)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:N||[]}};
+Graph.prototype.saveViewState=function(b,d,g,l){g||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(d.setAttribute("pageWidth",g.width),d.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
+JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(D){return D.name+"^"+D.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var m=document.getElementById("extFont_"+k[e].name);null!=m&&m.parentNode.removeChild(m)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
+Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var g=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=g)for(d=0;d<g.length;d++){var l=document.getElementById("extFont_"+g[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;m=!0;for(C=0;C<k.length;C++)if(k[C].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};
-EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
-e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var m=this.editor.graph.model.createUndoableEdit();m.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();m.add(C);m.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",m))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
-EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
+Graph.prototype.addExtFont=function(b,d,g){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var D=document.createElement("style");D.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));D.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(D)}if(!g){null==
+this.extFonts&&(this.extFonts=[]);g=this.extFonts;l=!0;for(D=0;D<g.length;D++)if(g[D].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var g=Editor.extractParserError(d);if(g)throw Error(g);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),g=new mxCodec(d.ownerDocument),b.root=g.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(g=Editor.extractParserError(d))throw Error(g);null!=d&&(b.graphModelNode=
+d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,d,g){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var D=new SelectPage(this,b,g);D.execute();l.add(D);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var g=this.pages[d].getName();null!=g&&0<g.length&&(b[g]=g)}d=this.pages.length;do g=mxResources.get("pageWithNumber",[++d]);while(null!=b[g]);return g};
+EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,l=this.pages[g]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
+EditorUi.prototype.duplicatePage=function(b,d){var g=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);g=new DiagramPage(D);g.root=l.cloneCell(l.model.root,null,p);var N=new mxGraphModel;N.prefix=Editor.guid()+"-";N.setRoot(g.root);l.updateCustomLinks(l.createCellMapping(p,E),[g.root]);g.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(g);
+g.viewState.scale=1;g.viewState.scrollLeft=null;g.viewState.scrollTop=null;g.viewState.currentRoot=null;g.viewState.defaultParent=null;g.setName(d);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return g};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
+EditorUi.prototype.clonePages=function(b){for(var d=[],g=0;g<b.length;g++)d.push(this.clonePage(b[g]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
-g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);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 P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
-this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
-EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
-P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
-m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
-!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
-N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
-(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
-(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
-return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
-N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
-0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
-Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
-ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
-t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
-var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
-t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
-null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
-aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
-(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
-for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
-var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
-null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
-Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
-null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
-13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
-mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
-Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
-X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){ba.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 oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
-!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-F.vertex=!0;var L=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
-F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');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;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');y.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;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var g=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-g)/this.pages.length)+
+1),D=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(G,M){this.pages[G]==this.currentPage?(M.className="geActivePage",M.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):M.className="geInactivePage";M.setAttribute("draggable","true");mxEvent.addListener(M,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),D=G):mxEvent.consume(Q)}));mxEvent.addListener(M,"dragend",mxUtils.bind(this,function(Q){D=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(Q){null!=D&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(Q){null!=D&&G!=D&&this.movePage(D,G);Q.stopPropagation();Q.preventDefault()}));d.appendChild(M)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-g){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var 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 R=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=R+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(G){d.scrollLeft-=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,
+d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(N,"click",mxUtils.bind(this,function(G){d.scrollLeft+=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
+this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(g))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(g)})));return d};
+EditorUi.prototype.createControlTab=function(b,d,g){g=this.createTab(null!=g?g:!0);g.style.lineHeight=this.tabContainerHeight+"px";g.style.paddingTop=b+"px";g.style.cursor="pointer";g.style.width="30px";g.innerHTML=d;null!=g.firstChild&&null!=g.firstChild.style&&mxUtils.setOpacity(g.firstChild,40);return g};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var g=b.getElementsByTagName("div")[0];g.style.display="inline-block";g.style.marginTop="5px";g.style.width="21px";g.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+var D=new mxPopupMenu(mxUtils.bind(this,function(N,R){var G=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(k){var z=N.addItem(this.getShortPageName(this.pages[k]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[k])}),R),t=this.pages[k].getId();z.setAttribute("title",this.pages[k].getName()+" ("+(k+1)+"/"+this.pages.length+")"+(null!=t?" ["+t+"]":""));this.pages[k]==this.currentPage&&N.addCheckmark(z,Editor.checkmarkImage)})(f)}),M=mxUtils.bind(this,
+function(){N.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),R)});d||G();if(this.editor.graph.isEnabled()){d||(N.addSeparator(R),M());var Q=this.currentPage;if(null!=Q){N.addSeparator(R);var e=this.getShortPageName(Q);N.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),R);N.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),R);d||N.addSeparator(R);N.addItem(mxResources.get("duplicateIt",
+[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),R)}}d&&(N.addSeparator(R),M(),N.addSeparator(R),G())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);D.popup(p,E,null,l);this.setCurrentMenu(D);mxEvent.consume(l)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){this.insertPage();mxEvent.consume(g)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,d,g,l){g=this.createTab(g);var D=b.getName()||mxResources.get("untitled"),p=b.getId();g.setAttribute("title",D+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(g,D);g.style.maxWidth=d+"px";g.style.width=d+"px";this.addTabListeners(b,g);42<d&&(g.style.textOverflow="ellipsis");return g};
+EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var g=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,D=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;D=b==this.currentPage;g.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(g.isEnabled()&&!g.isMouseDown&&(mxEvent.isTouchEvent(p)&&D||mxEvent.isPopupTrigger(p))){g.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(b));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);this.resetCurrentMenu();E.destroy()});var N=mxEvent.getClientX(p),R=mxEvent.getClientY(p);E.popup(N,R,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,d,g){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=d&&(D+="&"+d.join("&"));return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(g,l){var D=this.editor.graph;g.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);g.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(g.addSeparator(l),g.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,N,R,G,M){p=this.createUrlParameters(p,E,N,R,G,M);N||p.push("hide-pages=1");D.isSelectionEmpty()||(N=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,G=D.view.scale,N.width/=G,N.height/=G,N.x=N.x/G-E.x,N.y=N.y/G-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(N.x),y:Math.round(N.y),width:Math.round(N.width),height:Math.round(N.height),border:100}))));
+R=new EmbedDialog(this,this.getLinkForPage(b,p,R));this.showDialog(R.container,450,240,!0,!0);R.init()}))})));g.addSeparator(l);g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(g.addSeparator(l),g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,g,l){l.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(l.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(D,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?p:void 0})),null!=g.relatedPage.root&&d.encodeCell(g.relatedPage.root,
+l));return l};b.beforeDecode=function(d,g,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(g.getAttribute("relatedPage"));if(null==l.relatedPage){var D=g.ownerDocument.createElement("diagram");D.setAttribute("id",g.getAttribute("relatedPage"));D.setAttribute("name",g.getAttribute("name"));l.relatedPage=new DiagramPage(D);D=g.getAttribute("viewState");null!=D&&(l.relatedPage.viewState=JSON.parse(D),g.removeAttribute("viewState"));g=g.cloneNode(!0);D=g.firstChild;if(null!=D)for(l.relatedPage.root=d.decodeCell(D,
+!1),l=D.nextSibling,D.parentNode.removeChild(D),D=l;null!=D;){l=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==d.lookup(p)&&d.decodeCell(D)}D.parentNode.removeChild(D);D=l}}return g};b.afterDecode=function(d,g,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,D,p,E,N){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var R=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(l,p[G]);p=R;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(l,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(N,R){var G=null!=R&&this.isTreeEdge(R);G&&p.push(R);N==D||null!=R&&!G||p.push(N);return(null==R||G)&&(N==D||!this.model.isCollapsed(N))}));this.model.setCollapsed(D,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,D,p,E,N,R){return this.model.filterCells(this.getEdges(l,
+D,p,E,N,R),mxUtils.bind(this,function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!1,!0,!1)};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 l(L){return z.isVertex(L)&&p(L)}function D(L){var V=
+!1;null!=L&&(V="1"==k.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),V="tree"==(null!=V?V.style:k.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),k.view.getState(L),V=null!=(null!=V?V.style:k.getCellStyle(L)).childLayout);return V}function N(L){L=k.view.getState(L);if(null!=L){var V=k.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=k.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(L,V){V=null!=V?V:!0;k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=k.cloneCells([Y[0],L]);k.model.setTerminal(W[0],k.model.getTerminal(Y[0],
+!0),!0);var ka=N(L),q=T.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=V?L.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=V?L.geometry.height+10:-W[1].geometry.height-10;k.view.currentRoot!=T&&(W[1].geometry.x-=q.x,W[1].geometry.y-=q.y);var F=k.view.getState(L),S=k.view.scale;if(null!=F){var ba=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ba.x+=(V?L.geometry.width+10:-W[1].geometry.width-10)*S:
+ba.y+=(V?L.geometry.height+10:-W[1].geometry.height-10)*S;var U=k.getOutgoingTreeEdges(k.model.getTerminal(Y[0],!0));if(null!=U){for(var ca=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=Y=0;ea<U.length;ea++){var na=k.model.getTerminal(U[ea],!1);if(ka==N(na)){var ra=k.view.getState(na);na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY())&&mxUtils.intersects(ba,ra)&&(Y=10+Math.max(Y,(Math.min(ba.x+ba.width,ra.x+ra.width)-Math.max(ba.x,
+ra.x))/S),q=10+Math.max(q,(Math.min(ba.y+ba.height,ra.y+ra.height)-Math.max(ba.y,ra.y))/S))}}ca?q=0:Y=0;for(ea=0;ea<U.length;ea++)if(na=k.model.getTerminal(U[ea],!1),ka==N(na)&&(ra=k.view.getState(na),na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY()))){var ya=[];k.traverse(ra.cell,!0,function(va,Da){var pa=null!=Da&&k.isTreeEdge(Da);pa&&ya.push(Da);(null==Da||pa)&&ya.push(va);return null==Da||pa});k.moveCells(ya,(V?1:-1)*Y,(V?1:-1)*q)}}}return k.addCells(W,
+T)}finally{k.model.endUpdate()}}function G(L){k.model.beginUpdate();try{var V=N(L),T=k.getIncomingTreeEdges(L),Y=k.cloneCells([T[0],L]);k.model.setTerminal(T[0],Y[1],!1);k.model.setTerminal(Y[0],Y[1],!0);k.model.setTerminal(Y[0],L,!1);var W=k.model.getParent(L),ka=W.geometry,q=[];k.view.currentRoot!=W&&(Y[1].geometry.x-=ka.x,Y[1].geometry.y-=ka.y);k.traverse(L,!0,function(ba,U){var ca=null!=U&&k.isTreeEdge(U);ca&&q.push(U);(null==U||ca)&&q.push(ba);return null==U||ca});var F=L.geometry.width+40,S=
+L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION_NORTH?(F=0,S=-S):V==mxConstants.DIRECTION_WEST?(F=-F,S=0):V==mxConstants.DIRECTION_EAST&&(S=0);k.moveCells(q,F,S);return k.addCells(Y,W)}finally{k.model.endUpdate()}}function M(L,V){k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=N(L);0==Y.length&&(Y=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],W=V);var ka=k.cloneCells([Y[0],L]);k.model.setTerminal(ka[0],L,!0);if(null==
+k.model.getTerminal(ka[0],!1)){k.model.setTerminal(ka[0],ka[1],!1);var q=k.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),S;for(S in F)k.setCellStyles(S,F[S],[ka[0]]),"edgeStyle"==S&&"elbowEdgeStyle"==F[S]&&k.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ra){}}Y=k.getOutgoingTreeEdges(L);var ba=T.geometry;V=[];k.view.currentRoot==T&&(ba=new mxRectangle);for(q=0;q<Y.length;q++){var U=k.model.getTerminal(Y[q],
+!1);null!=U&&V.push(U)}var ca=k.view.getBounds(V),ea=k.view.translate,na=k.view.scale;W==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x-ba.x+10,ka[1].geometry.y+=ka[1].geometry.height-ba.y+40):W==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x+-ba.x+10,ka[1].geometry.y-=ka[1].geometry.height+ba.y+40):(ka[1].geometry.x=W==mxConstants.DIRECTION_WEST?
+ka[1].geometry.x-(ka[1].geometry.width+ba.x+40):ka[1].geometry.x+(ka[1].geometry.width-ba.x+40),ka[1].geometry.y=null==ca?L.geometry.y+(L.geometry.height-ka[1].geometry.height)/2:(ca.y+ca.height)/na-ea.y+-ba.y+10);return k.addCells(ka,T)}finally{k.model.endUpdate()}}function Q(L,V,T){L=k.getOutgoingTreeEdges(L);T=k.view.getState(T);var Y=[];if(null!=T&&null!=L){for(var W=0;W<L.length;W++){var ka=k.view.getState(k.model.getTerminal(L[W],!1));null!=ka&&(!V&&Math.min(ka.x+ka.width,T.x+T.width)>=Math.max(ka.x,
+T.x)||V&&Math.min(ka.y+ka.height,T.y+T.height)>=Math.max(ka.y,T.y))&&Y.push(ka)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var T=N(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==Y&&T!=V?f.actions.get("selectParent").funct():T==V?(V=k.getOutgoingTreeEdges(L),null!=V&&0<V.length&&k.setSelectionCell(k.model.getTerminal(V[0],!1))):(T=k.getIncomingTreeEdges(L),
+null!=T&&0<T.length&&(Y=Q(k.model.getTerminal(T[0],!0),Y,L),L=k.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&k.setSelectionCell(Y[L].cell)))))}var f=this,k=f.editor.graph,z=k.getModel(),t=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,T){t.apply(this,arguments);if(1==k.getSelectionCount()){V=k.getSelectionCell();var Y=k.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(k.getSelectionCell())&&
+this.addMenuItems(L,["selectChildren"],null,T),this.addMenuItems(L,["selectDescendants"],null,T));l(k.getSelectionCell())?(L.addSeparator(),0<k.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,T)):0<k.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,T)}};f.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],
+!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=k.getOutgoingTreeEdges(k.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=
+k.getSelectionCell();L=k.getIncomingTreeEdges(L);null!=L&&0<L.length&&k.setSelectionCell(k.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=k.getSelectionCell();if(k.isEnabled()&&k.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))k.setSelectionCells(k.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var T=[];k.traverse(L,!0,function(Y,W){var ka=null!=W&&k.isTreeEdge(W);ka&&T.push(W);null!=
+W&&!ka||null!=V&&mxEvent.isShiftDown(V)||T.push(Y);return null==W||ka})}k.setSelectionCells(T)}},null,null,"Alt+Shift+D");var B=k.removeCells;k.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var T=[],Y=0;Y<L.length;Y++){var W=L[Y];z.isEdge(W)&&p(W)&&(T.push(W),W=z.getTerminal(W,!1));if(l(W)){var ka=[];k.traverse(W,!0,function(q,F){var S=null!=F&&k.isTreeEdge(F);S&&ka.push(F);(null==F||S)&&
+ka.push(q);return null==F||S});0<ka.length&&(T=T.concat(ka),W=k.getIncomingTreeEdges(L[Y]),L=L.concat(W))}else null!=W&&T.push(L[Y])}L=T;return B.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,T){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,T))};var I=k.duplicateCells;k.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var T=L.slice(0),Y=0;Y<T.length;Y++){var W=k.view.getState(T[Y]);if(null!=W&&l(W.cell)){var ka=k.getIncomingTreeEdges(W.cell);
+for(W=0;W<ka.length;W++)mxUtils.remove(ka[W],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=k.getIncomingTreeEdges(q[Y]);ka=k.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<ka.length){var S=this.cloneCell(ka[0]);this.addEdge(S,k.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var O=k.moveCells;k.moveCells=function(L,V,T,Y,W,ka,q){var F=null;this.model.beginUpdate();try{var S=
+W,ba=this.getCurrentCellStyle(W);if(null!=L&&l(W)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||k.model.isEdge(L[U])&&null==k.model.getTerminal(L[U],!0)){W=k.model.getParent(L[U]);break}if(null!=S&&W!=S&&null!=this.view.getState(L[0])){var ca=k.getIncomingTreeEdges(L[0]);if(0<ca.length){var ea=k.view.getState(k.model.getTerminal(ca[0],!0));if(null!=ea){var na=k.view.getState(S);null!=na&&(V=(na.getCenterX()-ea.getCenterX())/k.view.scale,T=(na.getCenterY()-ea.getCenterY())/
+k.view.scale)}}}}F=O.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(S)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],S,!0);else if(l(L[U])&&(ca=k.getIncomingTreeEdges(L[U]),0<ca.length))if(!Y)l(S)&&0>mxUtils.indexOf(L,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],S,!0);else if(0==k.getIncomingTreeEdges(F[U]).length){ba=S;if(null==ba||ba==k.model.getParent(L[U]))ba=k.model.getTerminal(ca[0],
+!0);Y=this.cloneCell(ca[0]);this.addEdge(Y,k.getDefaultParent(),ba,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var J=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,T,Y){var W=k.model,ka=null;W.beginUpdate();try{if(ka=J.apply(this,arguments),l(L))for(var q=0;q<ka.length;q++)if(W.isEdge(ka[q])&&null==W.getTerminal(ka[q],!0)){W.setTerminal(ka[q],L,!0);var F=k.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return ka}}var y=
+{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(k.isEnabled()&&!k.isEditing()&&l(k.getSelectionCell())&&1==k.getSelectionCount()){var V=null;0<k.getIncomingTreeEdges(k.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?G(k.getSelectionCell()):M(k.getSelectionCell()):13==L.which&&(V=R(k.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
+V.length&&k.model.isEdge(V[0])?k.setSelectionCell(k.model.getTerminal(V[0],!1)):k.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var T=y[L.keyCode];null!=T&&(T.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var da=k.connectVertex;k.connectVertex=function(L,V,T,Y,W,ka,q){var F=k.getIncomingTreeEdges(L);if(l(L)){var S=N(L),ba=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return S==V||0==F.length?M(L,V):ba==U?G(L):R(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return da.apply(this,arguments)};k.getSubtree=function(L){var V=[L];!D(L)&&!l(L)||E(L)||k.traverse(L,!0,function(T,Y){var W=null!=Y&&k.isTreeEdge(Y);W&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||W)&&0>mxUtils.indexOf(V,T)&&V.push(T);return null==Y||W});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(D(this.state.cell)||l(this.state.cell))&&
+!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){aa.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 qa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){qa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var sa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){sa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
+typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=g.apply(this,arguments),D=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+E.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);p.insert(R);p.insert(E);p.insert(N);return sb.createVertexTemplateFromCells([p],p.geometry.width,
+p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var N=new mxCell("Topic",
+new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);
+var G=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var 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;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);f.insertEdge(k,!1);p.insert(R);p.insert(M);p.insert(e);p.insert(k);p.insert(E);p.insert(N);p.insert(G);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
-"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
-function(T){D.createFormat(T).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=I?I:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
-var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
-I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
-"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
-function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
-D.sidebarElt.style.borderRight="1px solid gray"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var N=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);p.insert(R);p.insert(M);p.insert(E);p.insert(N);p.insert(G);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
+"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var N=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");R.geometry.setTerminalPoint(new mxPoint(110,-40),!0);R.geometry.relative=
+!0;R.edge=!0;N.insertEdge(R,!1);return sb.createVertexTemplateFromCells([E,R,p,N],220,60,"Sub Sections")})])}}})();"1"==urlParams["live-ui"]&&"min"==uiTheme&&"1"==urlParams.sketch&&(Editor.currentTheme="sketch",uiTheme="kennedy");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.formatWindow){B="1"==urlParams.sketch?Math.max(10,t.diagramContainer.clientWidth-244):Math.max(10,t.diagramContainer.clientWidth-248);var O="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);t.formatWindow=new WrapperWindow(t,mxResources.get("format"),B,O,240,I,
+function(J){t.createFormat(J).init()});t.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){t.formatWindow.window.fit()}));t.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else t.formatWindow.window.setVisible(null!=B?B:!t.formatWindow.window.isVisible())}else null==t.formatElt&&(t.formatElt=t.createSidebarContainer(),t.createFormat(t.formatElt).init(),t.formatElt.style.border="none",t.formatElt.style.width="240px",t.formatElt.style.borderLeft="1px solid gray",
+t.formatElt.style.right="0px"),I=t.diagramContainer.parentNode,null!=t.formatElt.parentNode?(t.formatElt.parentNode.removeChild(t.formatElt),I.style.right="0px"):(I.parentNode.appendChild(t.formatElt),I.style.right=t.formatElt.style.width)}function d(t,B){function I(ia,da){var ja=t.menus.get(ia);ia=y.addMenu(da,mxUtils.bind(this,function(){ja.funct.apply(this,arguments)}));ia.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+ia.className="geTitle";B.appendChild(ia);return ia}var O=document.createElement("div");O.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";O.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";J.innerHTML="+";O.appendChild(J);mxUtils.write(O,mxResources.get("moreShapes"));B.appendChild(O);mxEvent.addListener(O,"click",function(){t.actions.get("shapes").funct()});
+var y=new Menubar(t,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?O.style.bottom="0":null!=t.actions.get("newLibrary")?(O=document.createElement("div"),O.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),O.appendChild(J),
+B.appendChild(O),mxEvent.addListener(O,"click",t.actions.get("newLibrary").funct),O=document.createElement("div"),O.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),O.appendChild(J),B.appendChild(O),mxEvent.addListener(O,
+"click",t.actions.get("openLibrary").funct)):(O=I("newLibrary",mxResources.get("newLibrary")),O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="0",O=I("openLibraryFrom",mxResources.get("openLibraryFrom")),O.style.borderLeft="1px solid lightgray",O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="50%");B.appendChild(t.sidebar.container);B.style.overflow="hidden"}
+function g(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.sidebarWindow){B=Math.min(I.container.clientWidth-10,218);var O="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);t.sidebarWindow=new WrapperWindow(t,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-O)/2):56,B-6,O-6,function(J){d(t,J)});t.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){t.sidebarWindow.window.fit()}));t.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);t.sidebarWindow.window.setVisible(!0);isLocalStorage&&t.getLocalData("sidebar",function(J){t.sidebar.showEntries(J,null,!0)});t.restoreLibraries()}else t.sidebarWindow.window.setVisible(null!=B?B:!t.sidebarWindow.window.isVisible())}else null==t.sidebarElt&&(t.sidebarElt=t.createSidebarContainer(),d(t,t.sidebarElt),t.sidebarElt.style.border="none",t.sidebarElt.style.width="210px",
+t.sidebarElt.style.borderRight="1px solid gray"),I=t.diagramContainer.parentNode,null!=t.sidebarElt.parentNode?(t.sidebarElt.parentNode.removeChild(t.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(t.sidebarElt),I.style.left=t.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(t){}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="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.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 F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
-S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
-"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
-H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
-"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
-D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
-b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=I||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
-I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
-!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
-function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(pa));M.menus.menuCreated(Fa,
-Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
-"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
-Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
-for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
-la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
-null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
-W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);var T=document.createElement("div");T.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";T.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&
-!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
-var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
-Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
-this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
-"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
-la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
-"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
-urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
-"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
-ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
-"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
-2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
-(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
-aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
-fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
-(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
-""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
-"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
-"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
-"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
-ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
-Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
-null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
-"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
-Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
-"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
-E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-ha.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";N.appendChild(ia);N.appendChild(ha);X.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
-"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
-"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
-null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
-function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});T=document.createElement("div");T.style.position="absolute";T.style.width="10px";T.style.height="10px";T.style.borderRadius="5px";T.style.border="1px solid gray";T.style.background="#ffffff";T.style.cursor="row-resize";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
-function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
-Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
-M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var D=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");D.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 E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(t,B){null!=B.shortcut&&900>l&&!mxClient.IS_IOS?t.firstChild.nextSibling.setAttribute("title",B.shortcut):E.apply(this,arguments)};var N=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){N.apply(this,arguments);if(null!=this.userElement){var t=this.userElement;t.style.cssText="position:relative;cursor:pointer;display:"+t.style.display;t.className="geToolbarButton";
+t.innerText="";t.style.backgroundImage="url("+Editor.userImage+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="24px 24px";t.style.height="24px";t.style.width="24px";var B=mxResources.get("changeUser");if("none"!=t.style.display){t.style.display="inline-block";var I=this.getCurrentFile();if(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()){var O=document.createElement("img");O.setAttribute("border","0");O.style.position="absolute";
+O.style.left="18px";O.style.top="2px";O.style.width="12px";O.style.height="12px";var J=I.getRealtimeError();I=I.getRealtimeState();B+=" ("+mxResources.get("realtimeCollaboration")+": ";1==I?(O.src=Editor.syncImage,B+=mxResources.get("online")):(O.src=Editor.syncProblemImage,B=null!=J&&null!=J.message?B+J.message:B+mxResources.get("disconnected"));t.style.marginRight="6px";t.appendChild(O);B+=")"}}t.setAttribute("title",B)}};var R=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){R.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var t=document.createElement("div");t.style.display="inline-block";t.style.position="relative";t.style.marginTop="6px";t.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,I);B.setAttribute("title",I);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));t.appendChild(B)}}else 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()})),t.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()})),t.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,
+I),B.setAttribute("title",I),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),t.appendChild(B));this.buttonContainer.appendChild(t);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var G=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(t,B,I){var O=this.editorUi.editor.graph;t.smartSeparators=!0;G.apply(this,arguments);
+"1"==urlParams.sketch?O.isEnabled()&&(t.addSeparator(),1==O.getSelectionCount()&&this.addMenuItems(t,["-","lockUnlock"],null,I)):1==O.getSelectionCount()?(O.isCellFoldable(O.getSelectionCell())&&this.addMenuItems(t,O.isCellCollapsed(B)?["expand"]:["collapse"],null,I),this.addMenuItems(t,["collapsible","-","lockUnlock","enterGroup"],null,I),t.addSeparator(),this.addSubmenu("layout",t)):O.isSelectionEmpty()&&O.isEnabled()?(t.addSeparator(),this.addMenuItems(t,["editData"],null,I),t.addSeparator(),this.addSubmenu("layout",
+t),this.addSubmenu("insert",t),this.addMenuItems(t,["-","exitGroup"],null,I)):O.isEnabled()&&this.addMenuItems(t,["-","lockUnlock"],null,I)};var M=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(t,B,I){M.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(t,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(t){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=t?t:!this.formatWindow.window.isVisible()):
+b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();Q.apply(this,arguments)};var e=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(t){e.apply(this,arguments);if(t){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var f=Menus.prototype.init;Menus.prototype.init=function(){f.apply(this,arguments);var t=this.editorUi,B=t.actions.put("togglePagesVisible",
+new Action(mxResources.get("pages"),function(da){t.setPagesVisible(!Editor.pagesVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.pagesVisible});t.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){g(t)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!t.isOffline()&&t.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var da=new ParseDialog(t,mxResources.get("plantUml")+"...","plantUml");t.showDialog(da.container,
+620,420,!0,!1);da.init()}));t.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var da=new ParseDialog(t,mxResources.get("mermaid")+"...","mermaid");t.showDialog(da.container,620,420,!0,!1);da.init()}));var I=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(da,ja){var aa=this.editorUi.editor.graph,qa=aa.getSelectionCell();I.call(this,da,qa,null,ja);this.addMenuItems(da,["editTooltip"],ja);aa.model.isVertex(qa)&&this.addMenuItems(da,
+["editGeometry"],ja);this.addMenuItems(da,["-","edit"],ja)})));this.addPopupMenuCellEditItems=function(da,ja,aa,qa){da.addSeparator();this.addSubmenu("editCell",da,qa,mxResources.get("edit"))};var O=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(da,ja){O.funct(da,ja);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.menus.addMenuItems(da,["publishLink"],ja);t.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(da.addSeparator(ja),t.menus.addSubmenu("embed",da,ja))})));var J=
+this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(da,ja){J.funct(da,ja);this.addMenuItems(da,["-","ruler","-","pageScale"],ja)})));var y="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),ia=function(da,ja,aa,qa){da.addItem(aa,null,mxUtils.bind(this,function(){var sa=new CreateGraphDialog(t,aa,qa);t.showDialog(sa.container,620,420,!0,!1);sa.init()}),ja)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(da,ja){for(var aa=
+0;aa<y.length;aa++)"-"==y[aa]?da.addSeparator(ja):ia(da,ja,mxResources.get(y[aa])+"...",y[aa])})))};EditorUi.prototype.installFormatToolbar=function(t){var B=this.editor.graph,I=document.createElement("div");I.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(O,J){0<B.getSelectionCount()?
+(t.appendChild(I),I.innerHTML="Selected: "+B.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var k=!1;EditorUi.prototype.initFormatWindow=function(){if(!k&&null!=this.formatWindow){k=!0;var t=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){t.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-
+140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function t(oa,ta,Ea){var Fa=y.menus.get(oa),Pa=aa.addMenu(mxResources.get(oa),
+mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ja);Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.top="6px";Pa.style.marginRight="6px";Pa.style.height="30px";Pa.style.paddingTop="6px";Pa.style.paddingBottom="6px";Pa.style.cursor="pointer";Pa.setAttribute("title",mxResources.get(oa));y.menus.menuCreated(Fa,Pa,"geMenuItem");null!=Ea?(Pa.style.backgroundImage="url("+Ea+")",Pa.style.backgroundPosition=
+"center center",Pa.style.backgroundRepeat="no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px",Pa.innerText=""):ta||(Pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Pa.style.backgroundPosition="right 6px center",Pa.style.backgroundRepeat="no-repeat",Pa.style.paddingRight="22px");return Pa}function B(oa,ta,Ea,Fa,Pa,Ra){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing=
+"border-box";Ca.style.height="30px";Ca.style.padding="6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=y.statusContainer?da.insertBefore(Ca,y.statusContainer):da.appendChild(Ca);null!=Ra?(Ca.style.backgroundImage="url("+Ra+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",
+Ca.style.width="34px"):mxUtils.write(Ca,oa);mxEvent.addListener(Ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ja){Ja.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ja){"disabled"!=Ca.getAttribute("disabled")&&ta(Ja);mxEvent.consume(Ja)});null==Ea&&(Ca.style.marginRight="4px");null!=Fa&&Ca.setAttribute("title",Fa);null!=Pa&&(oa=function(){Pa.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor=
+"default")},Pa.addListener("stateChanged",oa),ia.addListener("enabledChanged",oa),oa());return Ca}function I(oa,ta,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");for(var Fa=0;Fa<oa.length;Fa++)null!=oa[Fa]&&("1"==urlParams.sketch&&(oa[Fa].style.padding=
+"10px 8px",oa[Fa].style.width="30px"),oa[Fa].style.margin="0px",oa[Fa].style.boxShadow="none",Ea.appendChild(oa[Fa]));null!=ta&&mxUtils.setOpacity(Ea,ta);null!=y.statusContainer&&"1"!=urlParams.sketch?da.insertBefore(Ea,y.statusContainer):da.appendChild(Ea);return Ea}function O(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ka.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var oa=da.firstChild;null!=oa;){var ta=oa.nextSibling;"geMenuItem"!=oa.className&&"geItem"!=oa.className||
+oa.parentNode.removeChild(oa);oa=ta}ja=da.firstChild;l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;oa=1E3>l||"1"==urlParams.sketch;var Ea=null;oa||(Ea=t("diagram"));ta=oa?t("diagram",null,Editor.menuImage):null;null!=ta&&(Ea=ta);I([Ea,B(mxResources.get("shapes"),y.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),y.actions.get("image"),oa?Editor.shapesImage:null),B(mxResources.get("format"),y.actions.get("format").funct,null,mxResources.get("format")+
+" ("+y.actions.get("format").shortcut+")",y.actions.get("image"),oa?Editor.formatImage:null)],oa?60:null);ta=t("insert",!0,oa?T:null);I([ta,B(mxResources.get("delete"),y.actions.get("delete").funct,null,mxResources.get("delete"),y.actions.get("delete"),oa?Editor.trashImage:null)],oa?60:null);411<=l&&(I([Oa,Na],60),520<=l&&I([P,640<=l?B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=l?B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+
+" -)",pa,Editor.zoomOutImage):null],60))}null!=Ea&&(mxEvent.disableContextMenu(Ea),mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&y.appIconClicked(Fa)}),null,null));ta=y.menus.get("language");null!=ta&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Z&&(ta=aa.addMenu("",ta.funct),ta.setAttribute("title",
+"language"),ta.className="geToolbarButton",ta.style.backgroundImage="url("+Editor.globeImage+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat="no-repeat",ta.style.backgroundSize="22px 22px",ta.style.position="absolute",ta.style.height="24px",ta.style.width="24px",ta.style.zIndex="1",ta.style.right="8px",ta.style.cursor="pointer",ta.style.top="12px",da.appendChild(ta),Z=ta),y.buttonContainer.style.paddingRight="34px"):(y.buttonContainer.style.paddingRight="4px",null!=Z&&(Z.parentNode.removeChild(Z),
+Z=null))}z.apply(this,arguments);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),
+this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var y=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==y.embedViewport)mxUtils.fit(this.div);else{var oa=parseInt(this.div.offsetLeft),
+ta=parseInt(this.div.offsetWidth),Ea=y.embedViewport.x+y.embedViewport.width,Fa=parseInt(this.div.offsetTop),Pa=parseInt(this.div.offsetHeight),Ra=y.embedViewport.y+y.embedViewport.height;this.div.style.left=Math.max(y.embedViewport.x,Math.min(oa,Ea-ta))+"px";this.div.style.top=Math.max(y.embedViewport.y,Math.min(Fa,Ra-Pa))+"px";this.div.style.height=Math.min(y.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(y.embedViewport.width,parseInt(this.div.style.width))+
+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>l||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));y=this;var ia=y.editor.graph;y.toolbar=this.createToolbar(y.createDiv("geToolbar"));y.defaultLibraryName=
+mxResources.get("untitledLibrary");var da=document.createElement("div");da.className="geMenubarContainer";var ja=null,aa=new Menubar(y,da);y.statusContainer=y.createStatusContainer();y.statusContainer.style.position="relative";y.statusContainer.style.maxWidth="";y.statusContainer.style.marginTop="7px";y.statusContainer.style.marginLeft="6px";y.statusContainer.style.color="gray";y.statusContainer.style.cursor="default";var qa=y.hideCurrentMenu;y.hideCurrentMenu=function(){qa.apply(this,arguments);
+this.editor.graph.popupMenuHandler.hideMenu()};var sa=y.descriptorChanged;y.descriptorChanged=function(){sa.apply(this,arguments);var oa=y.getCurrentFile();if(null!=oa&&null!=oa.getTitle()){var ta=oa.getMode();"google"==ta?ta="googleDrive":"github"==ta?ta="gitHub":"gitlab"==ta?ta="gitLab":"onedrive"==ta&&(ta="oneDrive");ta=mxResources.get(ta);da.setAttribute("title",oa.getTitle()+(null!=ta?" ("+ta+")":""))}else da.removeAttribute("title")};y.setStatusText(y.editor.getStatus());da.appendChild(y.statusContainer);
+y.buttonContainer=document.createElement("div");y.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";da.appendChild(y.buttonContainer);y.menubarContainer=y.buttonContainer;y.tabContainer=document.createElement("div");y.tabContainer.className="geTabContainer";y.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+J=y.diagramContainer.parentNode;var L=document.createElement("div");L.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";y.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){L.style.top="20px";y.titlebar=document.createElement("div");y.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var V=document.createElement("div");
+V.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";y.titlebar.appendChild(V);J.appendChild(y.titlebar)}var T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Y="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ka="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ka.style.left=
+"10px",ka.style.top="10px",W.style.left="10px",W.style.top="60px",Y.style.top="10px",Y.style.right="12px",Y.style.left="",y.diagramContainer.setAttribute("data-bounds",y.diagramContainer.style.top+" "+y.diagramContainer.style.left+" "+y.diagramContainer.style.width+" "+y.diagramContainer.style.height),y.diagramContainer.style.top="0px",y.diagramContainer.style.left="0px",y.diagramContainer.style.bottom="0px",y.diagramContainer.style.right="0px",y.diagramContainer.style.width="",y.diagramContainer.style.height=
+"";else{var oa=y.diagramContainer.getAttribute("data-bounds");if(null!=oa){y.diagramContainer.style.background="transparent";y.diagramContainer.removeAttribute("data-bounds");var ta=ia.getGraphBounds();oa=oa.split(" ");y.diagramContainer.style.top=oa[0];y.diagramContainer.style.left=oa[1];y.diagramContainer.style.width=ta.width+50+"px";y.diagramContainer.style.height=ta.height+46+"px";y.diagramContainer.style.bottom="";y.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:y.diagramContainer.getBoundingClientRect()}),"*");y.refresh()}ka.style.left=y.diagramContainer.offsetLeft+"px";ka.style.top=y.diagramContainer.offsetTop-ka.offsetHeight-4+"px";W.style.display="";W.style.left=y.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=y.diagramContainer.offsetTop+"px";Y.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-Y.offsetWidth+"px";Y.style.top=ka.style.top;Y.style.right="";y.bottomResizer.style.left=y.diagramContainer.offsetLeft+
+(y.diagramContainer.offsetWidth-y.bottomResizer.offsetWidth)/2+"px";y.bottomResizer.style.top=y.diagramContainer.offsetTop+y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight/2-1+"px";y.rightResizer.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-y.rightResizer.offsetWidth/2-1+"px";y.rightResizer.style.top=y.diagramContainer.offsetTop+(y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight)/2+"px"}y.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
+"";y.rightResizer.style.visibility=y.bottomResizer.style.visibility;da.style.display="none";ka.style.visibility="";Y.style.visibility=""});V=y.actions.get("fullscreen");var F=B("",V.funct,null,mxResources.get(""),V,Editor.fullscreenImage),S=mxUtils.bind(this,function(){F.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+q()});V=mxUtils.bind(this,function(){b(y,!0);y.initFormatWindow();var oa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(oa.x+oa.width+4,oa.y);S()});y.addListener("inlineFullscreenChanged",S);y.addListener("editInlineStart",V);"1"==urlParams.embedInline&&y.addListener("darkModeChanged",V);y.addListener("editInlineStop",mxUtils.bind(this,function(oa){y.diagramContainer.style.width="10px";y.diagramContainer.style.height="10px";y.diagramContainer.style.border="";y.bottomResizer.style.visibility=
+"hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}));if(null!=y.hoverIcons){var ba=y.hoverIcons.update;y.hoverIcons.update=function(){ia.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=ia.freehand){var U=ia.freehand.createStyle;ia.freehand.createStyle=function(oa){return U.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";Y.className="geToolbarContainer";ka.className=
+"geToolbarContainer";da.className="geToolbarContainer";y.picker=W;y.sketchPickerMenuElt=W;var ca=!1;"1"!=urlParams.embed&&"atlassian"!=y.getServiceName()&&(mxEvent.addListener(da,"mouseenter",function(){y.statusContainer.style.display="inline-block"}),mxEvent.addListener(da,"mouseleave",function(){ca||(y.statusContainer.style.display="none")}));var ea=mxUtils.bind(this,function(oa){null!=y.notificationBtn&&(null!=oa?y.notificationBtn.setAttribute("title",oa):y.notificationBtn.removeAttribute("title"))});
+da.style.visibility=20>da.clientWidth?"hidden":"";y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=y.getServiceName())if(y.statusContainer.style.display="inline-block",ca=!0,1==y.statusContainer.children.length&&""==y.editor.getStatus())da.style.visibility="hidden";else{if(0==y.statusContainer.children.length||1==y.statusContainer.children.length&&"function"===typeof y.statusContainer.firstChild.getAttribute&&
+null==y.statusContainer.firstChild.getAttribute("class")){var oa=null!=y.statusContainer.firstChild&&"function"===typeof y.statusContainer.firstChild.getAttribute?y.statusContainer.firstChild.getAttribute("title"):y.editor.getStatus();ea(oa);var ta=y.getCurrentFile();ta=null!=ta?ta.savingStatusKey:DrawioFile.prototype.savingStatusKey;oa==mxResources.get(ta)+"..."?(y.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ta))+'..."src="'+Editor.tailSpin+'">',y.statusContainer.style.display=
+"inline-block",ca=!0):6<y.buttonContainer.clientWidth&&(y.statusContainer.style.display="none",ca=!1)}else y.statusContainer.style.display="inline-block",ea(null),ca=!0;da.style.visibility=20>da.clientWidth&&!ca?"hidden":""}}));H=t("diagram",null,Editor.menuImage);H.style.boxShadow="none";H.style.padding="6px";H.style.margin="0px";ka.appendChild(H);mxEvent.disableContextMenu(H);mxEvent.addGestureListeners(H,mxUtils.bind(this,function(oa){(mxEvent.isShiftDown(oa)||mxEvent.isAltDown(oa)||mxEvent.isMetaDown(oa)||
+mxEvent.isControlDown(oa)||mxEvent.isPopupTrigger(oa))&&this.appIconClicked(oa)}),null,null);y.statusContainer.style.position="";y.statusContainer.style.display="none";y.statusContainer.style.margin="0px";y.statusContainer.style.padding="6px 0px";y.statusContainer.style.maxWidth=Math.min(l-240,280)+"px";y.statusContainer.style.display="inline-block";y.statusContainer.style.textOverflow="ellipsis";y.buttonContainer.style.display="inline-block";y.buttonContainer.style.position="relative";y.buttonContainer.style.paddingRight=
+"0px";y.buttonContainer.style.top="0px";var na=document.createElement("a");na.style.padding="0px";na.style.boxShadow="none";na.className="geMenuItem";na.style.display="inline-block";na.style.width="40px";na.style.height="12px";na.style.marginBottom="-2px";na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";na.style.backgroundPosition="top center";na.style.backgroundRepeat="no-repeat";na.setAttribute("title","Minimize");var ra=!1,ya=mxUtils.bind(this,function(){W.innerText="";if(!ra){var oa=
+function(ta,Ea,Fa,Pa){null!=Ea&&ta.setAttribute("title",Ea);ta.style.cursor=null!=Fa?Fa:"default";ta.style.margin="2px 0px";W.appendChild(ta);mxUtils.br(W);null!=Pa&&(ta.style.position="relative",ta.style.overflow="visible",Ea=document.createElement("div"),Ea.style.position="absolute",Ea.style.left="34px",Ea.style.top="28px",Ea.style.fontSize="8px",mxUtils.write(Ea,Pa),ta.appendChild(Ea));return ta};oa(y.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");oa(y.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");oa(y.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");oa(y.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ta=new mxCell("",new mxGeometry(0,0,ia.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ta.geometry.setTerminalPoint(new mxPoint(0,0),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+0),!1);ta.geometry.points=[];ta.geometry.relative=!0;ta.edge=!0;oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,ta.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ta=ta.clone();ta.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ta.geometry.width=ia.defaultEdgeLength+20;ta.geometry.setTerminalPoint(new mxPoint(0,20),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+20),!1);oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ta,Ea,Fa,Pa){ta=B("",ta.funct,null,Ea,ta,Fa);ta.style.width="40px";ta.style.height="34px";ta.style.opacity="0.7";return oa(ta,null,"pointer",Pa)})(y.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");H=t("insert",null,Editor.plusImage);H.style.boxShadow="none";H.style.opacity="0.7";H.style.padding="6px";H.style.margin=
+"0px";H.style.height="34px";H.style.width="37px";oa(H,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(na)});mxEvent.addListener(na,"click",mxUtils.bind(this,function(){ra?(mxUtils.setPrefixedStyle(W.style,"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",na.style.width="40px",na.style.height="12px",na.setAttribute("title","Minimize"),ra=!1,ya()):(W.innerText=
+"",W.appendChild(na),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",na.style.height="24px",na.style.backgroundImage="url("+Editor.plusImage+")",na.setAttribute("title",mxResources.get("insert")),na.style.width="24px",ra=!0)}));ya();y.addListener("darkModeChanged",ya);y.addListener("sketchModeChanged",ya)}else y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus())}));
+V=y.menus.get("viewZoom");if(null!=V){var va=function(oa){if(mxEvent.isAltDown(oa))y.hideCurrentMenu(),y.actions.get("customZoom").funct(),mxEvent.consume(oa);else if("geItem"!=mxEvent.getSource(oa).className||mxEvent.isShiftDown(oa))y.hideCurrentMenu(),y.actions.get("smartFit").funct(),mxEvent.consume(oa)},Da=y.actions.get("zoomIn"),pa=y.actions.get("zoomOut"),Aa=y.actions.get("resetView"),xa=y.actions.get("undo"),Ma=y.actions.get("redo"),Oa=B("",xa.funct,null,mxResources.get("undo")+" ("+xa.shortcut+
+")",xa,Editor.undoImage),Na=B("",Ma.funct,null,mxResources.get("redo")+" ("+Ma.shortcut+")",Ma,Editor.redoImage);if(null!=Y){Aa=function(){x.style.display=null!=y.pages&&("0"!=urlParams.pages||1<y.pages.length||Editor.pagesVisible)?"inline-block":"none"};var La=function(){x.innerText="";if(null!=y.currentPage){mxUtils.write(x,y.currentPage.getName());var oa=null!=y.pages?y.pages.length:1,ta=y.getPageIndex(y.currentPage);ta=null!=ta?ta+1:1;var Ea=y.currentPage.getId();x.setAttribute("title",y.currentPage.getName()+
+" ("+ta+"/"+oa+")"+(null!=Ea?" ["+Ea+"]":""))}},Ba=y.actions.get("delete"),ab=B("",Ba.funct,null,mxResources.get("delete"),Ba,Editor.trashImage);ab.style.opacity="0.3";ka.appendChild(ab);Ba.addListener("stateChanged",function(){ab.style.opacity=Ba.enabled?"":"0.3"});var Xa=function(){Oa.style.display=0<y.editor.undoManager.history.length||ia.isEditing()?"inline-block":"none";Na.style.display=Oa.style.display;Oa.style.opacity=xa.enabled?"":"0.3";Na.style.opacity=Ma.enabled?"":"0.3"};ka.appendChild(Oa);
+ka.appendChild(Na);xa.addListener("stateChanged",Xa);Ma.addListener("stateChanged",Xa);Xa();var x=this.createPageMenuTab(!1,!0);x.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";Y.appendChild(x);y.editor.addListener("pagesPatched",La);y.editor.addListener("pageSelected",La);y.editor.addListener("pageRenamed",La);y.editor.addListener("fileLoaded",La);La();y.addListener("fileDescriptorChanged",Aa);y.addListener("pagesVisibleChanged",
+Aa);y.editor.addListener("pagesPatched",Aa);Aa();Aa=B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);Y.appendChild(Aa);var H=aa.addMenu("100%",V.funct);H.setAttribute("title",mxResources.get("zoom"));H.innerHTML="100%";H.style.display="inline-block";H.style.color="inherit";H.style.cursor="pointer";H.style.textAlign="center";H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.verticalAlign="top";H.style.padding=
+"6px 0";H.style.fontSize="14px";H.style.width="40px";Y.appendChild(H);V=B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);Y.appendChild(V);"1"==urlParams.embedInline?(Y.appendChild(F),V=y.actions.get("exit"),Y.appendChild(B("",V.funct,null,mxResources.get("exit"),V,Editor.closeImage))):F.parentNode.removeChild(F);y.tabContainer.style.visibility="hidden";da.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+ka.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";L.appendChild(ka);L.appendChild(Y);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");L.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(L)}else{var P=B("",va,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Aa,Editor.zoomFitImage);da.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";H=aa.addMenu("100%",
+V.funct);H.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.textDecoration="none";H.style.overflow="hidden";H.style.visibility="hidden";H.style.textAlign="center";H.style.cursor="pointer";H.style.height=parseInt(y.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(y.tabContainerHeight)+1+"px";H.style.position="absolute";H.style.display="block";H.style.fontSize="12px";H.style.width="59px";
+H.style.right="0px";H.style.bottom="0px";H.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";H.style.backgroundPosition="right 6px center";H.style.backgroundRepeat="no-repeat";L.appendChild(H)}(function(oa){mxEvent.addListener(oa,"click",va);var ta=mxUtils.bind(this,function(){oa.innerText="";mxUtils.write(oa,Math.round(100*y.editor.graph.view.scale)+"%")});y.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ta);y.editor.addListener("resetGraphView",ta);y.editor.addListener("pageSelected",
+ta)})(H);var X=y.setGraphEnabled;y.setGraphEnabled=function(){X.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Y?this.tabContainerHeight+"px":"0px")}}L.appendChild(da);L.appendChild(y.diagramContainer);J.appendChild(L);y.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==Y&&L.appendChild(y.tabContainer);
+var Z=null;O();mxEvent.addListener(window,"resize",function(){O();null!=y.sidebarWindow&&y.sidebarWindow.window.fit();null!=y.formatWindow&&y.formatWindow.window.fit();null!=y.actions.outlineWindow&&y.actions.outlineWindow.window.fit();null!=y.actions.layersWindow&&y.actions.layersWindow.window.fit();null!=y.menus.tagsWindow&&y.menus.tagsWindow.window.fit();null!=y.menus.findWindow&&y.menus.findWindow.window.fit();null!=y.menus.findReplaceWindow&&y.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
+"text";W.style.transform="";mxEvent.addGestureListeners(y.diagramContainer.parentNode,function(oa){mxEvent.getSource(oa)==y.diagramContainer.parentNode&&(y.embedExitPoint=new mxPoint(mxEvent.getClientX(oa),mxEvent.getClientY(oa)),y.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor="row-resize";y.diagramContainer.parentNode.appendChild(J);
+y.bottomResizer=J;var fa=null,la=null,za=null,ua=null;mxEvent.addGestureListeners(J,function(oa){ua=parseInt(y.diagramContainer.style.height);la=mxEvent.getClientY(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});J=J.cloneNode(!1);J.style.cursor="col-resize";y.diagramContainer.parentNode.appendChild(J);y.rightResizer=J;mxEvent.addGestureListeners(J,function(oa){za=parseInt(y.diagramContainer.style.width);fa=mxEvent.getClientX(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});mxEvent.addGestureListeners(document.body,
+null,function(oa){var ta=!1;null!=fa&&(y.diagramContainer.style.width=Math.max(20,za+mxEvent.getClientX(oa)-fa)+"px",ta=!0);null!=la&&(y.diagramContainer.style.height=Math.max(20,ua+mxEvent.getClientY(oa)-la)+"px",ta=!0);ta&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:y.diagramContainer.getBoundingClientRect()}),"*"),q(),y.refresh())},function(oa){null==fa&&null==la||mxEvent.consume(oa);la=fa=null});this.diagramContainer.style.borderRadius=
+"4px";document.body.style.backgroundColor="transparent";y.bottomResizer.style.visibility="hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&y.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,g,l,D,p,E){this.file=b;this.id=d;this.content=g;this.modifiedDate=l;this.createdDate=D;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,g,l,D){d()};DrawioComment.prototype.editComment=function(b,d,g){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,g,l,D){this.id=b;this.email=d;this.displayName=g;this.pictureUrl=l;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,g){this.init(b,d,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
-GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,d,g){this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
-this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
-" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
-I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
+this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var z=this.view.graphBounds,t=this.view.translate;E.setAttribute("viewBox",z.x+t.x-this.panDx+" "+(z.y+t.y-this.panDy)+
+" "+(z.width+1)+" "+(z.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",z))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(z){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var N=this;this.graph.getImageFromBundles=function(z){return N.getImageUrl(z)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var R=this.xmlNode.getElementsByTagName("diagram");if(0<
+R.length){if(null!=this.pageId)for(var G=0;G<R.length;G++)if(this.pageId==R[G].getAttribute("id")){this.currentPage=G;break}var M=this.graph.getGlobalVariable;N=this;this.graph.getGlobalVariable=function(z){var t=R[N.currentPage];return"page"==z?t.getAttribute("name")||"Page-"+(N.currentPage+1):"pagenumber"==z?N.currentPage+1:"pagecount"==z?R.length:M.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(z){this.handlingResize||(this.currentPage=mxUtils.mod(z,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(z){z=this.getIndexById(z);var t=0<=z;t&&this.selectPage(z);return t};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(z){if(null!=z&&Graph.isPageLink(z.src)){var t=z.src,
+B=t.indexOf(",");0<B&&(B=N.getIndexById(t.substring(B+1)),0<=B&&(z=N.getImageForGraphModel(Editor.parseDiagramNode(N.diagrams[B])),z.originalSrc=t))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(z){var t=f.apply(this,arguments);z=this.backgroundImage;if(null!=z){var B=this.view.translate,I=this.view.scale;t=mxRectangle.fromRectangle(t);t.add(new mxRectangle((B.x+z.x)*I,(B.y+z.y)*I,z.width*I,z.height*I))}return t};this.addListener("xmlNodeChanged",G);G();
+urlParams.page=N.currentPage;G=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,G=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(z){return!mxEvent.isPopupTrigger(z.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=G&&this.setLayersVisible(G);this.graph.customLinkClicked=function(z){if(Graph.isPageLink(z)){var t=z.indexOf(",");N.selectPageById(z.substring(t+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(z);return!0};var k=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return k.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof g){var D=this.getObservableParent(b),p=new g(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(D,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var g=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
-null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
-L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
-ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
-if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(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"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
-na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
-1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
-D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.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;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
-ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
-g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&la()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
-function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(m)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
-this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
-"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
-mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
-this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var g=[],l=this.graph.getModel();l.beginUpdate();try{for(var D=0;D<l.getChildCount(l.root);D++){var p=l.getChildAt(l.root,D);d=d&&l.isVisible(p);g.push(l.isVisible(p));l.setVisible(p,null!=b?b[D]:!0)}}finally{l.endUpdate()}}return d?null:g};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!g){g=!0;var N=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?N.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){N=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
+R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};N={left:N.left-R.left,top:N.top-R.top,bottom:N.bottom-R.top,right:N.right-R.left};this.toolbar.style.left=N.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=N.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=N.top+1+"px"):this.toolbar.style.top=N.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(N){var R=b.offsetWidth;R==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=N?N:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=R,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=D=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(N){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==N&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>G)?(N=null,null!=G&&d.height+2*this.graph.border>G-2&&(N=(G-2*this.graph.border-2)/d.height),this.fitGraph(N)):this.widthIsEmpty||
+null!=N||0!=this.graphConfig.resize||""==b.style.height?(N=null!=N?N:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+N.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+N.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(N){d=this.graph.getGraphBounds();D=null;E(N)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),g=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+g):g,null!=d.y?Math.floor(b.view.translate.y-d.y/l+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
+GraphViewer.prototype.showLayers=function(b,d){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var l=this.graphConfig.layerIds,D=null!=l&&0<l.length,p=!1;if(0<g.length||D||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(D)for(var N=0;N<l.length;N++){var R=b.getCell(l[N]);null!=R&&(d=!0,p[R.id]=!0)}else for(N=0;N<g.length;N++)R=b.getChildAt(b.root,parseInt(g[N])),null!=R&&(d=!0,p[R.id]=!0);for(N=0;d&&
+N<E;N++)R=b.getChildAt(b.root,N),b.setVisible(R,p[R.id]||!1)}else for(N=0;N<E;N++)b.setVisible(b.getChildAt(b.root,N),d.isVisible(d.getChildAt(d.root,N)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){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 d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
+d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var g=null,l=null,D=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);g=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
+l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),D())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,N=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
+aa){},mouseUp:function(ja,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<N&&Math.abs(this.scrollTop-E.container.scrollTop)<N&&Math.abs(this.startX-aa.getGraphX())<N&&Math.abs(this.startY-aa.getGraphY())<N&&(0<parseFloat(d.style.opacity||0)?D():p(30))}})}for(var R=this.toolbarItems,G=0,M=mxUtils.bind(this,function(ja,aa,qa,sa){ja=this.createToolbarButton(ja,aa,qa,sa);d.appendChild(ja);G++;return ja}),Q=null,e=null,f=null,k=null,z=0;z<R.length;z++){var t=R[z];
+if("pages"==t){k=b.ownerDocument.createElement("div");k.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(k,70);var B=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";d.appendChild(k);var I=M(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";t=mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=k.style.display;I.style.display=k.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(M(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),M(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),M(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"==t){if(this.layersEnabled){var O=this.graph.getModel(),J=M(mxUtils.bind(this,function(ja){if(null!=
+Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var qa=this.graph.getGraphBounds(),sa=this.graph.view;0>qa.x||0>qa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale}):null!=this.graph.originalViewState&&0<qa.x/sa.scale+this.graph.originalViewState.translate.x-sa.translate.x&&0<qa.y/sa.scale+this.graph.originalViewState.translate.y-
+sa.translate.y&&(sa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=J.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
+Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var aa=mxUtils.getDocumentScrollOrigin(document);Q.style.left=aa.x+ja.left-1+"px";Q.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");O.addListener(mxEvent.CHANGE,function(){J.style.display=1<O.getChildCount(O.root)?"inline-block":"none"});J.style.display=
+1<O.getChildCount(O.root)?"inline-block":"none"}}else if("tags"==t){if(this.tagsEnabled){var y=M(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
+e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);f.style.left=aa.x+ja.left-1+"px";f.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");O.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&M(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&(t.elem=M(null==
+t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(R=b.ownerDocument.createElement("div"),R.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;",R.setAttribute("title",this.graphConfig.title),mxUtils.write(R,this.graphConfig.title),mxUtils.setOpacity(R,70),
+d.appendChild(R),this.filename=R);this.minToolbarWidth=34*G;var ia=b.style.border,da=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-aa.x,top:-aa.y};ja={left:ja.left-
+aa.left,top:ja.top-aa.top,bottom:ja.bottom-aa.top,right:ja.right-aa.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var qa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(sa){for(sa=mxEvent.getSource(sa);null!=sa;){if(sa==b||sa==d||sa==Q)return;sa=sa.parentNode}qa()});mxEvent.addListener(document.body,"mouseleave",function(sa){qa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+d.parentNode&&da()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,d,g,l){var D=document.createElement("div");D.style.borderRight="1px solid #d0d0d0";D.style.padding="3px 6px 3px 6px";mxEvent.addListener(D,"click",b);null!=g&&D.setAttribute("title",g);D.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(D,"mouseenter",function(){D.style.backgroundColor="#ddd"}),mxEvent.addListener(D,"mouseleave",
+function(){D.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),D.style.cursor="pointer"):mxUtils.setOpacity(D,30);D.appendChild(b);return D};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,l){if(null==l)for(var D=mxEvent.getSource(g);D!=b.container&&null!=D&&null==l;)"a"==D.nodeName.toLowerCase()&&(l=D.getAttribute("href")),D=D.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(g):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(g)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,d,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
+mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var g=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=g;
+l.refresh=function(){};var D=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var N=l.editor.graph,R=N.container;R.style.overflow="hidden";this.lightboxChrome?(R.style.border="1px solid #c0c0c0",R.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",d.style.display="none");var G=this;N.getImageFromBundles=function(Q){return G.getImageUrl(Q)};var M=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=M.apply(this,arguments);Q.getImageFromBundles=function(e){return G.getImageUrl(e)};return Q};this.graphConfig.move&&(N.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(R.style,"border-radius","4px");R.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(R.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(R.style,"transition","all .25s ease-in-out"));this.addClickHandler(N,l);window.setTimeout(mxUtils.bind(this,function(){R.style.outline="none";R.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(R);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(R.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});l.lightboxFit();l.chromelessResize();this.showLayers(N,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
-GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var m=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){C(p)}):C(m.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
-new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.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>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
-ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
-else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(g){d.innerText=g.message,null!=window.console&&console.error(g)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var g=0;g<d.length;g++)b.push(d[g]);return b}var l=document.getElementsByTagName("*");d=[];for(g=0;g<l.length;g++){var D=l[g].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&d.push(l[g]))}return d};
+GraphViewer.createViewerForElement=function(b,d){var g=b.getAttribute("data-mxgraph");if(null!=g){var l=JSON.parse(g),D=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){D(p)}):D(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,g){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=g;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},d=function(g,l){function D(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
+new D,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],k=f.childNodes[0],z=Q.resizeSensor.childNodes[1],t=function(){k.style.width="100000px";k.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;z.scrollLeft=1E5;z.scrollTop=1E5};t();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var O,J,y,ia;e=function(){if((y=Q.offsetWidth)!=O||(ia=Q.offsetHeight)!=J)B=!0,O=y,J=ia;t()};var da=function(ja,
+aa,qa){ja.attachEvent?ja.attachEvent("on"+aa,qa):ja.addEventListener(aa,qa)};da(f,"scroll",e);da(z,"scroll",e)}var N=function(){GraphViewer.resizeSensorEnabled&&l()},R=Object.prototype.toString.call(g),G="[object Array]"===R||"[object NodeList]"===R||"[object HTMLCollection]"===R||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(G){R=0;for(var M=g.length;R<M;R++)E(g[R],N)}else E(g,N);this.detach=function(){if(G)for(var Q=0,e=g.length;Q<e;Q++)d.detach(g[Q]);
+else d.detach(g)}};d.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=d})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 7b7656e5..6bedbecf 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -1952,10 +1952,10 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,e,k,m,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,F){p=null!=F?F.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,d,g,l,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,g);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1986,240 +1986,240 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(C,p,F){C=m.substring(C+8,C+8+F);"zTXt"==p?(F=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,F)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(F+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
-C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
+Editor.extractGraphModelFromPng=function(b){var d=null;try{var g=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(D,p,E){D=l.substring(D+8,D+8+E);"zTXt"==p?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(d=D))):"tEXt"==p&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
+D[0]||"mxfile"==D[0])&&(d=D[1]));if(null!=d||"IDAT"==p)return!0}))}catch(D){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,m=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",m),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
+Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,l=mxUtils.bind(this,function(D){"ready"==D.data&&D.source==g&&(mxEvent.removeListener(window,"message",l),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);g=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(D){return!this.isExternalProtocol(D)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
-null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
+null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var g=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(g)||(this.graph.pageFormat=new mxRectangle(0,0,d,g));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var g=d.document.createElement("mxGraphModel");g.appendChild(b);d.decode(g,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
-b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,D){d.undoableEditHappened(D.getProperty("edit"))};var g=mxUtils.bind(this,function(l,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(l,D){l=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();D=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&D.push(l[p]);b.setSelectionCells(D)}};d.addListener(mxEvent.UNDO,g);d.addListener(mxEvent.REDO,g);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
-null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
-e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,d,g,l,D,p,E,N,R,G,M){var Q=R?57:0,e=g,f=l,k=R?0:64,z=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(z.height=window.innerHeight);var t=z.height,B=Math.max(1,Math.round((z.width-g-k)/2)),I=Math.max(1,Math.round((t-l-b.footerHeight)/3));d.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-k):g;l=Math.min(l,t-k);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));z=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=z.x+"px";this.bg.style.top=z.y+"px";B+=z.x;I+=z.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var O=b.createDiv(R?"geTransDialog":"geDialog");D=this.getPosition(B,I,g,l);B=D.x;I=D.y;O.style.width=g+"px";O.style.height=l+"px";O.style.left=B+"px";O.style.top=I+"px";O.style.zIndex=this.zIndex;O.appendChild(d);document.body.appendChild(O);!N&&d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=B+g+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!M)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(y){J=!0}),null,mxUtils.bind(this,function(y){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var y=G();
+null!=y&&(e=g=y.w,f=l=y.h)}y=mxUtils.getDocumentSize();t=y.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((y.width-g-k)/2));I=Math.max(1,Math.round((t-l-b.footerHeight)/3));g=null!=document.body?Math.min(e,document.body.scrollWidth-k):e;l=Math.min(f,t-k);y=this.getPosition(B,I,g,l);B=y.x;I=y.y;O.style.left=B+"px";O.style.top=I+"px";O.style.width=g+"px";O.style.height=l+"px";!N&&
+d.clientHeight>O.clientHeight-k&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+g+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=O;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
-t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
-L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
-L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,d,g,l,D,p,E,N,R,G,M){R=null!=R?R:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
+document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=g;Q.appendChild(d);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",g.appendChild(d),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=M&&M()}),G.className="geBtn",g.appendChild(G));var f=mxUtils.button(l,function(){R&&b.hideDialog();null!=D&&D()});
+f.className="geBtn";g.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){R&&b.hideDialog();null!=N&&N()}),l.className="geBtn gePrimaryBtn",g.appendChild(l));this.init=function(){f.focus()};Q.appendChild(g);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
+PrintDialog.prototype.create=function(b){function d(f){var k=E.checked||G.checked,z=parseInt(Q.value)/100;isNaN(z)&&(z=1,Q.value="100%");z*=.75;var t=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/g.pageScale;if(k){var I=E.checked?1:parseInt(M.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,g,t))}g.getGraphBounds();var O=I=0;t=mxRectangle.fromRectangle(t);t.width=Math.ceil(t.width*z);t.height=Math.ceil(t.height*z);B*=z;!k&&g.pageVisible?(z=g.getPageLayout(),I-=z.x*t.width,O-=z.y*t.height):
+k=!0;k=PrintDialog.createPrintPreview(g,B,t,0,I,O,k);k.open();f&&PrintDialog.printPreview(k)}var g=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var D=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var N=document.createElement("td");N.setAttribute("colspan","2");N.style.fontSize="10pt";N.appendChild(E);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
+N.appendChild(R);mxEvent.addListener(R,"click",function(f){E.checked=!E.checked;G.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){G.checked=!E.checked});p.appendChild(N);D.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(G);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");N.appendChild(R);mxEvent.addListener(R,
+"click",function(f){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(f)});p.appendChild(N);var M=document.createElement("input");M.setAttribute("value","1");M.setAttribute("type","number");M.setAttribute("min","1");M.setAttribute("size","4");M.setAttribute("disabled","disabled");M.style.width="50px";N=document.createElement("td");N.style.fontSize="10pt";N.appendChild(M);mxUtils.write(N," "+mxResources.get("pages")+" (max)");p.appendChild(N);D.appendChild(p);mxEvent.addListener(G,"change",
+function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");E.checked=!G.checked});p=p.cloneNode(!1);N=document.createElement("td");mxUtils.write(N,mxResources.get("pageScale")+":");p.appendChild(N);N=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";N.appendChild(Q);p.appendChild(N);D.appendChild(p);p=document.createElement("tr");N=document.createElement("td");N.colSpan=2;
+N.style.paddingTop="20px";N.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&N.appendChild(R);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";N.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";N.appendChild(e);b.editor.cancelFirst||
+N.appendChild(R);p.appendChild(N);D.appendChild(p);l.appendChild(D);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(g){}};
+PrintDialog.createPrintPreview=function(b,d,g,l,D,p,E){d=new mxPrintPreview(b,d,g,l,D,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var N=d.writeHead;d.writeHead=function(R){N.apply(this,arguments);R.writeln('<style type="text/css">');R.writeln("@media screen {");R.writeln(" body > div { padding:30px;box-sizing:content-box; }");R.writeln("}");R.writeln("</style>")};return d};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
-mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
-L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
-L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
-k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
-var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
-D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
-mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
+var PageSetupDialog=function(b){function d(){null==M||M==mxConstants.NONE?(G.style.backgroundColor="",G.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(G.style.backgroundColor=M,G.style.backgroundImage="")}function g(){var t=k;null!=t&&Graph.isPageLink(t.src)&&(t=b.createImageForPageLink(t.src,null));null!=t&&null!=t.src?(f.setAttribute("src",t.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,D=document.createElement("table");D.style.width=
+"100%";D.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";mxUtils.write(N,mxResources.get("paperSize")+":");E.appendChild(N);N=document.createElement("td");N.style.verticalAlign="top";N.style.fontSize="10pt";var R=PageSetupDialog.addPageFormatPanel(N,"pagesetupdialog",l.pageFormat);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");
+mxUtils.write(N,mxResources.get("background")+":");E.appendChild(N);N=document.createElement("td");N.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var G=document.createElement("button");G.style.width="22px";G.style.height="22px";G.style.cursor="pointer";G.style.marginRight="20px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(G.style.position="relative",G.style.top="-6px");var M=l.background;d();mxEvent.addListener(G,
+"click",function(t){b.pickColor(M||"none",function(B){M=B;d()});mxEvent.consume(t)});N.appendChild(G);mxUtils.write(N,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();N.appendChild(Q);mxEvent.addListener(Q,"change",function(){var t=parseInt(Q.value);Q.value=Math.max(1,isNaN(t)?l.getGridSize():t)});E.appendChild(N);p.appendChild(E);E=document.createElement("tr");
+N=document.createElement("td");mxUtils.write(N,mxResources.get("image")+":");E.appendChild(N);N=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
+"60px";f.style.padding="4px";var k=l.backgroundImage,z=function(t){b.showBackgroundImageDialog(function(B,I){I||(k=B,g())},k);mxEvent.consume(t)};mxEvent.addListener(e,"click",z);mxEvent.addListener(f,"click",z);g();N.appendChild(f);N.appendChild(e);E.appendChild(N);p.appendChild(E);E=document.createElement("tr");N=document.createElement("td");N.colSpan=2;N.style.paddingTop="16px";N.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
+b.editor.cancelFirst&&N.appendChild(e);z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(Q.value);isNaN(t)||l.gridSize===t||l.setGridSize(t);t=new ChangePageSetup(b,M,k,R.get());t.ignoreColor=l.background==M;t.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=k?k.src:null);l.pageFormat.width==t.previousFormat.width&&l.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage||l.model.execute(t)});z.className="geBtn gePrimaryBtn";
+N.appendChild(z);b.editor.cancelFirst||N.appendChild(e);E.appendChild(N);p.appendChild(E);D.appendChild(p);this.container=D};
+PageSetupDialog.addPageFormatPanel=function(b,d,g,l){function D(y,ia,da){if(da||Q!=document.activeElement&&e!=document.activeElement){y=!1;for(ia=0;ia<k.length;ia++)da=k[ia],I?"custom"==da.key&&(N.value=da.key,I=!1):null!=da.format&&("a4"==da.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==da.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),
+g.width==da.format.width&&g.height==da.format.height?(N.value=da.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,y=!0):g.width==da.format.height&&g.height==da.format.width&&(N.value=da.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,y=E.checked=!0));y?(R.style.display="",M.style.display="none"):(Q.value=g.width/100,e.value=g.height/100,p.setAttribute("checked",
+"checked"),N.value="custom",R.style.display="none",M.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var N=document.createElement("select");N.style.marginBottom="8px";N.style.borderRadius="4px";N.style.border="1px solid rgb(160, 160, 160)";N.style.width="206px";
+var R=document.createElement("div");R.style.marginLeft="4px";R.style.width="210px";R.style.height="24px";p.style.marginRight="6px";R.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));R.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";R.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));R.appendChild(G);var M=document.createElement("div");M.style.marginLeft=
+"4px";M.style.width="210px";M.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";M.appendChild(Q);mxUtils.write(M," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";M.appendChild(e);mxUtils.write(M," in");R.style.display="none";M.style.display="none";for(var f={},k=PageSetupDialog.getFormats(),z=0;z<k.length;z++){var t=k[z];f[t.key]=t;var B=document.createElement("option");B.setAttribute("value",
+t.key);mxUtils.write(B,t.title);N.appendChild(B)}var I=!1;D();b.appendChild(N);mxUtils.br(b);b.appendChild(R);b.appendChild(M);var O=g,J=function(y,ia){y=f[N.value];null!=y.format?(Q.value=y.format.width/100,e.value=y.format.height/100,M.style.display="none",R.style.display=""):(R.style.display="none",M.style.display="");y=parseFloat(Q.value);if(isNaN(y)||0>=y)Q.value=g.width/100;y=parseFloat(e.value);if(isNaN(y)||0>=y)e.value=g.height/100;y=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(e.value)));"custom"!=N.value&&E.checked&&(y=new mxRectangle(0,0,y.height,y.width));ia&&I||y.width==O.width&&y.height==O.height||(O=y,null!=l&&l(O))};mxEvent.addListener(d,"click",function(y){p.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(G,"click",function(y){E.checked=!0;J(y);mxEvent.consume(y)});mxEvent.addListener(Q,"blur",J);mxEvent.addListener(Q,"click",J);mxEvent.addListener(e,"blur",J);mxEvent.addListener(e,"click",J);mxEvent.addListener(E,"change",J);
+mxEvent.addListener(p,"change",J);mxEvent.addListener(N,"change",function(y){I="custom"==N.value;J(y,!0)});J();return{set:function(y){g=y;D(null,null,!0)},get:function(){return O},widthInput:Q,heightInput:e}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
-document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
-function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
-H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
-":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
-2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
-G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
-k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
-C();return m};
-FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
-function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
-["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
-Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
-var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
-t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
-e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
-0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
-!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
-var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
-la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
-"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
-m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
-ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
-ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
-"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
-ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
-!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
-mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
-this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+var FilenameDialog=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){R=null!=R?R:!0;var f=document.createElement("table"),k=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var z=document.createElement("tr");var t=document.createElement("td");t.style.textOverflow="ellipsis";t.style.textAlign="right";t.style.maxWidth=(e?e+15:100)+"px";t.style.fontSize="10pt";t.style.width=(e?e:84)+"px";mxUtils.write(t,(D||mxResources.get("filename"))+":");z.appendChild(t);var B=
+document.createElement("input");B.setAttribute("value",d||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(g,function(){if(null==p||p(B.value))R&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var O=f.parentNode;if(null!=O){var J=null;mxEvent.addListener(O,"dragleave",
+function(y){null!=J&&(J.style.backgroundColor="",J=null);y.stopPropagation();y.preventDefault()});mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(y){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=B,J.style.backgroundColor="#ebf2f9");y.stopPropagation();y.preventDefault()}));mxEvent.addListener(O,"drop",mxUtils.bind(this,function(y){null!=J&&(J.style.backgroundColor="",J=null);0<=mxUtils.indexOf(y.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(y.dataTransfer.getData("text/uri-list")),
+I.click());y.stopPropagation();y.preventDefault()}))}}};t=document.createElement("td");t.style.whiteSpace="nowrap";t.appendChild(B);z.appendChild(t);if(null!=D||null==E)k.appendChild(z),null!=M&&(t.appendChild(FilenameDialog.createTypeHint(b,B,M)),null!=b.editor.diagramFileTypes&&(z=document.createElement("tr"),t=document.createElement("td"),t.style.textOverflow="ellipsis",t.style.textAlign="right",t.style.maxWidth="100px",t.style.fontSize="10pt",t.style.width="84px",mxUtils.write(t,mxResources.get("type")+
+":"),z.appendChild(t),t=document.createElement("td"),t.style.whiteSpace="nowrap",z.appendChild(t),d=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",t.appendChild(d),B.style.width=null!=Q?Q-40+"px":"190px",z.appendChild(t),k.appendChild(z)));null!=E&&(z=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(E),z.appendChild(t),k.appendChild(z));z=document.createElement("tr");t=document.createElement("td");t.colSpan=
+2;t.style.paddingTop=null!=M?"12px":"20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});M.className="geBtn";b.editor.cancelFirst&&t.appendChild(M);null!=N&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(N)}),Q.className="geBtn",t.appendChild(Q));mxEvent.addListener(B,"keypress",function(O){13==O.keyCode&&I.click()});t.appendChild(I);b.editor.cancelFirst||t.appendChild(M);
+z.appendChild(t);k.appendChild(z);f.appendChild(k);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,d,g){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var D=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<g.length;p++)if(0<g[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
+g[p].ext.length-1)=="."+g[p].ext){l.setAttribute("title",mxResources.get(g[p].title));break}};mxEvent.addListener(d,"keyup",D);mxEvent.addListener(d,"change",D);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
+D();return l};
+FilenameDialog.createFileTypes=function(b,d,g){var l=document.createElement("select");for(b=0;b<g.length;b++){var D=document.createElement("option");D.setAttribute("value",b);mxUtils.write(D,mxResources.get(g[b].description)+" (."+g[b].extension+")");l.appendChild(D)}mxEvent.addListener(l,"change",function(p){p=g[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,N=0;N<g.length;N++){var R=g[N].extension,G=null;"drawio"!=R&&(G=R,R=".drawio."+R);if(p.substring(p.length-R.length-1)=="."+R||null!=G&&p.substring(p.length-G.length-1)=="."+G){E=N;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
+var WrapperWindow=function(b,d,g,l,D,p,E){var N=b.createSidebarContainer();E(N);this.window=new mxWindow(d,N,g,l,D,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(R){null==R&&(R=window.event);return null!=R&&b.isSelectionAllowed(R)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var N=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=E.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(N),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(E.container),R.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){E.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=
+E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(G)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=N,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,N=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,R=null!=N&&this.gridColor!=N.toLowerCase()?this.gridColor:"#ffffff",G="none",M="";if(E.isGridEnabled()||E.gridVisible){M=10;mxClient.IS_SVG?(G=unescape(encodeURIComponent(this.createSvgGrid(R))),G=window.btoa?btoa(G):Base64.encode(G,!0),G="url(data:image/svg+xml;base64,"+G+")",M=E.gridSize*this.scale*this.gridSteps):G="url("+this.gridImage+
+")";var Q=R=0;null!=E.view.backgroundPageShape&&(Q=this.getBackgroundPageBounds(),R=1+Q.x,Q=1+Q.y);M=-Math.round(M-mxUtils.mod(this.translate.x*this.scale-R,M))+"px "+-Math.round(M-mxUtils.mod(this.translate.y*this.scale-Q,M))+"px"}R=E.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=M,E.view.backgroundPageShape.node.style.backgroundImage=G,E.view.backgroundPageShape.node.style.backgroundColor=N,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",R.style.backgroundImage="none",R.style.backgroundColor="",Editor.isDarkMode()||"sketch"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.sketchBackgroundColor):(E.container.className="geDiagramContainer",R.style.backgroundPosition=M,R.style.backgroundImage=G,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"sketch"!=Editor.currentTheme?R.style.backgroundColor=
+N:R.style.backgroundColor=E.sketchBackgroundColor)};mxGraphView.prototype.createSvgGrid=function(E){for(var N=this.graph.gridSize*this.scale;N<this.minGridSize;)N*=2;for(var R=this.gridSteps*N,G=[],M=1;M<this.gridSteps;M++){var Q=M*N;G.push("M 0 "+Q+" L "+R+" "+Q+" M "+Q+" 0 L "+Q+" "+R)}return'<svg width="'+R+'" height="'+R+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+R+'" height="'+R+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+
+R+" 0 L 0 0 0 "+R+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){b.apply(this,arguments);if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*
+this.view.scale+N,G))+"px";R.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.view.scale,M=this.view.translate,Q=this.pageFormat,e=G*this.pageScale,f=this.view.getBackgroundPageBounds();N=f.width;R=f.height;var k=new mxRectangle(G*M.x,G*M.y,Q.width*e,Q.height*e),z=(E=E&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(R/k.height)-1:0,t=E?Math.ceil(N/k.width)-1:0,B=f.x+N,I=f.y+R;null==this.horizontalPageBreaks&&0<z&&(this.horizontalPageBreaks=[]);
+null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(O){if(null!=O){for(var J=O==this.horizontalPageBreaks?z:t,y=0;y<=J;y++){var ia=O==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(y+1)*k.height)),new mxPoint(Math.round(B),Math.round(f.y+(y+1)*k.height))]:[new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(y+1)*k.width),Math.round(I))];null!=O[y]?(O[y].points=ia,O[y].redraw()):(ia=new mxPolyline(ia,
+this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),O[y]=ia)}for(y=J;y<O.length;y++)O[y].destroy();O.splice(J,O.length-J)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,N,R){for(var G=0;G<N.length;G++){if(this.graph.isTableCell(N[G])||this.graph.isTableRow(N[G]))return!1;if(this.graph.getModel().isVertex(N[G])){var M=
+this.graph.getCellGeometry(N[G]);if(null!=M&&M.relative)return!1}}return d.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(N,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};
+mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),N=0<E.width?E.x/this.scale-this.translate.x:0,R=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,M=this.graph.pageScale,Q=G.width*M;G=G.height*M;M=Math.floor(Math.min(0,N)/Q);var e=Math.floor(Math.min(0,R)/G);return new mxRectangle(this.scale*(this.translate.x+M*Q),this.scale*(this.translate.y+e*G),this.scale*(Math.ceil(Math.max(1,N+E.width/this.scale)/Q)-M)*Q,this.scale*(Math.ceil(Math.max(1,
+R+E.height/this.scale)/G)-e)*G)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,N){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=N+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,N,R,G,M,Q){var e=D.apply(this,
+arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,N,R){var G=this.graph.model.getParent(E);if(N){var M=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);M=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=M&&M.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(M=p.apply(this,arguments),
+this.graph.isTableCell(E)||this.graph.isTableRow(E))M=G,this.graph.isTable(M)||(M=this.graph.model.getParent(M)),M=!this.graph.selectionCellsHandler.isHandled(M)||this.graph.isCellSelected(M)&&this.graph.isToggleEvent(R.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(G);return M};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var N=this.graph.getModel(),R=N.getParent(E),G=this.graph.view.getState(R),
+M=this.graph.isCellSelected(E);null!=G&&(N.isVertex(R)||N.isEdge(R));){var Q=this.graph.isCellSelected(R);M=M||Q;if(Q||!M&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=R;R=N.getParent(R)}return E}})();EditorUi=function(b,d,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=g;var D=l.getGraphBounds;l.getGraphBounds=function(){var T=D.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var W=this.view.translate,ka=this.view.scale;T=mxRectangle.fromRectangle(T);T.add(new mxRectangle((W.x+Y.x)*ka,(W.y+Y.y)*ka,Y.width*ka,Y.height*ka))}return T};l.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(T,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(T){return!mxEvent.isPopupTrigger(T.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+N="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),R=!1,G=!1;this.setDefaultStyle=function(T){try{l.getModel().isEdge(T)?G=!1:R=!1;var Y=l.getCellStyle(T,!1),W=[],ka=[],q;for(q in Y)W.push(Y[q]),ka.push(q);l.getModel().isEdge(T)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",W,"cells",[T]));l.getModel().isEdge(T)?G=!0:R=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
+function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);R=G=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var M=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<M.length;d++)0>mxUtils.indexOf(p,M[d])&&p.push(M[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(g=0;g<e[d].length;g++)p.push(e[d][g]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(T,Y,W,ka,q,F,S){ka=null!=ka?ka:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;W=null!=W?W:l.getModel();if(S){S=[];for(var ba=0;ba<T.length;ba++)S=S.concat(W.getDescendants(T[ba]));T=S}W.beginUpdate();try{for(ba=0;ba<T.length;ba++){var U=T[ba];
+if(Y)var ca=["fontSize","fontFamily","fontColor"];else{var ea=W.getStyle(U),na=null!=ea?ea.split(";"):[];ca=p.slice();for(var ra=0;ra<na.length;ra++){var ya=na[ra],va=ya.indexOf("=");if(0<=va){var Da=ya.substring(0,va),pa=mxUtils.indexOf(ca,Da);0<=pa&&ca.splice(pa,1);for(S=0;S<e.length;S++){var Aa=e[S];if(0<=mxUtils.indexOf(Aa,Da))for(var xa=0;xa<Aa.length;xa++){var Ma=mxUtils.indexOf(ca,Aa[xa]);0<=Ma&&ca.splice(Ma,1)}}}}}var Oa=W.isEdge(U);S=Oa?q:ka;var Na=W.getStyle(U);for(ra=0;ra<ca.length;ra++){Da=
+ca[ra];var La=S[Da];null!=La&&"edgeStyle"!=Da&&("shape"!=Da||Oa)&&(!Oa||F||0>mxUtils.indexOf(N,Da))&&(Na=mxUtils.setStyle(Na,Da,La))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));W.setStyle(U,Na)}}finally{W.endUpdate()}return T};l.addListener("cellsInserted",function(T,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(T,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
+this.refresh();var k=mxUtils.bind(this,function(T){null==T&&(T=window.event);return l.isEditing()||null!=T&&this.isSelectionAllowed(T)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,
+this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(d=function(T){if(null!=T){var Y=mxEvent.getSource(T);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return k(T)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var z=l.graphHandler.start;l.graphHandler.start=function(){null!=qa.hoverIcons&&qa.hoverIcons.reset();z.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var Y=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(T)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(T)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var t=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(T,Y){return t||B.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(T){32!=T.which||l.isEditing()?mxEvent.isConsumed(T)||
+27!=T.keyCode||this.hideDialog(null,!0):(t=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(T)!=l.container||mxEvent.consume(T))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(T){l.container.style.cursor="";t=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(T){return I.apply(this,arguments)||t||mxEvent.isMouseEvent(T.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(T.getEvent()))&&(!mxEvent.isControlDown(T.getEvent())&&mxEvent.isRightMouseButton(T.getEvent())||mxEvent.isMiddleMouseButton(T.getEvent()))};var O=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(T){return O.apply(this,arguments)||13==T.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T)||mxClient.IS_SF&&mxEvent.isShiftDown(T))};var J=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return t||
+J.apply(this,arguments)};var y=!1,ia=null,da=null,ja=null,aa=mxUtils.bind(this,function(){if(null!=this.toolbar&&y!=l.cellEditor.isContentEditing()){for(var T=this.toolbar.container.firstChild,Y=[];null!=T;){var W=T.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),Y.push(T));T=W}T=this.toolbar.fontMenu;W=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var ka=0;ka<ja.length;ka++)this.toolbar.container.appendChild(ja[ka]);this.toolbar.fontMenu=
+ia;this.toolbar.sizeMenu=da}y=l.cellEditor.isContentEditing();ia=T;da=W;ja=Y}}),qa=this,sa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){sa.apply(this,arguments);aa();if(l.cellEditor.isContentEditing()){var T=!1,Y=function(){T||(T=!0,window.setTimeout(function(){var W=l.getSelectedEditingElement();null!=W&&(W=mxUtils.getCurrentStyle(W),null!=W&&null!=qa.toolbar&&(qa.toolbar.setFontName(Graph.stripQuotes(W.fontFamily)),qa.toolbar.setFontSize(parseInt(W.fontSize))));T=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
+"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(T,Y){try{L.apply(this,arguments),aa()}catch(W){qa.handleError(W)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(T){}var V=l.fireMouseEvent;
+l.fireMouseEvent=function(T,Y,W){T==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(T,Y,W){this.menus.createPopupMenu(T,Y,W)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(T){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,function(T,
+Y){var W=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(W.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=qa.hoverIcons&&qa.hoverIcons.update(l.view.getState(W[W.length-1]))},0));f(W)});this.addListener("styleChanged",mxUtils.bind(this,function(T,Y){var W=Y.getProperty("cells"),ka=T=!1;if(0<W.length)for(var q=0;q<W.length&&(T=l.getModel().isVertex(W[q])||T,!(ka=l.getModel().isEdge(W[q])||ka)||!T);q++);else ka=T=!0;T=T&&!R;ka=ka&&!G;W=Y.getProperty("keys");Y=Y.getProperty("values");
+for(q=0;q<W.length;q++){var F=0<=mxUtils.indexOf(M,W[q]);if("strokeColor"!=W[q]||null!=Y[q]&&"none"!=Y[q])if(0<=mxUtils.indexOf(E,W[q]))ka||0<=mxUtils.indexOf(Q,W[q])?null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]:T&&0<=mxUtils.indexOf(p,W[q])&&(null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q]);else if(0<=mxUtils.indexOf(p,W[q])){if(T||F)null==Y[q]?delete l.currentVertexStyle[W[q]]:l.currentVertexStyle[W[q]]=Y[q];if(ka||F||0<=mxUtils.indexOf(Q,
+W[q]))null==Y[q]?delete l.currentEdgeStyle[W[q]]:l.currentEdgeStyle[W[q]]=Y[q]}}null!=this.toolbar&&(this.toolbar.setFontName(l.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(l.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==l.currentEdgeStyle.edgeStyle&&"1"==l.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==
+l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==l.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==l.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==l.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var T=l.currentVertexStyle.fontFamily||"Helvetica",Y=String(l.currentVertexStyle.fontSize||
+"12"),W=l.getView().getState(l.getSelectionCell());null!=W&&(T=W.style[mxConstants.STYLE_FONTFAMILY]||T,Y=W.style[mxConstants.STYLE_FONTSIZE]||Y,10<T.length&&(T=T.substring(0,8)+"..."));this.toolbar.setFontName(T);this.toolbar.setFontSize(Y)}),l.getSelectionModel().addListener(mxEvent.CHANGE,b),l.getModel().addListener(mxEvent.CHANGE,b));l.addListener(mxEvent.CELLS_ADDED,function(T,Y){T=Y.getProperty("cells");Y=Y.getProperty("parent");null!=Y&&l.getModel().isLayer(Y)&&!l.isCellVisible(Y)&&null!=T&&
+0<T.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(T){null!=this.currentMenu&&mxEvent.getSource(T)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
+mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
+mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,d,g){function l(N,R){var G=p;p+=R;return N.substring(G,p)}function D(N){N=l(N,4);return N.charCodeAt(3)+(N.charCodeAt(2)<<8)+(N.charCodeAt(1)<<16)+(N.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(l(b,4),"IHDR"!=l(b,4))null!=g&&g();else{l(b,17);do{g=D(b);var E=l(b,4);if(null!=d&&d(p-8,E,g))break;value=l(b,g);l(b,4);if("IEND"==E)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
-EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
-arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+arguments);g.updateActionStates()};b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,d=b.getSelectionCells(),g=this.initSelectionState(),l=!0,D=0;D<d.length;D++){var p=b.getCurrentCellStyle(d[D]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,d[D],d,l),l=!1)}this.updateSelectionStateForTableCells(g);return g};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
-if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
-b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
-G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
-function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
-EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
-EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
-f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
-EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),C=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
-C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),g=this.editor.graph.model,l=g.getParent(d[0]),D=g.getParent(l),p=l.getIndex(d[0]),E=D.getIndex(l),N=null,R=1,G=1,M=0,Q=E<D.getChildCount()-1?g.getChildAt(g.getChildAt(D,E+1),p):null;M<d.length-1;){var e=d[++M];null==Q||Q!=e||null!=N&&R!=N||(N=R,R=0,G++,l=g.getParent(Q),Q=E+G<D.getChildCount()?g.getChildAt(g.getChildAt(D,E+G),p):null);var f=this.editor.graph.view.getState(e);
+if(e==g.getChildAt(l,p+R)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))R++;else break}M==G*R-1&&(b.mergeCell=d[0],b.colspan=R,b.rowspan=G)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,d,g,l){g=this.editor.graph;b.cells.push(d);if(g.getModel().isVertex(d)){b.connections=0<g.model.getEdgeCount(d);b.unlocked=b.unlocked&&!g.isCellLocked(d);b.resizable=b.resizable&&g.isCellResizable(d);b.rotatable=b.rotatable&&g.isCellRotatable(d);b.movable=b.movable&&g.isCellMovable(d)&&!g.isTableRow(d)&&!g.isTableCell(d);b.swimlane=b.swimlane||g.isSwimlane(d);b.table=b.table||g.isTable(d);b.cell=b.cell||g.isTableCell(d);b.row=b.row||g.isTableRow(d);
+b.vertices.push(d);var D=g.getCellGeometry(d);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var p=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else g.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);d=g.view.getState(d);null!=d&&(b.autoSize=b.autoSize||g.isAutoSizeState(d),b.glass=b.glass&&g.isGlassState(d),b.rounded=b.rounded&&g.isRoundedState(d),b.lineJumps=b.lineJumps&&g.isLineJumpState(d),b.image=b.image&&g.isImageState(d),b.shadow=b.shadow&&g.isShadowState(d),b.fill=b.fill&&g.isFillState(d),b.stroke=b.stroke&&g.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,g.mergeStyle(d.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,G){"mouseDown"==G.getProperty("eventName")&&d.hideShapePicker()}));var g=mxUtils.bind(this,function(){d.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var l=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var D=b.dblClick;b.dblClick=function(R,G){if(this.isEnabled())if(null!=G||null==d.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.x,M.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(R,G,M){var Q=M.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(R.cell,G,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,k){var z=b.getCompositeParent(R.cell);e=b.getCellGeometry(z);for(M.consume();null!=z&&b.model.isVertex(z)&&null!=e&&e.relative;)cell=
+z,z=b.model.getParent(cell),e=b.getCellGeometry(z);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(M.getGraphX(),M.getGraphY(),z,mxUtils.bind(this,function(t){k(t);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(t))}),G)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var N=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N);N=window.setTimeout(mxUtils.bind(this,function(){var M=
+G.getProperty("arrow"),Q=G.getProperty("direction"),e=G.getProperty("event");M=M.getBoundingClientRect();var f=mxUtils.getOffset(b.container),k=b.container.scrollLeft+M.x-f.x;f=b.container.scrollTop+M.y-f.y;var z=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),t=d.showShapePicker(k,f,z,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(z,Q,b.defaultEdgeLength,e,!0,!0,function(I,O,J){J(B);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(t,M,k,f,Q);mxUtils.setOpacity(t,30);mxEvent.addListener(t,"mouseenter",function(){mxUtils.setOpacity(t,100)});mxEvent.addListener(t,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(R,G){null!=N&&window.clearTimeout(N)}))}};
+EditorUi.prototype.centerShapePicker=function(b,d,g,l,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,l-=p.height+6):D==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,l+=d.height+6):D==mxConstants.DIRECTION_WEST?(g-=p.width+6,l-=p.height/2-10):D==mxConstants.DIRECTION_EAST&&(g+=d.width+6,l-=p.height/2-10);b.style.left=g+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,d,g,l,D,p){b=this.createShapePicker(b,d,g,l,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,d,g,l,D,p,E,N){var R=null;if(null!=E&&0<E.length){var G=this,M=this.editor.graph;R=document.createElement("div");D=M.view.getState(g);var Q=null==g||null!=D&&M.isTransparentState(D)?null:M.copyStyle(g);g=6>E.length?35*E.length:140;R.className="geToolbarContainer geSidebarContainer";R.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+g+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";N||mxUtils.setPrefixedStyle(R.style,"transform","translate(-22px,-22px)");null!=M.background&&M.background!=mxConstants.NONE&&(R.style.backgroundColor=M.background);M.container.appendChild(R);g=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";R.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[e]):G.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var k=M.cloneCell(e);if(null!=l)l(k);else{k.geometry.x=M.snap(Math.round(b/M.view.scale)-M.view.translate.x-e.geometry.width/2);k.geometry.y=M.snap(Math.round(d/M.view.scale)-M.view.translate.y-e.geometry.height/2);M.model.beginUpdate();try{M.addCell(k)}finally{M.model.endUpdate()}M.setSelectionCell(k);
+M.scrollCellToVisible(k);M.startEditingAtCell(k);null!=G.hoverIcons&&G.hoverIcons.update(M.view.getState(k))}null!=p&&p()})});for(D=0;D<(N?Math.min(E.length,4):E.length);D++)g(E[D]);E=R.offsetTop+R.clientHeight-(M.container.scrollTop+M.container.offsetHeight);0<E&&(R.style.top=Math.max(M.container.scrollTop+22,d-E)+"px");E=R.offsetLeft+R.clientWidth-(M.container.scrollLeft+M.container.offsetWidth);0<E&&(R.style.left=Math.max(M.container.scrollLeft+22,b-E)+"px")}return R};
+EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(g,l,D,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,D||60,g,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var g=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),D=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;g=null!=D&&("LI"==D.nodeName||null!=D.parentNode&&"LI"==
+D.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,e,k,m,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=m&&m!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(m,C),null!=k?(m=document.createElement("img"),m.className="geAdaptiveAsset",m.style.position="absolute",m.style.marginTop="0.5px",m.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,
-"transform","scaleX(-1)"),b.appendChild(m)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
-k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.updateCssForMarker=function(b,d,g,l,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==g?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(g=this.getImageForMarker(l,D),null!=g?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",g),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(b,d){var g=null;b==mxConstants.ARROW_CLASSIC?g="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?g="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?g=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?g=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?g="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?g="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?g="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?g="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?g="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?g="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?g=Format.boxMarkerImage.src:"halfCircle"==b?g=Format.halfCircleMarkerImage.src:"openAsync"==b?g=Format.openAsyncFilledMarkerImage.src:"async"==b?g="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?g=Format.dashMarkerImage.src:"baseDash"==b?g=Format.baseDashMarkerImage.src:"cross"==b?g=Format.crossMarkerImage.src:"circle"==b?g=Format.circleMarkerImage.src:"circlePlus"==b?g=Format.circlePlusMarkerImage.src:"ERone"==b?g=Format.EROneMarkerImage.src:"ERmandOne"==b?
+g=Format.ERmandOneMarkerImage.src:"ERmany"==b?g=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?g=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?g=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(g=Format.ERzeroToManyMarkerImage.src);return g};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),g=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(d.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var N={},R=p.createCellLookup(E),G=p.cloneCells(E,null,N),M=new mxGraphModel,Q=M.getChildAt(M.getRoot(),
+0),e=0;e<G.length;e++){M.add(Q,G[e]);var f=p.view.getState(E[e]);if(null!=f){var k=p.getCellGeometry(G[e]);null!=k&&k.relative&&!M.isEdge(E[e])&&null==R[mxObjectIdentity.get(M.getParent(E[e]))]&&(k.offset=null,k.relative=!1,k.x=f.x/f.view.scale-f.view.translate.x,k.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(N,R),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=g.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
-this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
-da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
-if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var W=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+W.x*ka.width),this.scale*(this.translate.y+W.y*ka.height),this.scale*W.width*ka.width,
+this.scale*W.height*ka.height)};b.getPreferredPageSize=function(W,ka,q){W=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,W.width*ka.width,W.height*ka.height)};var d=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(W,ka,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var S=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),ba=mxUtils.hasScrollbars(b.container),U=b.view.translate,ca=b.view.scale,
+ea=mxRectangle.fromRectangle(S);ea.x=ea.x/ca-U.x;ea.y=ea.y/ca-U.y;ea.width/=ca;ea.height/=ca;U=b.container.scrollTop;var na=b.container.scrollLeft,ra=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ra+=3;var ya=b.container.offsetWidth-ra;ra=b.container.offsetHeight-ra;W=W?Math.max(.3,Math.min(ka||1,ya/ea.width)):ca;ka=(ya-W*ea.width)/2/W;var va=0==this.lightboxVerticalDivider?0:(ra-W*ea.height)/this.lightboxVerticalDivider/W;ba&&(ka=Math.max(ka,0),va=Math.max(va,
+0));if(ba||S.width<ya||S.height<ra)b.view.scaleAndTranslate(W,Math.floor(ka-ea.x),Math.floor(va-ea.y)),b.container.scrollTop=U*W/ca,b.container.scrollLeft=na*W/ca;else if(0!=q||0!=F)S=b.view.translate,b.view.setTranslate(Math.floor(S.x+q/ca),Math.floor(S.y+F/ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(W){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(W){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
-var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
-L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=ia.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
-mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
-0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
-this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
-1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ra.style.transformOrigin=
-"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
-b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
-"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
-b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
-1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var W=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=W?parseInt(W["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(W,ka,q){E++;
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",W);null!=q&&F.setAttribute("title",q);W=document.createElement("img");W.setAttribute("border","0");W.setAttribute("src",ka);W.style.width="36px";W.style.filter="invert(100%)";F.appendChild(W);this.chromelessToolbar.appendChild(F);return F});if(null!=D.backBtn){var N=Graph.sanitizeLink(D.backBtn.url);null!=N&&p(mxUtils.bind(this,function(W){window.location.href=
+N;mxEvent.consume(W)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=p(mxUtils.bind(this,function(W){this.actions.get("previousPage").funct();mxEvent.consume(W)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var M=p(mxUtils.bind(this,function(W){this.actions.get("nextPage").funct();mxEvent.consume(W)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});R.style.paddingLeft="0px";R.style.paddingRight="4px";M.style.paddingLeft="4px";M.style.paddingRight=
+"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(M.style.display="",R.style.display="",G.style.display="inline-block"):(M.style.display="none",R.style.display="none",G.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(W){this.actions.get("zoomOut").funct();mxEvent.consume(W)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(W){this.actions.get("zoomIn").funct();mxEvent.consume(W)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(W){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(W)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,k=null,z=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);f=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";k=null}),600)}),W||200)}),t=mxUtils.bind(this,function(W){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,W||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=p(mxUtils.bind(this,function(W){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=B.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(W)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(W){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(W)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var O=this.lightboxToolbarActions[e];O.elem=p(O.fn,O.icon,O.tooltip)}if(null!=D.refreshBtn){var J=null==D.refreshBtn.url?null:Graph.sanitizeLink(D.refreshBtn.url);
+p(mxUtils.bind(this,function(W){null!=J?window.location.href=J:window.location.reload();mxEvent.consume(W)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=D.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(W){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(W)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(W){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(W))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(W){mxEvent.isTouchEvent(W)||(mxEvent.isShiftDown(W)||t(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(W){mxEvent.consume(W)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(W){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(W)?z():t(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(W){mxEvent.isShiftDown(W)?z():t(100);
+mxEvent.consume(W)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(W){mxEvent.isTouchEvent(W)||t(30)}));var y=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(W,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(W,ka){},mouseUp:function(W,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+y&&Math.abs(this.scrollTop-b.container.scrollTop)<y&&Math.abs(this.startX-ka.getGraphX())<y&&Math.abs(this.startY-ka.getGraphY())<y&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():t(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var W=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=W.x-(this.x0||
+0)*ka.width;this.translate.y=W.y-(this.y0||0)*ka.height}ia.apply(this,arguments)};if(!b.isViewer()){var da=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var W=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*ka.x+W.width*q.width),S=Math.ceil(2*ka.y+W.height*q.height),ba=b.minimumGraphSize;if(null==ba||ba.width!=F||ba.height!=S)b.minimumGraphSize=new mxRectangle(0,0,F,S);F=ka.x-W.x*q.width;ka=ka.y-W.y*q.height;
+this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==ka?da.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=W.x,this.view.y0=W.y,W=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,ka),b.container.scrollLeft+=Math.round((F-W)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),aa=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var qa=null,sa=null,L=null,V=null,T=null,Y=function(W){null!=qa&&window.clearTimeout(qa);0<=W&&window.setTimeout(function(){if(!b.isMouseDown||V)qa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),aa.style.transformOrigin="",ja.style.transformOrigin=
+"",mxClient.IS_SF?(aa.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){aa.style.transform="";ja.style.transform=""},0)):(aa.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,S=0,ba=0;null!=sa&&(S=b.container.offsetWidth/2-sa.x+q.x,ba=b.container.offsetHeight/2-sa.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(S+=ka.x-L.x,ba+=ka.y-L.y),null!=d&&g.chromelessResize(!1,null,S*(b.cumulativeZoomFactor-1),ba*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==S&&0==ba||(b.container.scrollLeft-=S*(b.cumulativeZoomFactor-1),b.container.scrollTop-=ba*(b.cumulativeZoomFactor-1)));null!=T&&aa.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=V=sa=L=qa=null}),null!=W?W:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=
+function(W,ka,q,F){F=null!=F?F:this.zoomFactor;(ka=ka||!b.scrollbars)&&(sa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));W?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==T&&""!=aa.getAttribute("filter")&&(T=aa.getAttribute("filter"),aa.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=ka||null==sa?b.container.scrollLeft+
+b.container.clientWidth/2:sa.x+b.container.scrollLeft-b.container.offsetLeft,F=ka||null==sa?b.container.scrollTop+b.container.clientHeight/2:sa.y+b.container.scrollTop-b.container.offsetTop,aa.style.transformOrigin=W+"px "+F+"px",aa.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=W+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(W=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(W.style,
+"transform-origin",(ka||null==sa?b.container.clientWidth/2+b.container.scrollLeft-W.offsetLeft+"px":sa.x+b.container.scrollLeft-W.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==sa?b.container.clientHeight/2+b.container.scrollTop-W.offsetTop+"px":sa.y+b.container.scrollTop-W.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(W.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=g.hoverIcons&&
+g.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(W){null!=qa&&window.clearTimeout(qa)},null,function(W){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(W){null==qa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(W,ka,q,F,S){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(W))q=
+b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(W)?b.view.setTranslate(q.x+(ka?-F:F),q.y):b.view.setTranslate(q.x,q.y+(ka?F:-F));else if(q||b.isZoomWheelEvent(W))for(var ba=mxEvent.getSource(W);null!=ba;){if(ba==b.container)return b.tooltipHandler.hideTooltip(),sa=null!=F&&null!=S?new mxPoint(F,S):new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),V=q,q=b.zoomFactor,F=null,W.ctrlKey&&null!=W.deltaY&&40>Math.abs(W.deltaY)&&Math.round(W.deltaY)!=W.deltaY?q=1+Math.abs(W.deltaY)/20*
+(q-1):null!=W.movementY&&"pointermove"==W.type&&(q=1+Math.max(1,Math.abs(W.movementY))/20*(q-1),F=-1),b.lazyZoom(ka,null,F,q),mxEvent.consume(W),!1;ba=ba.parentNode}}),b.container);b.panningHandler.zoomGraph=function(W){b.cumulativeZoomFactor=W.scale;b.lazyZoom(0<W.scale,!0);mxEvent.consume(W)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
-EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
-EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
+EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,g=60;null!=d&&(g=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,m){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,m);this.setCurrentMenu(C)};
-EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
-EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var m=b.view.scale;e.x=e.x/m-k.x;e.y=e.y/m-k.y;e.width/=m;e.height/=m;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
-e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
-"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
-(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,g,l){this.editor.graph.popupMenuHandler.hideMenu();var D=new mxPopupMenu(b);D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});D.popup(d,g,null,l);this.setCurrentMenu(D)};
+EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};
+EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,g;for(g in urlParams)b=0==d?b+"?":b+"&",b+=g+"="+urlParams[g],d++;return b};
+EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,g=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();g!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var g=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-g)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());g=b.view.translate;var l=b.view.scale;d.x=d.x/l-g.x;d.y=d.y/l-g.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,g=mxUtils.hasScrollbars(d.container),l=0,D=0;g&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,D=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(g){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();g&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
+d.view.scale-D);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,d,g){d&&(b.window.setSize=function(D,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+N=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),G=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-R));p=Math.max(0,Math.min(p,N-G));this.getX()==D&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(R,G)};var l=mxUtils.bind(this,function(){var D=b.window.getX(),p=b.window.getY();b.window.setLocation(D,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,d,g,l,D){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=g;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var g=this.previousImage;null!=g&&null!=g.src&&"data:page/id,"==g.src.substring(0,13)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=d}null!=this.previousFormat&&
+(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
-1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
-1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
-var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
-this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
-k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
-m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
-b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),g=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});g.addListener(mxEvent.ADD,l);g.addListener(mxEvent.UNDO,l);g.addListener(mxEvent.REDO,l);g.addListener(mxEvent.CLEAR,l);var D=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){D.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(E,N){p.apply(this,arguments);l()};l()};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),D=0;D<l.length;D++)this.actions.get(l[D]).setEnabled(0<d.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
+d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
+1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(g);this.actions.get("selectEdges").setEnabled(g);
+this.actions.get("selectAll").setEnabled(g);this.actions.get("selectNone").setEnabled(g);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
+1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,g=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,g=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
+d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(g-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}g=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=g+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var N=null!=this.hsplit.parentNode?D+this.splitSize:0;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=D+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=N+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=g+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=N+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=g+"px",this.diagramContainer.style.bottom=this.footerHeight+l+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,205 +2227,204 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
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(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
-EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
-EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
+EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
+EditorUi.prototype.addSplitHandler=function(b,d,g,l){function D(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,N+(d?e.x-E.x:E.y-e.y)-g));mxEvent.consume(Q);N!=M()&&(R=!0,G=null)}}function p(Q){D(Q);E=N=null}var E=null,N=null,R=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var M=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+g-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));N=M();R=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!R&&this.hsplitClickEnabled){var e=null!=G?G-g:0;G=M();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,D,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,p)})};
+EditorUi.prototype.prompt=function(b,d,g){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){g(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,d,g,l,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(d,D,p,g,null,null,null,null,null,null,null,null,l?g:null)}else null!=g&&g()};
+EditorUi.prototype.showError=function(b,d,g,l,D,p,E,N,R,G,M,Q,e){b=new ErrorDialog(this,b,d,g||mxResources.get("ok"),l,D,p,E,Q,N,R);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,G||340,M||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,g,l,D,p,E,N,R,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,g,l,D,p,E,N,R,G);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,d,g){null!=this.dialogs&&0<this.dialogs.length&&(null==g||g==this.dialog.container.firstChild)&&(g=this.dialogs.pop(),0==g.close(b,d)?this.dialogs.push(g):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),g=new mxDictionary,l=[],D=0;D<d.length;D++){var p=b.isTableCell(d[D])?b.model.getParent(d[D]):d[D];null==p||g.get(p)||(g.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,d){var g=this.editor.graph,l=g.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){g.cellEditor.restoreSelection(l);d(p)},function(){g.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,D,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
-0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
-else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};
-EditorUi.prototype.executeLayout=function(b,e,k){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(m.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,e,k,m){m=this.editor.graph.cellEditor;var C=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(C);if(null!=p&&0<p.length){var F=new Image;F.onload=function(){k(p,F.width,F.height)};F.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};F.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>g&&(d=b.substring(g,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return d};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var l=decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}b(g)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==d&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(D){try{var p=this.parseHtmlData(D),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var N=E.lastIndexOf("%3E");
+0<=N&&N<E.length-3&&(E=E.substring(0,N+3))}catch(M){}try{var R=p.getElementsByTagName("span"),G=null!=R&&0<R.length?mxUtils.trim(decodeURIComponent(R[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(M){}}catch(M){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(l){b(null)});else if(null!=g&&0<g.length&&"text"==d&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(l){l.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+else b(null)}))["catch"](function(g){b(null)})};
+EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(g?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));g=g&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)):(g=d.getElementsByTagName("img"),1==g.length&&(g=g[0],b=g.getAttribute("src"),null!=b&&g.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,g=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?g=b.getData("Text"):(g=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==g||0==g.length)&&(g=b.getData("text/plain"))),null!=g&&(g=Graph.zapGremlins(mxUtils.trim(g)),b=this.extractGraphModelFromHtml(g),null!=b&&(g=b))));null!=g&&this.isCompatibleString(g)&&
+(d=g);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
+EditorUi.prototype.executeLayout=function(b,d,g){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(D){throw D;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(l.getModel().endUpdate(),null!=g&&g())}};
+EditorUi.prototype.showImageDialog=function(b,d,g,l){l=this.editor.graph.cellEditor;var D=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(D);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){g(p,E.width,E.height)};E.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,d,g){b=new LinkDialog(this,b,d,g);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
+EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=g&&0<g.length?(d=new Image,d.onload=function(){b(new mxImage(g,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.src=g):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,d,g){mxUtils.confirm(b)?null!=d&&d():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
-D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
-g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
-m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
-C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
-!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
-C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
-C.bindAction(85,!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
+EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var k=l.getCompositeParents(l.getSelectionCells()),z=0<k.length?k[0]:null;if(null!=z)if(f){l.getModel().beginUpdate();try{for(z=0;z<k.length;z++)if(l.getModel().isVertex(k[z])&&l.isCellResizable(k[z])){var t=l.getCellGeometry(k[z]);null!=t&&(t=t.clone(),37==Q?t.width=Math.max(0,t.width-e):38==Q?t.height=Math.max(0,t.height-e):39==Q?t.width+=e:40==Q&&(t.height+=e),l.getModel().setGeometry(k[z],
+t))}}finally{l.getModel().endUpdate()}}else{t=l.model.getParent(z);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(z)&&null!=l.layoutManager&&!l.isCellLocked(z)&&(f=l.layoutManager.getLayout(t));if(null!=f&&f.constructor==mxStackLayout)e=t.getIndex(z),37==Q||38==Q?l.model.add(t,z,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(t,z,Math.min(l.model.getChildCount(t),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(z,0,0,k),null!=I.first&&(z=k=0,37==Q?k=-e:38==
+Q?z=-e:39==Q?k=e:40==Q&&(z=e),I.currentDx+=k*B,I.currentDy+=z*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var O=I.roundLength(I.currentDx/B),J=I.roundLength(I.currentDy/B);I.moveCells(I.cells,O,J);I.reset()}},400))}}}}var g=this,l=this.editor.graph,D=new mxKeyHandler(l),p=D.isEventIgnored;D.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};D.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==g.dialogs||0==g.dialogs.length)};D.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,N={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=D.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=g.actions.get(g.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=N[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),N[Q.keyCode],
+l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return R.apply(this,arguments)};D.bindAction=mxUtils.bind(this,
+function(Q,e,f,k){var z=this.actions.get(f);null!=z&&(f=function(){z.isEnabled()&&z.funct.apply(this,arguments)},e?k?D.bindControlShiftKey(Q,f):D.bindControlKey(Q,f):k?D.bindShiftKey(Q,f):D.bindKey(Q,f))});var G=this,M=D.escape;D.escape=function(Q){M.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){l.exitGroup()});D.bindControlShiftKey(35,function(){l.enterGroup()});D.bindShiftKey(36,function(){l.home()});D.bindKey(35,function(){l.refresh()});D.bindAction(107,!0,"zoomIn");
+D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),D.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),D.bindControlKey(13,function(){G.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
+!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
+D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"format",!0),D.bindAction(85,
+!0,"underline"),D.bindAction(85,!0,"ungroup",!0),D.bindAction(190,!0,"superscript"),D.bindAction(188,!0,"subscript"),D.bindAction(13,!1,"keyPressEnter"),D.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?D.bindAction(89,!0,"redo"):D.bindAction(90,!0,"redo",!0);return D};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
-Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(g){for(var l=0;l<b.length;l++)g=g.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(g)}})();
+Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},g=Math.pow(2,53)-1;return function(l){var D=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var N=Number(D.length);N=isNaN(N)?0:0!==N&&isFinite(N)?(0<N?1:-1)*Math.floor(Math.abs(N)):N;N=Math.min(Math.max(N,0),g);for(var R=d(this)?Object(new this(N)):Array(N),G=0,M;G<N;)M=D[G],R[G]=p?"undefined"===typeof E?p(M,G):p.call(E,M,G):M,G+=1;R.length=N;return R}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,g){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
-return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
-null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
-0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
-N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
-N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
-this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
-(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
-3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
-aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
-1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
-(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
-this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
-mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};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(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
-[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
-N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
-this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
-arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
-this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
-function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=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=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
-this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
-function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
-null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
-N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
-0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
-Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
-Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph=function(b,d,g,l,D,p){mxGraph.call(this,b,d,g,l);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,N=null,R=null,G=null,M=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var T=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=T)if(this.model.isEdge(T.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),M=this.isCellSelected(T.cell),R=T,N=L,null!=T.text&&null!=
+T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,L.getGraphX(),L.getGraphY()))G=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(T.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(G=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(T.cell),null==Y||null==Y.getHandleForEvent(L))){var W=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ka=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=ka+2;W.grow(ka);if(this.isTableCell(T.cell)&&!this.isCellSelected(T.cell)&&!(mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(T,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(T,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(T.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){ka*=V;var F=2*ka;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(W,new mxRectangle(T.x,
+T.y-ka,T.width,F))||this.model.getChildAt(q,0)!=T.cell&&mxUtils.intersects(W,new mxRectangle(T.x-ka,T.y,F,T.height))||mxUtils.intersects(W,new mxRectangle(T.x,T.y+T.height-ka,T.width,F))||mxUtils.intersects(W,new mxRectangle(T.x+T.width-ka,T.y,F,T.height)))q=this.selectionCellsHandler.isHandled(Y),this.selectCellForEvent(Y,L.getEvent()),Y=this.selectionCellsHandler.getHandler(Y),null!=Y&&(ka=Y.getHandleForEvent(L),null!=ka&&(Y.start(L.getGraphX(),L.getGraphY(),ka),Y.blockDelayedSelection=!q,L.consume()))}}for(;!L.isConsumed()&&
+null!=T&&(this.isTableCell(T.cell)||this.isTableRow(T.cell)||this.isTable(T.cell));)this.isSwimlane(T.cell)&&(Y=this.getActualStartSize(T.cell),(0<Y.x||0<Y.width)&&mxUtils.intersects(W,new mxRectangle(T.x+(Y.x-Y.width-1)*V+(0==Y.x?T.width:0),T.y,1,T.height))||(0<Y.y||0<Y.height)&&mxUtils.intersects(W,new mxRectangle(T.x,T.y+(Y.y-Y.height-1)*V+(0==Y.y?T.height:0),T.width,1)))&&(this.selectCellForEvent(T.cell,L.getEvent()),Y=this.selectionCellsHandler.getHandler(T.cell),null!=Y&&(ka=mxEvent.CUSTOM_HANDLE-
+Y.customHandles.length+1,Y.start(L.getGraphX(),L.getGraphY(),ka),L.consume())),T=this.view.getState(this.model.getParent(T.cell))}}}));this.addMouseListener({mouseDown:function(L,V){},mouseMove:mxUtils.bind(this,function(L,V){L=this.selectionCellsHandler.handlers.map;for(var T in L)if(null!=L[T].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var Y=this.tolerance;if(null!=E&&null!=R&&null!=N){if(T=R,Math.abs(E.x-V.getGraphX())>Y||Math.abs(E.y-V.getGraphY())>
+Y){var W=this.selectionCellsHandler.getHandler(T.cell);null==W&&this.model.isEdge(T.cell)&&(W=this.createHandler(T));if(null!=W&&null!=W.bends&&0<W.bends.length){L=W.getHandleForEvent(N);var ka=this.view.getEdgeStyle(T);Y=ka==mxEdgeStyle.EntityRelation;M||G!=mxEvent.LABEL_HANDLE||(L=G);if(Y&&0!=L&&L!=W.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!Y||null==T.visibleSourceState&&null==T.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=T.visibleSourceState||
+L==W.bends.length-1||null!=T.visibleTargetState)Y||L==mxEvent.LABEL_HANDLE||(Y=T.absolutePoints,null!=Y&&(null==ka&&null==L||ka==mxEdgeStyle.OrthConnector)&&(L=G,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,Y[0].x,Y[0].y)?L=0:mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y)?L=W.bends.length-1:null!=ka&&(2==Y.length||3==Y.length&&(0==Math.round(Y[0].x-Y[1].x)&&0==Math.round(Y[1].x-Y[2].x)||0==Math.round(Y[0].y-Y[1].y)&&0==Math.round(Y[1].y-
+Y[2].y)))?L=2:(L=mxUtils.findNearestSegment(T,E.x,E.y),L=null==ka?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),W.start(V.getGraphX(),V.getGraphX(),L),V.consume(),this.graphHandler.reset()}null!=W&&(this.selectionCellsHandler.isHandlerActive(W)?this.isCellSelected(T.cell)||(this.selectionCellsHandler.handlers.put(T.cell,W),this.selectCellForEvent(T.cell,V.getEvent())):this.isCellSelected(T.cell)||W.destroy());M=!1;E=N=R=G=null}}else if(T=V.getState(),null!=T&&this.isCellEditable(T.cell)){W=
+null;if(this.model.isEdge(T.cell)){if(L=new mxRectangle(V.getGraphX(),V.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),Y=T.absolutePoints,null!=Y)if(null!=T.text&&null!=T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,V.getGraphX(),V.getGraphY()))W="move";else if(mxUtils.contains(L,Y[0].x,Y[0].y)||mxUtils.contains(L,Y[Y.length-1].x,Y[Y.length-1].y))W="pointer";else if(null!=T.visibleSourceState||null!=T.visibleTargetState)L=this.view.getEdgeStyle(T),W="crosshair",L!=mxEdgeStyle.EntityRelation&&
+this.isOrthogonal(T)&&(V=mxUtils.findNearestSegment(T,V.getGraphX(),V.getGraphY()),V<Y.length-1&&0<=V&&(W=0==Math.round(Y[V].x-Y[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){Y=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(V.getGraphX(),V.getGraphY());L.grow(Y);if(this.isTableCell(T.cell)&&(V=this.model.getParent(T.cell),Y=this.model.getParent(V),!this.isCellSelected(Y)))if(mxUtils.intersects(L,new mxRectangle(T.x,T.y-2,T.width,4))&&this.model.getChildAt(Y,
+0)!=V||mxUtils.intersects(L,new mxRectangle(T.x,T.y+T.height-2,T.width,4)))W="row-resize";else if(mxUtils.intersects(L,new mxRectangle(T.x-2,T.y,4,T.height))&&this.model.getChildAt(V,0)!=T.cell||mxUtils.intersects(L,new mxRectangle(T.x+T.width-2,T.y,4,T.height)))W="col-resize";for(V=T;null==W&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(Y=this.getActualStartSize(V.cell),ka=this.view.scale,(0<Y.x||0<Y.width)&&mxUtils.intersects(L,new mxRectangle(V.x+
+(Y.x-Y.width-1)*ka+(0==Y.x?V.width*ka:0),V.y,1,V.height))?W="col-resize":(0<Y.y||0<Y.height)&&mxUtils.intersects(L,new mxRectangle(V.x,V.y+(Y.y-Y.height-1)*ka+(0==Y.y?V.height:0),V.width,1))&&(W="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=W&&T.setCursor(W)}}}),mouseUp:mxUtils.bind(this,function(L,V){G=E=N=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&
+(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};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(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],T=this.graph.pageFormat,Y=this.graph.pageScale,W=T.width*Y;T=T.height*Y;Y=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*W+Y.x)*ka,(q.y*
+T+Y.y)*ka,W*ka,T*ka));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*W+Y.x)*ka,((q.y+F)*T+Y.y)*ka,W*ka,T*ka));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
+arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),T=new mxDictionary,Y=[],W=0;W<V.length;W++){var ka=this.graph.isTableCell(L)&&this.graph.isTableCell(V[W])&&this.graph.isCellSelected(V[W])?this.graph.model.getParent(V[W]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[W])&&this.graph.isCellSelected(V[W])?V[W]:this.graph.getCompositeParent(V[W]);null==ka||T.get(ka)||(T.put(ka,!0),Y.push(ka))}return Y};var f=this.graphHandler.start;
+this.graphHandler.start=function(L,V,T,Y){var W=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?W=!0:L=this.graph.model.getParent(L));W||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var k=new mxRubberband(this);this.getRubberband=function(){return k};
+var z=(new Date).getTime(),t=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(z=(new Date).getTime(),t=0):t=(new Date).getTime()-z};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<t||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var O=this.isToggleEvent;this.isToggleEvent=function(L){return O.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var J=k.isForceRubberbandEvent;k.isForceRubberbandEvent=function(L){return J.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.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(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
+L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var T=V?L.sourceState.cell:L.getCell();null!=T&&(T=this.getClickableLinkForCell(T),null!=T&&(this.isCustomLink(T)?this.customLinkClicked(T):this.openLink(T)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var da=this.tooltipHandler.show;this.tooltipHandler.show=function(){da.apply(this,arguments);if(null!=
+this.div)for(var L=this.div.getElementsByTagName("a"),V=0;V<L.length;V++)null!=L[V].getAttribute("href")&&null==L[V].getAttribute("target")&&L[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(V?L.sourceState.cell:L.getCell())};var ja=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||
+this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ja.apply(this,arguments)};this.selectRegion=function(L,V){var T=mxEvent.isAltDown(V)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,T,function(Y){return"1"==mxUtils.getValue(Y.style,"locked","0")},!0);if(this.isToggleEvent(V))for(T=0;T<L.length;T++)this.selectCellForEvent(L[T],V);else this.selectCellsForEvent(L,V);return L};var aa=this.graphHandler.shouldRemoveCellsFromParent;
+this.graphHandler.shouldRemoveCellsFromParent=function(L,V,T){return this.graph.isCellSelected(L)?!1:aa.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};var qa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){"mouseDown"==V.getProperty("eventName")&&(L=V.getProperty("event").getState(),qa=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?
+null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,V){if(!mxEvent.isMultiTouchEvent(V)){L=V.getProperty("event");var T=V.getProperty("cell");null==T?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),k.start(L.x,L.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(T)&&this.removeSelectionCell(T);qa=null;V.consume()}}));this.connectionHandler.selectCells=function(L,V){this.graph.setSelectionCell(V||
+L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,V){var T=L.view.graph;return V&&(T.isCellSelected(L.cell)||T.isTableRow(L.cell)&&T.selectionCellsHandler.isHandled(T.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&
+this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(L){L=sa.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
-Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
-Graph.createSvgImage=function(b,e,k,m,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=C?'viewBox="0 0 '+m+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
-Graph.createSvgNode=function(b,e,k,m,C){var p=mxUtils.createXmlDocument(),F=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=F.style?F.style.backgroundColor=C:F.setAttribute("style","background-color:"+C));null==p.createElementNS?(F.setAttribute("xmlns",mxConstants.NS_SVG),F.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):F.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);F.setAttribute("version","1.1");
-F.setAttribute("width",k+"px");F.setAttribute("height",m+"px");F.setAttribute("viewBox",b+" "+e+" "+k+" "+m);p.appendChild(F);return F};Graph.htmlToPng=function(b,e,k,m){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);m(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(b){for(var e=0,k=[],m=0;m<b.length;m++){var C=b.charCodeAt(m);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,m)),e=m+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,m=0;m<k;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,e,k){var m=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==m){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
-Graph.fadeNodes=function(b,e,k,m,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
-Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
+Graph.createSvgImage=function(b,d,g,l,D){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=D?'viewBox="0 0 '+l+" "+D+'" ':"")+'version="1.1">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,d)};
+Graph.createSvgNode=function(b,d,g,l,D){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=D&&(null!=E.style?E.style.backgroundColor=D:E.setAttribute("style","background-color:"+D));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",g+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+g+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,g,l){var D=document.createElement("canvas");D.width=d;D.height=g;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){D.getContext("2d").drawImage(p,0,0);l(D.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(b){for(var d=0,g=[],l=0;l<b.length;l++){var D=b.charCodeAt(l);(32<=D||9==D||10==D||13==D)&&65535!=D&&65534!=D||(g.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&g.push(b.substring(d));return 0==g.length?b:g.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=b.charCodeAt(g);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),g=0;g<b.length;g++)d[g]=String.fromCharCode(b[g]);return d.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var g=b.byteLength,l=0;l<g;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,d,g){var l=d.charCodeAt(0),D=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==l){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+d.length-1;g++){if(b[g]!=d.charCodeAt(D))return Graph.arrayBufferIndexOfString(b,d,p+1);D++}return D==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,d,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?d:Graph.zapGremlins(d)};
+Graph.fadeNodes=function(b,d,g,l,D){D=null!=D?D:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+D+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},D)},0)};Graph.removeKeys=function(b,d){for(var g in b)d(g)&&delete b[g]};
+Graph.setTransitionForNodes=function(b,d){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var g=0;g<b.length;g++)b[g].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),D=l.indexOf("<svg");if(0<=D){g.innerHTML=Graph.sanitizeHtml(l.substring(D));var p=g.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{l=d=
+1;var E=p[0].getAttribute("width"),N=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;N=null!=N&&"%"!=N.charAt(N.length-1)?parseFloat(N):NaN;var R=p[0].getAttribute("viewBox");if(null!=R&&!isNaN(E)&&!isNaN(N)){var G=R.split(" ");4<=R.length&&(d=parseFloat(G[2])/E,l=parseFloat(G[3])/N)}var M=p[0].getBBox();0<M.width&&0<M.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",M.x+" "+M.y+" "+M.width+" "+M.height),g.getElementsByTagName("svg")[0].setAttribute("width",
+M.width/d),g.getElementsByTagName("svg")[0].setAttribute("height",M.height/l))}catch(Q){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,d){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",d);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
-Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
-Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
+Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.sketchBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
+Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
-m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
-null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
-(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
-P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=g.view.graph.tolerance,p=!0,E=null,N=mxUtils.bind(this,function(M){p=!0;E=new mxPoint(mxEvent.getClientX(M),mxEvent.getClientY(M))}),R=mxUtils.bind(this,function(M){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(M))<D&&Math.abs(E.y-mxEvent.getClientY(M))<D}),G=mxUtils.bind(this,function(M){if(p)for(var Q=mxEvent.getSource(M);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,Q,M);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,N,R,G);mxEvent.addListener(l.node,"click",function(M){mxEvent.consume(M)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var l=mxEvent.getSource(g);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(l)&&mxEvent.consume(g))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(g,l){null!=this.container&&this.flowAnimationStyle&&(g=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(g))}));this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
+null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
+"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var N=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==N||"filledEdge"==N)};Graph.prototype.isAutoSizeState=function(E){return"1"==
+mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,N){E=null!=E?E:!0;N=null!=N?N:!0;var R=this.model;return R.filterDescendants(function(G){return E&&R.isVertex(G)||N&&R.isEdge(G)},R.getRoot())};Graph.prototype.getCommonStyle=
+function(E){for(var N={},R=0;R<E.length;R++){var G=this.view.getState(E[R]);this.mergeStyle(G.style,N,0==R)}return N};Graph.prototype.mergeStyle=function(E,N,R){if(null!=E){var G={},M;for(M in E){var Q=E[M];null!=Q&&(G[M]=!0,null==N[M]&&R?N[M]=Q:N[M]!=Q&&delete N[M])}for(M in N)G[M]||delete N[M]}};Graph.prototype.getStartEditingCell=function(E,N){N=this.getCellStyle(E);N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&
+0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),N=this.getCellStyle(E),N=parseInt(mxUtils.getValue(N,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==N)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(N=0;N<this.model.getChildCount(E);N++){var R=this.model.getChildAt(E,N);if(this.isCellEditable(R)){E=R;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,N,R){R=null!=R?R:Graph.pasteStyles;
+Graph.removeKeys(E,function(G){return 0>mxUtils.indexOf(R,G)});this.updateCellStyles(E,N)};Graph.prototype.updateCellStyles=function(E,N){this.model.beginUpdate();try{for(var R=0;R<N.length;R++)if(this.model.isVertex(N[R])||this.model.isEdge(N[R])){var G=this.getCellStyle(N[R],!1),M;for(M in E){var Q=E[M];G[M]!=Q&&this.setCellStyles(M,Q,[N[R]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,N,R,G,M,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,N=N/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,N,R,G,M,Q){G=null!=G?G:!0;M=null!=M?M:!0;
+null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var e=this.model.getChildCount(R)-1;0<=e;e--){var f=this.model.getChildAt(R,e),k=this.getScaledCellAt(E,N,f,G,M,Q);if(null!=k)return k;if(this.isCellVisible(f)&&(M&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(k=this.view.getState(f),null!=k&&(null==Q||!Q(k,E,N))&&this.intersects(k,E,N)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var N=this.getCellGeometry(E);null!=N&&N.relative;)E=this.getModel().getParent(E),N=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var N=
+new mxDictionary,R=[],G=0;G<E.length;G++){var M=this.getCompositeParent(E[G]);this.isTableCell(M)&&(M=this.graph.model.getParent(M));this.isTableRow(M)&&(M=this.graph.model.getParent(M));null==M||N.get(M)||(N.put(M,!0),R.push(M))}return R};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var N=this.model.getParent(E);if(!this.model.isVertex(N))break;E=N}return E};Graph.prototype.filterSelectionCells=function(E){var N=this.getSelectionCells();if(null!=E){for(var R=[],G=0;G<N.length;G++)E(N[G])||
+R.push(N[G]);N=R}return N};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var N=this.currentScale,R=this.currentTranslate;E=new mxRectangle((E.x+2*R.x)*N-R.x,(E.y+2*R.y)*N-R.y,E.width*N,E.height*N)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
+if(this.graph.useCssTransforms){var N=this.graph.currentTranslate,R=this.graph.currentScale;E=new mxRectangle((E.x+N.x)*R,(E.y+N.y)*R,E.width*R,E.height*R)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);d.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=g.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};var l=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var N=[],R=0;R<E.length;R++)this.isTable(E[R])||this.isTableRow(E[R])||this.isTableCell(E[R])||N.push(E[R]);return N};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var N=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var R=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
+"scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");N!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,N=this.scale,R=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=N,this.translate=R)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,N,R){var G=this.useCssTransforms,M=this.view.scale,Q=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=M,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,g){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(g)}};
+Graph.prototype.openLink=function(b,d,g){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else l=window.open(b,null!=d?d:"_blank"),null==l||g||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
-b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=window.console&&console.error(m)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var m=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)m[C]=b[k].config[C];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
-Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
-Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
-Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
+b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var d=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var l=new window[b[g].layout](this);if(null!=b[g].config)for(var D in b[g].config)l[D]=b[g].config[D];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return d};
+Graph.prototype.getDataForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=null!=b[g].value?b[g].value.attributes:null,D={};D.id=b[g].id;if(null!=l)for(var p=0;p<l.length;p++)D[l[p].nodeName]=l[p].nodeValue;else D.label=this.convertValueToString(b[g]);d.push(D)}return d};
+Graph.prototype.getNodesForCells=function(b){for(var d=[],g=0;g<b.length;g++){var l=this.view.getState(b[g]);if(null!=l){for(var D=this.cellRenderer.getShapesForState(l),p=0;p<D.length;p++)null!=D[p]&&null!=D[p].node&&d.push(D[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
+Graph.prototype.createWipeAnimations=function(b,d){for(var g=[],l=0;l<b.length;l++){var D=this.view.getState(b[l]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?g.push(this.createEdgeWipeAnimation(D,d)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&g.push(this.createVertexWipeAnimation(D,d)))}return g};
+Graph.prototype.createEdgeWipeAnimation=function(b,d){var g=b.absolutePoints.slice(),l=b.segments,D=b.length,p=g.length;return{execute:mxUtils.bind(this,function(E,N){if(null!=b.shape){var R=[g[0]];N=E/N;d||(N=1-N);for(var G=D*N,M=1;M<p;M++)if(G<=l[M-1]){R.push(new mxPoint(g[M-1].x+(g[M].x-g[M-1].x)*G/l[M-1],g[M-1].y+(g[M].y-g[M-1].y)*G/l[M-1]));break}else G-=l[M-1],R.push(g[M]);b.shape.points=R;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=N)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,d){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,D){null!=b.shape&&(D=l/D,d||(D=1-D),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*D,g.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,g,l){g=null!=g?g:30;l=null!=l?l:30;var D=null,p=0,E=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(D);for(var N=0;N<b.length;N++)b[N].stop();null!=d&&d()}else for(N=0;N<b.length;N++)b[N].execute(p,g);p++});D=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
-m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var g=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(g,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-g,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var g=this.model.cells[d];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
-Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
-Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
-I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
-"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
-Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
-!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
-C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
-!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
-S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
-Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
-Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
-Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
-null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,e,k){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,g){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(g)&&!mxEvent.isShiftDown(g)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
+Graph.prototype.formatDate=function(b,d,g){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 l=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),g=!0);var N=g?"getUTC":"get",R=b[N+"Date"](),G=b[N+"Day"](),M=b[N+"Month"](),Q=b[N+"FullYear"](),e=b[N+"Hours"](),f=b[N+"Minutes"](),k=b[N+"Seconds"]();N=b[N+"Milliseconds"]();var z=g?0:b.getTimezoneOffset(),t={d:R,dd:E(R),ddd:l.i18n.dayNames[G],dddd:l.i18n.dayNames[G+7],m:M+1,mm:E(M+1),mmm:l.i18n.monthNames[M],mmmm:l.i18n.monthNames[M+
+12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:k,ss:E(k),l:E(N,3),L:E(99<N?Math.round(N/10):N),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:g?"UTC":(String(b).match(D)||[""]).pop().replace(p,""),o:(0<z?"-":"+")+E(100*Math.floor(Math.abs(z)/60)+Math.abs(z)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in t?t[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(d,b[g])){d=null;break}}return d};
+Graph.prototype.createLayersDialog=function(b,d){var g=document.createElement("div");g.style.position="absolute";for(var l=this.getModel(),D=l.getChildCount(l.root),p=0;p<D;p++)mxUtils.bind(this,function(E){function N(){l.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var R=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[R]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";d&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,R);g.appendChild(G);
+mxEvent.addListener(G,"click",function(){l.setVisible(E,!l.isVisible(E));N();null!=b&&b(E)});N()})(l.getChildAt(l.root,p));return g};
+Graph.prototype.replacePlaceholders=function(b,d,g,l){l=[];if(null!=d){for(var D=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>D&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var N=p.substring(1,p.length-1);if("id"==N)E=b.id;else if(0>N.indexOf("{"))for(var R=b;null==E&&null!=R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=R.getAttribute(N+"_"+Graph.diagramLanguage)),
+null==E&&(E=R.hasAttribute(N)?null!=R.getAttribute(N)?R.getAttribute(N):"":null)),R=this.model.getParent(R);null==E&&(E=this.getGlobalVariable(N));null==E&&null!=g&&(E=g[N])}l.push(d.substring(D,match.index)+(null!=E?E:p));D=match.index+p.length}}l.push(d.substring(D))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],g=0;g<b.length;g++){var l=this.model.getCell(b[g].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,d){var g=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),D=this.model.getParent(l),p=this.model.getParent(d);if(D==this.model.getParent(p)){b=l.getIndex(b);l=D.getIndex(l);var E=p.getIndex(d),N=D.getIndex(p);p=Math.max(l,N);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,N);l<=p;l++){N=this.model.getChildAt(D,l);for(var R=d;R<=b;R++)E.push(this.model.getChildAt(N,R))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),g=!0)}}return g};
+Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var l=b[g],D=this.getCellGeometry(l);if(null!=D){D=D.clone();if(this.getModel().isVertex(l))D.x=Math.round(D.x/d)*d,D.y=Math.round(D.y/d)*d,D.width=Math.round(D.width/d)*d,D.height=Math.round(D.height/d)*d;else if(this.getModel().isEdge(l)&&null!=D.points)for(var p=0;p<D.points.length;p++)D.points[p].x=Math.round(D.points[p].x/d)*d,D.points[p].y=Math.round(D.points[p].y/d)*d;this.getModel().setGeometry(l,
+D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(d)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,d,g,l,D,p,E,N){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var R=this.isCloneConnectSource(b),G=R?b:this.getCompositeParent(b),M=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);d==mxConstants.DIRECTION_NORTH?(M.x+=G.geometry.width/2,M.y-=g):d==
+mxConstants.DIRECTION_SOUTH?(M.x+=G.geometry.width/2,M.y+=G.geometry.height+g):(M.x=d==mxConstants.DIRECTION_WEST?M.x-g:M.x+(G.geometry.width+g),M.y+=G.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));g=this.view.scale;var e=this.view.translate;G=e.x*g;e=e.y*g;null!=Q&&this.model.isVertex(Q.cell)&&(G=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(M.x+=b.parent.geometry.x,M.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+M.x*g,e+M.y*g)).grow(40*g);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,k=null;if(null!=p){p=p.reverse();for(var z=0;z<p.length;z++)if(!this.isCellLocked(p[z])&&!this.model.isEdge(p[z])&&p[z]!=b)if(!this.model.isAncestor(b,p[z])&&this.isContainer(p[z])&&(null==f||p[z]==this.model.getParent(b)))f=p[z];else if(null==k&&this.isCellConnectable(p[z])&&!this.model.isAncestor(p[z],b)&&!this.isSwimlane(p[z])){var t=this.view.getState(p[z]);null==Q||null==t||mxUtils.intersects(Q,t)||(k=p[z])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||D;B&&("1"!=urlParams.sketch||D)&&(d==mxConstants.DIRECTION_NORTH?M.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=b.geometry.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-b.geometry.width/2:M.x+b.geometry.width/2);var I=[],O=k;k=f;D=mxUtils.bind(this,function(J){if(null==E||null!=J||null==k&&R){this.model.beginUpdate();try{if(null==O&&B){var y=this.getAbsoluteParent(null!=J?J:b);y=R?b:this.getCompositeParent(y);O=null!=J?J:this.duplicateCells([y],
+!1)[0];null!=J&&this.addCells([O],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(O);null!=ia&&(null!=J&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?M.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?M.y+=ia.height/2:M.x=d==mxConstants.DIRECTION_WEST?M.x-ia.width/2:M.x+ia.width/2),ia.x=M.x-ia.width/2,ia.y=M.y-ia.height/2);null!=f?(this.addCells([O],f,null,null,null,!0),k=null):B&&!R&&this.addCells([O],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||null==k&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,O,this.createCurrentEdgeStyle());if(null!=da&&this.connectionHandler.insertBeforeSource){var ja=null;for(J=b;null!=J.parent&&null!=J.geometry&&J.geometry.relative&&J.parent!=da.parent;)J=this.model.getParent(J);null!=J&&null!=J.parent&&J.parent==da.parent&&(ja=J.parent.getIndex(J),this.model.add(J.parent,da,ja))}null==k&&null!=O&&null!=b.parent&&R&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
+O,ja));null!=da&&I.push(da);null==k&&null!=O&&I.push(O);null==O&&null!=da&&da.geometry.setTerminalPoint(M,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted","cells",[da]))}finally{this.model.endUpdate()}}if(null!=N)N(I);else return I});if(null==E||null!=O||!B||null==k&&R)return D(O);E(G+M.x*g,e+M.y*g,D)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),g=[],l,D=0;D<b.length;D++)if(l=b[D],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&g.push(l);return g.join(" ")};
+Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==g&&null!=l;)null!=l.value&&"object"==typeof l.value&&(g=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=d.getAttribute("label_"+Graph.diagramLanguage)),
+null==g&&(g=d.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var g=this.model.getParent(b);this.model.isVertex(g)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(g),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
+Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var g=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,g,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,g);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,g)}return d};Graph.prototype.replaceDefaultColor=function(b,d,g,l){null!=b&&"default"==b[d]&&null!=g&&(b[d]=this.getDefaultColor(b,d,g,l))};Graph.prototype.getDefaultColor=function(b,d,g,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(g=l);return g};
+Graph.prototype.updateAlternateBounds=function(b,d,g){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,d,g,l,D){d=null!=d?d:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var E=this.view.getState(g[p]),N=this.getCellGeometry(g[p]);if(null!=E&&null!=N){var R=Math.round(N.width-E.width/this.view.scale),G=Math.round(N.height-E.height/this.view.scale);if(0!=G||0!=R){var M=this.model.getParent(g[p]),Q=this.layoutManager.getLayout(M);
+null==Q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,M,R,G):null!=D&&mxEvent.isAltDown(D)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(M,Q,R,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
+Graph.prototype.moveSiblings=function(b,d,g,l){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<D.length;d++)if(D[d]!=b.cell){var p=this.view.getState(D[d]),E=this.getCellGeometry(D[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(D[d],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,d,g,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var D=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==D&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=g+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,d,g){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,m=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,m/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((m-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var m=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
-"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&m.push({name:b[C].nodeName,value:b[C].nodeValue});m.sort(function(p,F){return p.name<F.name?-1:p.name>F.name?1:0});for(C=0;C<m.length;C++)"link"==m[C].name&&this.isCustomLink(m[C].value)||(e+=("link"!=m[C].name?"<b>"+mxUtils.htmlEntities(m[C].name)+":</b> ":"")+mxUtils.htmlEntities(m[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
-Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var g=this.container.clientWidth-d,l=this.container.clientHeight-d,D=Math.floor(20*Math.min(g/b.width,l/b.height))/20;this.zoomTo(D);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*D-Math.max((l-b.height*D)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*D-Math.max((g-b.width*D)/2+d/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=b.value.getAttribute("tooltip"));if(null!=g)null!=g&&this.isReplacePlaceholders(b)&&(g=this.replacePlaceholders(b,g)),d=Graph.sanitizeHtml(g);else{g=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var D=0;D<b.length;D++)(Graph.translateDiagram&&
+"label"==b[D].nodeName||0>mxUtils.indexOf(g,b[D].nodeName))&&0<b[D].nodeValue.length&&l.push({name:b[D].nodeName,value:b[D].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(D=0;D<l.length;D++)"link"==l[D].name&&this.isCustomLink(l[D].value)||(d+=("link"!=l[D].name?"<b>"+mxUtils.htmlEntities(l[D].name)+":</b> ":"")+mxUtils.htmlEntities(l[D].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
+Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,217 +2432,217 @@ HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+x
IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
-this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-m){e=!1;k=m.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(k)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,m){k=m.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
-function(k,m){k=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,e,k){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",
-"arrow",m,"direction",k,"event",C)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
-mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
-HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(m)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(g){null!=g.relatedTarget&&
+mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(g){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(g){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(g.getEvent())||this.graph.model.isVertex(g.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(g,
+l){d=!1;g=l.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(g)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,l){g=l.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
+function(g,l){g=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(g)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,d,g){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(D){null==this.currentState||this.isResetEvent(D)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),this.drag(D,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(D))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",g,"event",D)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(D){mxEvent.isMouseEvent(D)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",g,"event",D));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,d,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
+mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,g){return this.graph.view.getState(this.graph.getCellAt(d,g))};
+HoverIcons.prototype.click=function(b,d,g){var l=g.getEvent(),D=g.getGraphX(),p=g.getGraphY();D=this.getStateAt(b,D,p);null==D||!this.graph.model.isEdge(D.cell)||this.graph.isCloneEvent(l)||D.getVisibleTerminalState(!0)!=b&&D.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,g):(this.graph.setSelectionCell(D.cell),this.reset());g.consume()};
+HoverIcons.prototype.execute=function(b,d,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
-this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
+(g=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(N,R,G){if(null!=g){var M=new mxRectangle(R,G,N.clientWidth,N.clientHeight);mxUtils.intersects(M,g)&&(N==this.arrowUp?G-=M.y+M.height-g.y:N==this.arrowRight?R+=g.x+g.width-M.x:N==this.arrowDown?G+=g.y+g.height-M.y:N==this.arrowLeft&&(R-=M.x+M.width-g.x))}N.style.left=R+"px";N.style.top=G+"px";mxUtils.setOpacity(N,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==D&&D==b&&(b=D=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(N,R){var G=this.graph.model.isVertex(N)&&this.graph.getCellGeometry(N);null==N||this.graph.model.isAncestor(N,
+this.currentState.cell)||this.graph.isSwimlane(N)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?R.style.visibility="visible":R.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
-b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
-Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,d,g){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,g))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,g)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==d||null==g||!mxUtils.contains(this.bbox,d,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,g,l,D){b=this.cloneCell(b);for(var p=0;p<g;p++){var E=this.cloneCell(d),N=this.getCellGeometry(E);null!=N&&(N.x+=p*l,N.y+=p*D);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:60;l=null!=l?l:40;p=null!=p?p:30;N=null!=N?N:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=D?D:"",0,0,d*g,b*l+(null!=D?p:0),null!=E?E:"shape=table;startSize="+(null!=D?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*g,l,N),this.createVertex(null,null,"",0,0,g,l,R),d,g,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,d,g){for(var l=this.model.getChildCells(b,!0),D=0;D<l.length;D++)if(null!=g&&(l[D].value=g[D]),null!=d)for(var p=this.model.getChildCells(l[D],!0),E=0;E<p.length;E++)null!=d[D][E]&&(p[E].value=d[D][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,d,g,l,D,p,E,N,R){g=null!=g?g:120;l=null!=l?l:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";N=null!=N?N:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+R=null!=R?R:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,d*g,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=p;D.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,d*g+p,l,E);D.insert(this.createParent(E,this.createVertex(null,null,"",p,0,g,l,N),d,g,0));return 1<b?(E.geometry.y=l+p,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",p,0,g,l,R),d,g,0),b-1,0,l)):D};
+Graph.prototype.visitTableCells=function(b,d){var g=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<l.length;D++){for(var p=this.getActualStartSize(l[D],!0),E=this.model.getChildCells(l[D],!0),N=this.getCellStyle(l[D],!0),R=null,G=[],M=0;M<E.length;M++){var Q=this.getCellGeometry(E[M]),e={cell:E[M],rospan:1,colspan:1,row:D,col:M,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=R?R.point.x:b.x+p.x),Q.height+(null!=g&&null!=
+g[0]?g[0].point.y:b.y+p.y));e.actual=e;null!=g&&null!=g[M]&&1<g[M].rowspan?(e.rowspan=g[M].rowspan-1,e.colspan=g[M].colspan,e.actual=g[M].actual):null!=R&&1<R.colspan?(e.rowspan=R.rowspan,e.colspan=R.colspan-1,e.actual=R.actual):(R=this.getCurrentCellStyle(E[M],!0),null!=R&&(e.rowspan=parseInt(R.rowspan||1),e.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(N,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(N,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
+l.length,b.x+(R?p.x:0),b.y+(R?p.y:0));G.push(e);R=e}g=G}};Graph.prototype.getTableLines=function(b,d,g){var l=[],D=[];(d||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,N,R,G){d&&p.row<N-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(R,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));g&&p.col<E-1&&(null==D[p.col]&&(D[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&D[p.col].push(null),D[p.col].push(p.point))}));return l.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return L};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
-k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
-!1)}finally{F.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
-arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
-T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
-S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
-la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
-G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
-g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
-g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
-x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
-y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+Graph.prototype.setTableRowHeight=function(b,d,g){g=null!=g?g:!0;var l=this.getModel();l.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=d;l.setGeometry(b,D);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!g){var N=mxUtils.indexOf(E,b);if(N<E.length-1){var R=E[N+1],G=this.getCellGeometry(R);null!=G&&(G=G.clone(),G.y+=d,G.height-=d,l.setGeometry(R,G))}}var M=this.getCellGeometry(p);null!=M&&(g||(g=b==E[E.length-1]),g&&(M=M.clone(),M.height+=d,l.setGeometry(p,M)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,d,g){g=null!=g?g:!1;var l=this.getModel(),D=l.getParent(b),p=l.getParent(D),E=l.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var N=b==E.length-1;l.beginUpdate();try{for(var R=l.getChildCells(p,!0),G=0;G<R.length;G++){D=R[G];E=l.getChildCells(D,!0);var M=E[b],Q=this.getCellGeometry(M);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(M,Q));b<E.length-1&&(M=E[b+1],Q=this.getCellGeometry(M),null!=Q&&(Q=Q.clone(),
+Q.x+=d,g||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(M,Q)))}if(N||g){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var g=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var D=this.graph.getCellGeometry(b[l]);null!=D&&(g+=d?D.width:D.height)}return g};
+TableLayout.prototype.getRowLayout=function(b,d){var g=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);d=d-l.x-l.width;var D=[];l=l.x;for(var p=0;p<g.length;p++){var E=this.graph.getCellGeometry(g[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,D.push(Math.round(l)))}return D};
+TableLayout.prototype.layoutRow=function(b,d,g,l){var D=this.graph.getModel(),p=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,N=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var R=0;R<p.length;R++){var G=this.graph.getCellGeometry(p[R]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=d?(G.x=d[R],G.width=d[R+1]-G.x,R==p.length-1&&R<d.length-2&&(G.width=l-G.x-b.x-b.width)):(G.x=E,E+=G.width,R==p.length-1?G.width=l-b.x-b.width-N:N+=G.width),G.alternateBounds=new mxRectangle(0,
+0,G.width,G.height),D.setGeometry(p[R],G))}return N};
+TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),N=0;E.beginUpdate();try{for(var R=g.height-d.y-d.height,G=g.width-d.x-d.width,M=E.getChildCells(b,!0),Q=0;Q<M.length;Q++)E.setVisible(M[Q],!0);var e=this.getSize(M,!1);if(0<R&&0<G&&0<
+M.length&&0<e){if(D){var f=this.graph.getCellGeometry(M[M.length-1]);null!=f&&(f=f.clone(),f.height=R-e+f.height,E.setGeometry(M[M.length-1],f))}var k=p?null:this.getRowLayout(M[0],G),z=[],t=d.y;for(Q=0;Q<M.length;Q++)f=this.graph.getCellGeometry(M[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=G,f.y=Math.round(t),t=D||l?t+f.height:t+f.height/e*R,f.height=Math.round(t)-f.y,E.setGeometry(M[Q],f)),N=Math.max(N,this.layoutRow(M[Q],k,f.height,G,z));l&&R<e&&(g=g.clone(),g.height=t+d.height,E.setGeometry(b,
+g));p&&G<N+Graph.minTableColumnWidth&&(g=g.clone(),g.width=N+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.actual.geo.height+=I.height)}}))}else for(Q=0;Q<M.length;Q++)E.setVisible(M[Q],
+!1)}finally{E.endUpdate()}}};
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(M,Q){Q=null!=Q?Q:!0;var e=this.getState(M);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
+arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var M=this.node.getElementsByTagName("path");if(1<M.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&M[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&M[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(M,Q){return l.apply(this,arguments)||null!=M.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,M.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(M){D.apply(this,arguments);this.graph.model.isEdge(M.cell)&&1!=M.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(M)};mxGraphView.prototype.updateLineJumps=function(M){var Q=M.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=M.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(M.style,"jumpStyle","none")){var k=function(qa,sa,L){var V=new mxPoint(sa,L);V.type=qa;f.push(V);V=null!=M.routedPoints?M.routedPoints[f.length-1]:null;return null==V||V.type!=
+qa||V.x!=sa||V.y!=L},z=.5*this.scale;e=!1;f=[];for(var t=0;t<Q.length-1;t++){for(var B=Q[t+1],I=Q[t],O=[],J=Q[t+2];t<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,J.x,J.y,B.x,B.y)<1*this.scale*this.scale;)B=J,t++,J=Q[t+2];e=k(0,I.x,I.y)||e;for(var y=0;y<this.validEdges.length;y++){var ia=this.validEdges[y],da=ia.absolutePoints;if(null!=da&&mxUtils.intersects(M,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<da.length-1;ia++){var ja=da[ia+1],aa=da[ia];for(J=da[ia+2];ia<da.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,J.x,
+J.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=J,ia++,J=da[ia+2];J=mxUtils.intersection(I.x,I.y,B.x,B.y,aa.x,aa.y,ja.x,ja.y);if(null!=J&&(Math.abs(J.x-I.x)>z||Math.abs(J.y-I.y)>z)&&(Math.abs(J.x-B.x)>z||Math.abs(J.y-B.y)>z)&&(Math.abs(J.x-aa.x)>z||Math.abs(J.y-aa.y)>z)&&(Math.abs(J.x-ja.x)>z||Math.abs(J.y-ja.y)>z)){ja=J.x-I.x;aa=J.y-I.y;J={distSq:ja*ja+aa*aa,x:J.x,y:J.y};for(ja=0;ja<O.length;ja++)if(O[ja].distSq>J.distSq){O.splice(ja,0,J);J=null;break}null==J||0!=O.length&&O[O.length-1].x===J.x&&O[O.length-
+1].y===J.y||O.push(J)}}}for(ia=0;ia<O.length;ia++)e=k(1,O[ia].x,O[ia].y)||e}J=Q[Q.length-1];e=k(0,J.x,J.y)||e}M.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(M,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,k=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),t=!0,B=null,I=null,O=[],J=null;M.begin();for(var y=0;y<this.state.routedPoints.length;y++){var ia=this.state.routedPoints[y],da=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==y?da=Q[0]:y==this.state.routedPoints.length-1&&(da=Q[Q.length-1]);var ja=!1;if(null!=B&&1==ia.type){var aa=this.state.routedPoints[y+1];ia=aa.x/this.scale-
+da.x;aa=aa.y/this.scale-da.y;ia=ia*ia+aa*aa;null==J&&(J=new mxPoint(da.x-B.x,da.y-B.y),I=Math.sqrt(J.x*J.x+J.y*J.y),0<I?(J.x=J.x*k/I,J.y=J.y*k/I):J=null);ia>k*k&&0<I&&(ia=B.x-da.x,aa=B.y-da.y,ia=ia*ia+aa*aa,ia>k*k&&(ja=new mxPoint(da.x-J.x,da.y-J.y),ia=new mxPoint(da.x+J.x,da.y+J.y),O.push(ja),this.addPoints(M,O,e,f,!1,null,t),O=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,t=!1,"sharp"==z?(M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.lineTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x,ia.y)):"line"==
+z?(M.moveTo(ja.x+J.y*O,ja.y-J.x*O),M.lineTo(ja.x-J.y*O,ja.y+J.x*O),M.moveTo(ia.x-J.y*O,ia.y+J.x*O),M.lineTo(ia.x+J.y*O,ia.y-J.x*O),M.moveTo(ia.x,ia.y)):"arc"==z?(O*=1.3,M.curveTo(ja.x-J.y*O,ja.y+J.x*O,ia.x-J.y*O,ia.y+J.x*O,ia.x,ia.y)):(M.moveTo(ia.x,ia.y),t=!0),O=[ia],ja=!0))}else J=null;ja||(O.push(da),B=da)}this.addPoints(M,O,e,f,!1,null,t);M.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(M,Q,e,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var N=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(M,Q,e,f){if(null==Q||null==M||"1"!=Q.style.snapToPoint&&"1"!=M.style.snapToPoint)N.apply(this,arguments);else{Q=this.getTerminalPort(M,Q,f);var k=this.getNextPoint(M,e,f),z=this.graph.isOrthogonal(M),t=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=t){var I=Math.cos(-t),O=Math.sin(-t);k=mxUtils.getRotatedPoint(k,I,O,B)}I=parseFloat(M.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(M.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(Q,k,0==t&&z,I);0!=t&&(I=Math.cos(t),O=Math.sin(t),k=mxUtils.getRotatedPoint(k,I,O,B));M.setAbsoluteTerminalPoint(this.snapToAnchorPoint(M,Q,e,f,k),f)}};mxGraphView.prototype.snapToAnchorPoint=function(M,Q,
+e,f,k){if(null!=Q&&null!=M){M=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=M)for(var z=0;z<M.length;z++){var t=this.graph.getConnectionPoint(Q,M[z]);if(null!=t){var B=(t.x-k.x)*(t.x-k.x)+(t.y-k.y)*(t.y-k.y);if(null==f||B<f)e=t,f=B}}null!=e&&(k=e)}return k};var R=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(M,Q,e){var f=R.apply(this,arguments);"1"==M.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
+f));return f};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(M){if(null!=M.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(M.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return G.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
-null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
-mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
-mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
-C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){d=mxStencilRegistry.libraries[g];if(null!=d){if(null==mxStencilRegistry.packages[g]){for(var l=0;l<d.length;l++){var D=d[l];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
+null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(D);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,g,d,D,E)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
+mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var g=2;g<b.length-1;g++)d+="/"+b[g]}return d};
+mxStencilRegistry.loadStencilSet=function(b,d,g,l){var D=mxStencilRegistry.packages[b];if(null!=g&&g||null==D){var p=!1;if(null==D)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}D=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=D;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=D&&null!=
+D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(g){d(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,d,g){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,g),l=l.nextSibling;else{g=null!=g?g:!0;l=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){D=D.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(D+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
+N=l.getAttribute("h");E=null==E?80:parseInt(E,10);N=null==N?80:parseInt(N,10);d(D,p,b,E,N)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,H){switch(H){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
-!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
-this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
-(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
-ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
-xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
-(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
-!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
-Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
-!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
-if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
-0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
-this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
-this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
-U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
-ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
-Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
-W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
-W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
-this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
-(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
-null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
-J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
-W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
-this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
-ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
-this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
-!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
-Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
-(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
-xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
-J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
-J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
-J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
-1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
-!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
-W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
-ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
-Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
-null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
-J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
-W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
-J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
-this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
-J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
-"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
-this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
-null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
-!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
-J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
-U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
-J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
-function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
-this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
-U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
-W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
-for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
-mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(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]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=
-xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
-this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
-function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
-U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
-ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
-U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
-1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
-z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
-new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
-db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
-U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
-2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(x)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
+function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var H in this.graph.currentEdgeStyle)x.style[H]=this.graph.currentEdgeStyle[H];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),H=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=H.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",H="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<H.length;P++)null!=this.currentEdgeStyle[H[P]]&&(x+=H[P]+"="+this.currentEdgeStyle[H[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,H){H=null!=H?H:{};for(var P=0;P<x.length;P++){var X=x[P];H[mxObjectIdentity.get(X)]=X.getId();for(var Z=this.model.getChildCount(X),
+fa=0;fa<Z;fa++)this.createCellLookup([this.model.getChildAt(X,fa)],H)}return H};Graph.prototype.createCellMapping=function(x,H,P){P=null!=P?P:{};for(var X in x){var Z=H[X];null==P[Z]&&(P[Z]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,H,P,X){H=null!=H?H:0;P=null!=P?P:0;var Z=new mxCodec(x.ownerDocument),fa=new mxGraphModel;Z.decode(x,fa);x=[];Z={};var la={},za=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),Z));if(null!=za){var ua=this.createCellLookup([fa.root]);
+za=za.slice();this.model.beginUpdate();try{if(1!=za.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<za.length;fa++)oa=this.model.getChildren(this.moveCells([za[fa]],H,P,!1,this.model.getRoot())[0]),null!=oa&&(x=x.concat(oa));else{var oa=fa.getChildren(za[0]);null!=oa&&(x=this.moveCells(oa,H,P,!1,this.getDefaultParent()),la[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(Z,ua,la),this.updateCustomLinks(la,x),X)){this.isGridEnabled()&&
+(H=this.snap(H),P=this.snap(P));var ta=this.getBoundingBoxFromGeometry(x,!0);null!=ta&&this.moveCells(x,H-ta.x,P-ta.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var H={},P=this.cloneCells(x,null,H),X=new mxDictionary,Z=0;Z<x.length;Z++)X.put(x[Z],!0);var fa=new mxCodec,la=new mxGraphModel,za=la.getChildAt(la.getRoot(),0);for(Z=0;Z<P.length;Z++){la.add(za,P[Z]);var ua=this.view.getState(x[Z]);if(null!=ua){var oa=this.getCellGeometry(P[Z]);null!=oa&&oa.relative&&
+!this.model.isEdge(x[Z])&&null==X.get(this.model.getParent(x[Z]))&&(oa.offset=null,oa.relative=!1,oa.x=ua.x/ua.view.scale-ua.view.translate.x,oa.y=ua.y/ua.view.scale-ua.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(H,this.createCellLookup(x)),P);return fa.encode(la)};Graph.prototype.isSwimlane=function(x,H){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,H)[mxConstants.STYLE_SHAPE]);return P==mxConstants.SHAPE_SWIMLANE||
+"table"==P||"tableRow"==P};var N=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var H=this.model.getParent(x);if(null!=H){var P=this.getCurrentCellStyle(H);if(null!=P.expand)return"0"!=P.expand}return N.apply(this,arguments)&&(null==H||!this.isTable(H))};var R=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,H,P,X,Z,fa,la,za){null==za&&(za=this.model.getParent(x),this.isTable(za)||this.isTableRow(za))&&(za=this.getCellAt(fa,la,null,!0,!1));P=null;this.model.beginUpdate();
+try{P=R.apply(this,[x,H,P,X,Z,fa,la,za]);this.model.setValue(P,"");var ua=this.getChildCells(P,!0);for(H=0;H<ua.length;H++){var oa=this.getCellGeometry(ua[H]);null!=oa&&oa.relative&&0<oa.x&&this.model.remove(ua[H])}var ta=this.getChildCells(x,!0);for(H=0;H<ta.length;H++)oa=this.getCellGeometry(ta[H]),null!=oa&&oa.relative&&0>=oa.x&&this.model.remove(ta[H]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ea=this.model.getTerminal(P,!1);if(null!=Ea){var Fa=this.getCurrentCellStyle(Ea);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};var G=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(x,H,P){if(H||P)G.apply(this,arguments);else{var X=this.getSelectionCell(),Z=null,fa=[],la=mxUtils.bind(this,function(za){if(null!=this.view.getState(za)&&(this.model.isVertex(za)||this.model.isEdge(za)))if(fa.push(za),za==X)Z=fa.length-1;else if(x&&null==X&&0<fa.length||null!=Z&&x&&fa.length>Z||!x&&0<Z)return;for(var ua=0;ua<this.model.getChildCount(za);ua++)la(this.model.getChildAt(za,ua))});la(this.model.root);0<fa.length&&(Z=null!=Z?mxUtils.mod(Z+(x?1:-1),fa.length):0,this.setSelectionCell(fa[Z]))}};
+Graph.prototype.swapShapes=function(x,H,P,X,Z,fa,la){H=!1;if(!X&&null!=Z&&1==x.length&&(X=this.view.getState(Z),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(Z),fa=this.getCellGeometry(x[0]),null!=X&&null!=fa))){H=X.clone();X=fa.clone();X.x=H.x;X.y=H.y;H.x=fa.x;H.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(Z,H),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}H=
+!0}return H};var M=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,H,P,X,Z,fa,la){if(this.swapShapes(x,H,P,X,Z,fa,la))return x;la=null!=la?la:{};if(this.isTable(Z)){for(var za=[],ua=0;ua<x.length;ua++)this.isTable(x[ua])?za=za.concat(this.model.getChildCells(x[ua],!0).reverse()):za.push(x[ua]);x=za}this.model.beginUpdate();try{za=[];for(ua=0;ua<x.length;ua++)if(null!=Z&&this.isTableRow(x[ua])){var oa=this.model.getParent(x[ua]),ta=this.getCellGeometry(x[ua]);this.isTable(oa)&&za.push(oa);
+if(null!=oa&&null!=ta&&this.isTable(oa)&&this.isTable(Z)&&(X||oa!=Z)){if(!X){var Ea=this.getCellGeometry(oa);null!=Ea&&(Ea=Ea.clone(),Ea.height-=ta.height,this.model.setGeometry(oa,Ea))}Ea=this.getCellGeometry(Z);null!=Ea&&(Ea=Ea.clone(),Ea.height+=ta.height,this.model.setGeometry(Z,Ea));var Fa=this.model.getChildCells(Z,!0);if(0<Fa.length){x[ua]=X?this.cloneCell(x[ua]):x[ua];var Pa=this.model.getChildCells(x[ua],!0),Ra=this.model.getChildCells(Fa[0],!0),Ca=Ra.length-Pa.length;if(0<Ca)for(var Ja=
+0;Ja<Ca;Ja++){var Qa=this.cloneCell(Pa[Pa.length-1]);null!=Qa&&(Qa.value="",this.model.add(x[ua],Qa))}else if(0>Ca)for(Ja=0;Ja>Ca;Ja--)this.model.remove(Pa[Pa.length+Ja-1]);Pa=this.model.getChildCells(x[ua],!0);for(Ja=0;Ja<Ra.length;Ja++){var $a=this.getCellGeometry(Ra[Ja]),eb=this.getCellGeometry(Pa[Ja]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Pa[Ja],eb))}}}}var cb=M.apply(this,arguments);for(ua=0;ua<za.length;ua++)!X&&this.model.contains(za[ua])&&0==this.model.getChildCount(za[ua])&&
+this.model.remove(za[ua]);X&&this.updateCustomLinks(this.createCellMapping(la,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,H){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var Z=this.model.getParent(x[X]),fa=this.model.getParent(Z);1==this.model.getChildCount(Z)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa)&&P.push(fa):
+this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(fa=this.model.getParent(x[X]),0>mxUtils.indexOf(x,fa)&&0>mxUtils.indexOf(P,fa))){for(var la=this.model.getChildCells(fa,!0),za=0,ua=0;ua<la.length;ua++)0<=mxUtils.indexOf(x,la[ua])&&za++;za==la.length&&P.push(fa)}P.push(x[X])}P=Q.apply(this,[P,H])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,H,P){P=null!=P?P:new Graph;for(var X=0;X<H.length;X++)null!=H[X]&&P.updateCustomLinksForCell(x,H[X],P)};Graph.prototype.updateCustomLinksForCell=
+function(x,H){this.doUpdateCustomLinksForCell(x,H);for(var P=this.model.getChildCount(H),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(H,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,H){};Graph.prototype.getAllConnectionConstraints=function(x,H){if(null!=x){H=mxUtils.getValue(x.style,"points",null);if(null!=H){x=[];try{var P=JSON.parse(H);for(H=0;H<P.length;H++){var X=P[H];x.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?
+X[3]:0,4<X.length?X[4]:0))}}catch(fa){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;H=x.shape.bounds;var Z=x.shape.scale;P=H.width/Z;H=H.height/Z;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=H,H=X;H=x.shape.getConstraints(x.style,P,H);if(null!=H)return H;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=
+x){var H=this.getCurrentCellStyle(x);H=mxUtils.getValue(H,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,H,[x])}};Graph.prototype.isValidRoot=function(x){for(var H=this.model.getChildCount(x),P=0,X=0;X<H;X++){var Z=this.model.getChildAt(x,X);this.model.isVertex(Z)&&(Z=this.getCellGeometry(Z),null==Z||Z.relative||P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=
+function(x,H,P){for(var X=this.getCurrentCellStyle(x),Z=!0,fa=!0,la=0;la<H.length&&fa;la++)Z=Z&&this.isTable(H[la]),fa=fa&&this.isTableRow(H[la]);return(1==H.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||fa||Z))&&!this.isCellLocked(x)};
+Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var H=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(H&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(H=!1))}return H};Graph.prototype.getPreferredSizeForCell=function(x){var H=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=H&&(H.width+=10,H.height+=4,this.gridEnabled&&(H.width=this.snap(H.width),H.height=this.snap(H.height)));return H};Graph.prototype.turnShapes=function(x,H){var P=this.getModel(),X=[];P.beginUpdate();try{for(var Z=0;Z<x.length;Z++){var fa=x[Z];if(P.isEdge(fa)){var la=P.getTerminal(fa,!0),za=P.getTerminal(fa,!1);P.setTerminal(fa,za,!0);P.setTerminal(fa,la,!1);var ua=P.getGeometry(fa);if(null!=ua){ua=ua.clone();null!=ua.points&&ua.points.reverse();var oa=ua.getTerminalPoint(!0),ta=ua.getTerminalPoint(!1);
+ua.setTerminalPoint(oa,!1);ua.setTerminalPoint(ta,!0);P.setGeometry(fa,ua);var Ea=this.view.getState(fa),Fa=this.view.getState(la),Pa=this.view.getState(za);if(null!=Ea){var Ra=null!=Fa?this.getConnectionConstraint(Ea,Fa,!0):null,Ca=null!=Pa?this.getConnectionConstraint(Ea,Pa,!1):null;this.setConnectionConstraint(fa,la,!0,Ca);this.setConnectionConstraint(fa,za,!1,Ra);var Ja=mxUtils.getValue(Ea.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ea.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[fa])}X.push(fa)}}else if(P.isVertex(fa)&&(ua=this.getCellGeometry(fa),null!=ua)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){ua=ua.clone();ua.x+=ua.width/2-ua.height/2;ua.y+=ua.height/2-ua.width/2;var Qa=ua.width;ua.width=ua.height;ua.height=Qa;P.setGeometry(fa,ua)}var $a=this.view.getState(fa);if(null!=$a){var eb=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(H?-1:1),eb.length)],[fa])}X.push(fa)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;
+x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var H=x.cell;this.isTableCell(H)&&(H=this.model.getParent(H));this.isTableRow(H)&&(H=this.model.getParent(H));var P=this.view.getState(H);null!=P&&null!=P.shape&&(this.view.invalidate(H),P.shape.bounds=null)}e.apply(this,arguments);
+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var H=0;H<x.length;H++){var P=this.view.getState(x[H]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[H]):this.isReplacePlaceholders(x[H])&&this.view.invalidate(x[H],!1,!1)}};
+Graph.prototype.replaceElement=function(x,H){H=x.ownerDocument.createElement(null!=H?H:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)H.setAttribute(attr.nodeName,attr.nodeValue);H.innerHTML=x.innerHTML;x.parentNode.replaceChild(H,x)};Graph.prototype.processElements=function(x,H){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)H(x[P])}};Graph.prototype.updateLabelElements=function(x,H,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),
+Z=0;Z<x.length;Z++)if(this.isHtmlLabel(x[Z])){var fa=this.convertValueToString(x[Z]);if(null!=fa&&0<fa.length){X.innerHTML=fa;for(var la=X.getElementsByTagName(null!=P?P:"*"),za=0;za<la.length;za++)H(la[za]);X.innerHTML!=fa&&this.cellLabelChanged(x[Z],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,H,P){H=Graph.zapGremlins(H);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),
+Z=x;null!=Z;){if(Z==this.model.getRoot()||null!=Z.value&&"object"==typeof Z.value&&Z.hasAttribute(X)){this.setAttributeForCell(Z,X,H);break}Z=this.model.getParent(Z)}var fa=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,H):fa.setAttribute("label",H);H=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=
+x){for(var H=new mxDictionary,P=0;P<x.length;P++)H.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var Z=this.model.getParent(x[P]);null==Z||H.get(Z)||(H.put(Z,!0),X.push(Z))}for(P=0;P<X.length;P++)if(Z=this.view.getState(X[P]),null!=Z&&(this.model.isEdge(Z.cell)||this.model.isVertex(Z.cell))&&this.isCellDeletable(Z.cell)&&this.isTransparentState(Z)){for(var fa=!0,la=0;la<this.model.getChildCount(Z.cell)&&fa;la++)H.get(this.model.getChildAt(Z.cell,la))||(fa=!1);fa&&x.push(Z.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var H=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&H.push(x[P]);x=H;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,H){this.setAttributeForCell(x,"link",H)};Graph.prototype.setTooltipForCell=function(x,H){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,H)};Graph.prototype.getAttributeForCell=function(x,H,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(H):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,H,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),X.setAttribute("label",x.value||"");null!=P?X.setAttribute(H,P):X.removeAttribute(H);
+this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,H,P,X){this.getModel();if(mxEvent.isAltDown(H))return null;for(var Z=0;Z<x.length;Z++){var fa=this.model.getParent(x[Z]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(x,fa))return null}fa=f.apply(this,arguments);var la=!0;for(Z=0;Z<x.length&&la;Z++)la=la&&this.isTableRow(x[Z]);la&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||
+(fa=null));return fa};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,H){this.isEnabled()&&(H=this.insertTextForEvent(x,H),mxGraph.prototype.dblClick.call(this,x,H))};Graph.prototype.insertTextForEvent=function(x,H){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(H)){var X=this.model.isEdge(H)?this.view.getState(H):
+null,Z=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=Z||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&Z==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),H=this.addText(P.x,P.y,X))}return H};
+Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),H=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),Z=this.getPageSize();H=Math.max(H,X.x*Z.width);P=Math.max(P,X.y*Z.height)}return new mxPoint(this.snap(H+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,H=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,
+H.x/x.scale-x.translate.x+(0==H.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(H.y+H.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,H,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+X.geometry.relative=!0;X.connectable=!1;var Z=this.view.getRelativePoint(P,x,H);X.geometry.x=Math.round(1E4*Z.x)/1E4;X.geometry.y=Math.round(Z.y);X.geometry.offset=new mxPoint(0,0);Z=this.view.getPoint(P,X.geometry);var fa=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-Z.x)/fa),Math.round((H-Z.y)/fa))}else Z=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-
+Z.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(H/this.view.scale)-Z.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,H,P){var X=mxUtils.bind(this,function(){var ua=this.container.getElementsByTagName("a");if(null!=ua)for(var oa=0;oa<ua.length;oa++){var ta=
+this.getAbsoluteUrl(ua[oa].getAttribute("href"));null!=ta&&(ua[oa].setAttribute("rel",this.linkRelation),ua[oa].setAttribute("href",ta),null!=H&&mxEvent.addGestureListeners(ua[oa],null,null,H))}});this.model.addListener(mxEvent.CHANGE,X);X();var Z=this.container.style.cursor,fa=this.getTolerance(),la=this,za={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(la,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ua){var oa=
+ua.sourceState;if(null==oa||null==la.getLinkForCell(oa.cell))ua=la.getCellAt(ua.getGraphX(),ua.getGraphY(),null,null,null,function(ta,Ea,Fa){return null==la.getLinkForCell(ta.cell)}),oa=null==oa||la.model.isAncestor(ua,oa.cell)?la.view.getState(ua):null;oa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=oa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ua,oa){this.startX=oa.getGraphX();this.startY=oa.getGraphY();this.scrollLeft=la.container.scrollLeft;
+this.scrollTop=la.container.scrollTop;null==this.currentLink&&"auto"==la.container.style.overflow&&(la.container.style.cursor="move");this.updateCurrentState(oa)},mouseMove:function(ua,oa){if(la.isMouseDown)null!=this.currentLink&&(ua=Math.abs(this.startX-oa.getGraphX()),oa=Math.abs(this.startY-oa.getGraphY()),(ua>fa||oa>fa)&&this.clear());else{for(ua=oa.getSource();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null!=ua?this.clear():(null!=la.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&la.tooltipHandler.reset(oa,!0,this.currentState),(null==this.currentState||oa.getState()!=this.currentState&&null!=oa.sourceState||!la.intersects(this.currentState,oa.getGraphX(),oa.getGraphY()))&&this.updateCurrentState(oa))}},mouseUp:function(ua,oa){var ta=oa.getSource();for(ua=oa.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&(null==oa.sourceState||
+!oa.isSource(oa.sourceState.control))&&((mxEvent.isLeftMouseButton(ua)||mxEvent.isMiddleMouseButton(ua))&&!mxEvent.isPopupTrigger(ua)||mxEvent.isTouchEvent(ua))&&(null!=this.currentLink?(ta=la.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==H||H(ua,this.currentLink),mxEvent.isConsumed(ua)||(ua=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ua)?"_blank":ta?la.linkTarget:"_top",la.openLink(this.currentLink,ua),oa.consume())):null!=P&&!oa.isConsumed()&&
+Math.abs(this.scrollLeft-la.container.scrollLeft)<fa&&Math.abs(this.scrollTop-la.container.scrollTop)<fa&&Math.abs(this.startX-oa.getGraphX())<fa&&Math.abs(this.startY-oa.getGraphY())<fa&&P(oa.getEvent()));this.clear()},activate:function(ua){this.currentLink=la.getAbsoluteUrl(la.getLinkForCell(ua.cell));null!=this.currentLink&&(this.currentTarget=la.getLinkTargetForCell(ua.cell),la.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ua))},clear:function(){null!=la.container&&
+(la.container.style.cursor=Z);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=la.tooltipHandler&&la.tooltipHandler.hide()}};la.click=function(ua){};la.addMouseListener(za);mxEvent.addListener(document,"mouseleave",function(ua){za.clear()})};Graph.prototype.duplicateCells=function(x,H){x=null!=x?x:this.getSelectionCells();H=null!=H?H:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);
+var X=this.getModel(),Z=this.gridSize,fa=[];X.beginUpdate();try{var la={},za=this.createCellLookup(x),ua=this.cloneCells(x,!1,la,!0);for(P=0;P<x.length;P++){var oa=X.getParent(x[P]);if(null!=oa){var ta=this.moveCells([ua[P]],Z,Z,!1)[0];fa.push(ta);if(H)X.add(oa,ua[P]);else{var Ea=oa.getIndex(x[P]);X.add(oa,ua[P],Ea+1)}if(this.isTable(oa)){var Fa=this.getCellGeometry(ua[P]),Pa=this.getCellGeometry(oa);null!=Fa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Fa.height,X.setGeometry(oa,Pa))}}else fa.push(ua[P])}this.updateCustomLinks(this.createCellMapping(la,
+za),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{X.endUpdate()}return fa};Graph.prototype.insertImage=function(x,H,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),Z=[],fa=0;fa<X.length;fa++)Z.push(X[fa]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==Z.length+1)for(fa=x.length-1;0<=fa;fa--)if(0==fa||x[fa]!=Z[fa-1]){x[fa].setAttribute("width",
+H);x[fa].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var H=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<H.length;X++)P.push(H[X]);document.execCommand("createlink",!1,mxUtils.trim(x));H=this.cellEditor.textarea.getElementsByTagName("a");if(H.length==P.length+1)for(X=H.length-1;0<=X;X--)if(H[X]!=P[X-1]){for(H=H[X].getElementsByTagName("a");0<H.length;){for(P=
+H[0].parentNode;null!=H[0].firstChild;)P.insertBefore(H[0].firstChild,H[0]);P.removeChild(H[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var H=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(H||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,H){null==
+H&&(H=this.getSelectionCells());if(null!=H&&1<H.length){for(var P=[],X=null,Z=null,fa=0;fa<H.length;fa++)if(this.getModel().isVertex(H[fa])){var la=this.view.getState(H[fa]);if(null!=la){var za=x?la.getCenterX():la.getCenterY();X=null!=X?Math.max(X,za):za;Z=null!=Z?Math.min(Z,za):za;P.push(la)}}if(2<P.length){P.sort(function(Ea,Fa){return x?Ea.x-Fa.x:Ea.y-Fa.y});la=this.view.translate;za=this.view.scale;Z=Z/za-(x?la.x:la.y);X=X/za-(x?la.x:la.y);this.getModel().beginUpdate();try{var ua=(X-Z)/(P.length-
+1);X=Z;for(fa=1;fa<P.length-1;fa++){var oa=this.view.getState(this.model.getParent(P[fa].cell)),ta=this.getCellGeometry(P[fa].cell);X+=ua;null!=ta&&null!=oa&&(ta=ta.clone(),x?ta.x=Math.round(X-ta.width/2)-oa.origin.x:ta.y=Math.round(X-ta.height/2)-oa.origin.y,this.getModel().setGeometry(P[fa].cell,ta))}}finally{this.getModel().endUpdate()}}}return H};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=
+function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(H,P){return this.getLinkForCell(H.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var H=null;null!=x&&0<x.length&&(x=JSON.parse(x),H=new mxImage(x.src,x.width,x.height));return H};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,H,P,X,Z,fa,la,za,ua,oa,ta,Ea,Fa,Pa){var Ra=null;if(null!=Pa)for(Ra=new mxDictionary,ta=0;ta<Pa.length;ta++)Ra.put(Pa[ta],
+!0);if(Pa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{H=null!=H?H:1;P=null!=P?P:0;Z=null!=Z?Z:!0;fa=null!=fa?fa:!0;la=null!=la?la:!0;oa=null!=oa?oa:!1;var Ca="page"==Fa?this.view.getBackgroundPageBounds():fa&&null==Ra||X||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));X=H/Ja;Fa=Z?-.5:0;var Qa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ca.width*X)+2*P)+(oa&&0==P?5:0),Math.max(1,Math.ceil(Ca.height*X)+2*P)+(oa&&0==P?5:0),x),$a=Qa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Qa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=
+Z?-.5:0;cb.textOffset=Z?-.5:0;cb.imageOffset=Z?-.5:0;cb.translate(Math.floor(P/H-Ca.x/Ja),Math.floor(P/H-Ca.y/Ja));var db=document.createElement("div"),rb=cb.getAlternateText;cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ja/H;var vb=this.view.translate;Fa=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Ca,Fa)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=
+la;za=null!=za?za:this.createSvgImageExport();var Bb=za.drawCellState,Ya=za.getLinkForCellState;za.getLinkForCellState=function(Za,fb){var hb=Ya.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?null:hb};za.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};za.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Ra?Ra.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(fa&&null==Ra||qb)&&null!=kb;)qb=null!=
+Ra?Ra.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(fa&&null==Ra||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};za.drawState(this.getView().getState(this.model.root),cb);this.updateSvgLinks(Qa,ua,!0);this.addForeignObjectWarning(cb,Qa);return Qa}finally{Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,H){if("0"!=urlParams["svg-warning"]&&0<H.getElementsByTagName("foreignObject").length){var P=
+x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var Z=x.createElement("a");Z.setAttribute("transform","translate(0,-5)");null==Z.setAttributeNS||H.ownerDocument!=document&&null==document.documentMode?(Z.setAttribute("xlink:href",Graph.foreignObjectWarningLink),Z.setAttribute("target","_blank")):(Z.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),Z.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);P.appendChild(X);Z.appendChild(x);P.appendChild(Z);H.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,H,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var Z=x[X].getAttribute("href");null==Z&&(Z=x[X].getAttribute("xlink:href"));
+null!=Z&&(null!=H&&/^https?:\/\//.test(Z)?x[X].setAttribute("target",H):P&&this.isCustomLink(Z)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var H=window.getSelection();H.getRangeAt&&H.rangeCount&&(x=H.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,H,P){for(;null!=x&&x.nodeName!=
+H;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,H,P){for(;null!=x&&!(0<=mxUtils.indexOf(H,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var H=null;if(window.getSelection){if(H=window.getSelection(),H.getRangeAt&&H.rangeCount){var P=document.createRange();P.selectNode(x);H.removeAllRanges();H.addRange(P)}}else(H=document.selection)&&"Control"!=H.type&&(x=H.createRange(),x.collapse(!0),P=H.createRange(),
+P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,H,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var Z=0;Z<X.points.length;Z++)H?X.points[Z].x=P+(P-X.points[Z].x):X.points[Z].y=P+(P-X.points[Z].y);Z=function(fa){null!=fa&&(H?fa.x=P+(P-fa.x):fa.y=P+(P-fa.y))};Z(X.getTerminalPoint(!0));Z(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,H,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),
+Z=0;Z<X;Z++){var fa=this.model.getChildAt(x,Z);if(this.model.isEdge(fa))this.flipEdgePoints(fa,H,P);else{var la=this.getCellGeometry(fa);null!=la&&(la=la.clone(),H?la.x=P+(P-la.x-la.width):la.y=P+(P-la.y-la.height),this.model.setGeometry(fa,la))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,H){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var Z=this.view.getState(x[X]);null!=Z&&this.flipEdgePoints(x[X],
+H,(H?Z.getCenterX():Z.getCenterY())/this.view.scale-(H?Z.origin.x:Z.origin.y)-(H?this.view.translate.x:this.view.translate.y))}else{var fa=this.getCellGeometry(x[X]);null!=fa&&this.flipChildren(x[X],H,H?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);P.push(x[X])}this.toggleCellStyles(H?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,H){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var Z=
+this.model.getParent(x[X]);if(this.isTable(Z)){var fa=this.getCellGeometry(x[X]),la=this.getCellGeometry(Z);null!=fa&&null!=la&&(la=la.clone(),la.height-=fa.height,this.model.setGeometry(Z,la))}}var za=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,H)}finally{this.model.endUpdate()}if(null!=za)for(P=[],X=0;X<za.length;X++)this.model.contains(za[X])&&(this.model.isVertex(za[X])||this.model.isEdge(za[X]))&&P.push(za[X])}return P};Graph.prototype.insertTableColumn=function(x,
+H){var P=this.getModel();P.beginUpdate();try{var X=x,Z=0;if(this.isTableCell(x)){var fa=P.getParent(x);X=P.getParent(fa);Z=mxUtils.indexOf(P.getChildCells(fa,!0),x)}else this.isTableRow(x)?X=P.getParent(x):x=P.getChildCells(X,!0)[0],H||(Z=P.getChildCells(x,!0).length-1);var la=P.getChildCells(X,!0),za=Graph.minTableColumnWidth;for(x=0;x<la.length;x++){var ua=P.getChildCells(la[x],!0)[Z],oa=P.cloneCell(ua,!1),ta=this.getCellGeometry(oa);oa.value=null;oa.style=mxUtils.setStyle(mxUtils.setStyle(oa.style,
+"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);za=ta.width;var Ea=this.getCellGeometry(la[x]);null!=Ea&&(ta.height=Ea.height)}P.add(la[x],oa,Z+(H?0:1))}var Fa=this.getCellGeometry(X);null!=Fa&&(Fa=Fa.clone(),Fa.width+=za,P.setGeometry(X,Fa))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var H=this.getModel();H.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?
+x:H.getParent(x);var X=H.getChildCells(P,!0);0==X.length?H.remove(P):(P==x&&(x=X[X.length-1]),H.remove(x))}finally{H.endUpdate()}};Graph.prototype.insertLane=function(x,H){var P=this.getModel();P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var Z=P.getChildCells(X,!0);x=Z[H?0:Z.length-1]}else X=P.getParent(x);var fa=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,fa+(H?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,H){var P=
+this.getModel();P.beginUpdate();try{var X=x,Z=x;if(this.isTableCell(x))Z=P.getParent(x),X=P.getParent(Z);else if(this.isTableRow(x))X=P.getParent(x);else{var fa=P.getChildCells(X,!0);Z=fa[H?0:fa.length-1]}var la=P.getChildCells(Z,!0),za=X.getIndex(Z);Z=P.cloneCell(Z,!1);Z.value=null;var ua=this.getCellGeometry(Z);if(null!=ua){for(fa=0;fa<la.length;fa++){x=P.cloneCell(la[fa],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var oa=this.getCellGeometry(x);
+null!=oa&&(null!=oa.alternateBounds&&(oa.width=oa.alternateBounds.width,oa.height=oa.alternateBounds.height,oa.alternateBounds=null),oa.height=ua.height);Z.insert(x)}P.add(X,Z,za+(H?0:1));var ta=this.getCellGeometry(X);null!=ta&&(ta=ta.clone(),ta.height+=ua.height,P.setGeometry(X,ta))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var H=this.getModel();H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=H.getParent(x));this.isTableRow(X)&&(P=H.getParent(X));var Z=H.getChildCells(P,
+!0);if(0==Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[0]);var fa=H.getChildCells(X,!0);if(1>=fa.length)H.remove(P);else{var la=fa.length-1;this.isTableCell(x)&&(la=mxUtils.indexOf(fa,x));for(X=x=0;X<Z.length;X++){var za=H.getChildCells(Z[X],!0)[la];H.remove(za);var ua=this.getCellGeometry(za);null!=ua&&(x=Math.max(x,ua.width))}var oa=this.getCellGeometry(P);null!=oa&&(oa=oa.clone(),oa.width-=x,H.setGeometry(P,oa))}}}finally{H.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var H=this.getModel();
+H.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=H.getParent(x));this.isTableRow(x)&&(P=H.getParent(X));var Z=H.getChildCells(P,!0);if(1>=Z.length)H.remove(P);else{this.isTableRow(X)||(X=Z[Z.length-1]);H.remove(X);x=0;var fa=this.getCellGeometry(X);null!=fa&&(x=fa.height);var la=this.getCellGeometry(P);null!=la&&(la=la.clone(),la.height-=x,H.setGeometry(P,la))}}finally{H.endUpdate()}};Graph.prototype.insertRow=function(x,H){for(var P=x.tBodies[0],X=P.rows[0].cells,Z=x=0;Z<X.length;Z++){var fa=
+X[Z].getAttribute("colspan");x+=null!=fa?parseInt(fa):1}H=P.insertRow(H);for(Z=0;Z<x;Z++)mxUtils.br(H.insertCell(-1));return H.cells[0]};Graph.prototype.deleteRow=function(x,H){x.tBodies[0].deleteRow(H)};Graph.prototype.insertColumn=function(x,H){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var Z=document.createElement("th");P.rows[X].appendChild(Z);mxUtils.br(Z)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(H),mxUtils.br(X);return x.rows[0].cells[0<=H?H:x.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(x,H){if(0<=H){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>H&&x[P].deleteCell(H)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var H=window.getSelection();if(H.getRangeAt&&H.rangeCount){H=H.getRangeAt(0);H.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);H.insertNode(x)}}else(H=document.selection)&&"Control"!=
+H.type&&H.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,H){function P(Z,fa){Z.length>fa&&(Z=Z.substring(0,Math.round(fa/2))+"..."+Z.substring(Z.length-Math.round(fa/4)));return Z}x=null!=x?x:"javascript:void(0);";if(null==H||0==H.length)H=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));
+null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(H,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(Z){this.customLinkClicked(x);mxEvent.consume(Z)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,la){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=
+function(fa){fa=x.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var la=this.getCellAt(fa.graphX,fa.graphY);null!=la&&this.isSwimlane(la)&&this.hitsSwimlaneContent(la,fa.graphX,fa.graphY)||(fa.state=this.view.getState(la),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var H=!1,P=!1,X=!1,Z=this.fireMouseEvent;this.fireMouseEvent=
+function(fa,la,za){fa==mxEvent.MOUSE_DOWN&&(la=this.updateMouseEvent(la),H=this.isCellSelected(la.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());Z.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,la){var za=mxEvent.isMouseEvent(la.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==la.getState()||!la.isSource(la.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!za&&(P&&null==la.getCell()&&
+this.isSelectionEmpty()||H&&this.isCellSelected(la.getCell())));za=!H||za?null:mxUtils.bind(this,function(ua){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var oa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(la.getX()+oa.x+1,la.getY()+oa.y+1,ua,la.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,la,za])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==
+x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x="";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var H=this.textarea.ownerDocument.defaultView.getSelection(),P=H.getRangeAt(0),
+X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);H.removeAllRanges();H.addRange(P)};mxCellEditor.prototype.alignText=function(x,H){var P=null!=H&&mxEvent.isShiftDown(H);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(Z){P||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),
+Z.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var H=[],P=0,X=x.rangeCount;P<X;++P)H.push(x.getRangeAt(P));return H}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=
+window.getSelection();sel.removeAllRanges();for(var H=0,P=x.length;H<P;++H)sel.addRange(x[H])}else document.selection&&x.select&&x.select()}catch(X){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));k.apply(this,arguments)};var z=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,H){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?
+z.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var t=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,H){x=this.graph.getStartEditingCell(x,H);t.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function H(Z,fa){fa.originalNode=Z;Z=Z.firstChild;
+for(var la=fa.firstChild;null!=Z&&null!=la;)H(Z,la),Z=Z.nextSibling,la=la.nextSibling;return fa}function P(Z,fa){if(null!=Z)if(fa.originalNode!=Z)X(Z);else for(Z=Z.firstChild,fa=fa.firstChild;null!=Z;){var la=Z.nextSibling;null==fa?X(Z):(P(Z,fa),fa=fa.nextSibling);Z=la}}function X(Z){for(var fa=Z.firstChild;null!=fa;){var la=fa.nextSibling;X(fa);fa=la}1==Z.nodeType&&("BR"===Z.nodeName||null!=Z.firstChild)||3==Z.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(Z)).length?(3==Z.nodeType&&mxUtils.setTextContent(Z,
+mxUtils.getTextContent(Z).replace(/\n|\r/g,"")),1==Z.nodeType&&(Z.removeAttribute("style"),Z.removeAttribute("class"),Z.removeAttribute("width"),Z.removeAttribute("cellpadding"),Z.removeAttribute("cellspacing"),Z.removeAttribute("border"))):Z.parentNode.removeChild(Z)}B.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(Z){var fa=H(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]>")?P(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var H=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){za=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<za.length&&"\n"==za.charAt(za.length-1)&&(za=za.substring(0,za.length-1));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"<br/>"):za,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);H=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),Z=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,la=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&la.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&la.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration=la.join(" ");this.textarea.style.fontWeight=Z?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=H;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=za&&(this.textarea.innerHTML=za,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var za=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(za=mxUtils.replaceTrailingNewlines(za,"<div><br></div>"));za=this.graph.sanitizeHtml(H?za.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):za,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ua=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=za&&(this.textarea.innerHTML=
+za);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,H){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=
+60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,H){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,H);"1"==mxUtils.getValue(x.style,"nl2Br",
+"1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var H=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return H="1"==mxUtils.getValue(x.style,"nl2Br","1")?H.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):H.replace(/\r\n/g,"").replace(/\n/g,"")};var O=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();O.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,H){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==H&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&
+this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,
+null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getBorderColor=function(x){var H=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=H&&H!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(H=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));H==mxConstants.NONE&&(H=null);return H};mxCellEditor.prototype.getMinimumSize=
+function(x){var H=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*H+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,H){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(H.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var H=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-H.x);H=this.roundLength((this.bounds.y+this.currentDy)/P-H.y);P=this.graph.view.unit;this.hint.innerHTML=d(x,P)+", "+d(H,P);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,H){y.apply(this,arguments);var P=this.graph.getCellStyle(x);if(null==P.childLayout){var X=this.graph.model.getParent(x),Z=null!=X?this.graph.getCellGeometry(X):null;if(null!=Z&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var fa=parseFloat(mxUtils.getValue(P,
+"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var la=this.graph.getActualStartSize(X);Z=Z.clone();P?Z.height=H.height+la.y+la.height+2*fa:Z.width=H.width+la.x+la.width+2*fa;this.graph.model.setGeometry(X,Z)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(za){P.get(za)||(P.put(za,!0),Z.push(za))}for(var H=ia.apply(this,arguments),P=new mxDictionary,
+X=this.graph.model,Z=[],fa=0;fa<H.length;fa++){var la=H[fa];this.graph.isTableCell(la)?x(X.getParent(X.getParent(la))):this.graph.isTableRow(la)&&x(X.getParent(la));x(la)}return Z};var da=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var H=da.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var H=
+ja.apply(this,arguments);H.stroke="#C0C0C0";H.strokewidth=1;return H};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,H){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(H.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(x,H){return mxEvent.isControlDown(H.getEvent())||mxEvent.isMetaDown(H.getEvent())};var aa=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return aa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
+this.bounds};var qa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return qa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||sa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,T=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=T.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var H=function(Ra,Ca,Ja){for(var Qa=[],$a=0;$a<Ra.length;$a++){var eb=Ra[$a];Qa.push(null==eb?null:new mxPoint((ua+eb.x+Ca)*fa,(oa+eb.y+Ja)*fa))}return Qa},P=this,X=this.graph,Z=X.model,fa=X.view.scale,la=this.state,za=this.selectionBorder,ua=this.state.origin.x+X.view.translate.x,oa=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var ta=X.view.getCellStates(Z.getChildCells(this.state.cell,!0));if(0<ta.length){var Ea=Z.getChildCells(ta[0].cell,!0),Fa=
+X.getTableLines(this.state.cell,!1,!0),Pa=X.getTableLines(this.state.cell,!0,!1);for(Z=0;Z<ta.length;Z++)mxUtils.bind(this,function(Ra){var Ca=ta[Ra],Ja=Ra<ta.length-1?ta[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja.cell):null;var Qa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Pa[Ra]?new V(Pa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,Ja);Ca.tableHandle=!0;var $a=
+0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Pa[Ra],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(la.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*fa;this.shape.bounds.x=la.x+(Ra==ta.length-1?0:cb.x*fa);this.shape.bounds.width=la.width-(Ra==ta.length-
+1?0:cb.width+cb.x+fa)}this.shape.redraw()}};var eb=!1;Ca.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Qa&&eb&&($a=Math.min($a,Qa.height-Graph.minTableRowHeight))};Ca.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Ca.reset=function(){$a=0};
+x.push(Ca)})(Z);for(Z=0;Z<Ea.length;Z++)mxUtils.bind(this,function(Ra){var Ca=X.view.getState(Ea[Ra]),Ja=X.getCellGeometry(Ea[Ra]),Qa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Ca&&(Ca=new mxCellState(X.view,Ea[Ra],X.getCellStyle(Ea[Ra])),Ca.x=la.x+Ja.x*fa,Ca.y=la.y+Ja.y*fa,Ca.width=Qa.width*fa,Ca.height=Qa.height*fa,Ca.updateCachedBounds());Ja=Ra<Ea.length-1?Ea[Ra+1]:null;Ja=null!=Ja?X.getCellGeometry(Ja):null;var $a=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Fa[Ra]?
+new V(Fa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=za.isDashed;Ja.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,Ja);Ca.tableHandle=!0;var eb=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:za.stroke;if(this.shape.constructor==V)this.shape.line=H(Fa[Ra],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(la.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Qa.width+eb)*fa;this.shape.bounds.y=la.y+(Ra==Ea.length-1?0:db.y*fa);this.shape.bounds.height=la.height-(Ra==Ea.length-1?0:(db.height+db.y)*fa)}this.shape.redraw()}};var cb=!1;Ca.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Qa.width,rb.x-db.x-Qa.width);cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Ca.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,
+eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||la.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Ca.positionChanged=function(){};Ca.reset=function(){eb=0};x.push(Ca)})(Z)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].style.visibility=x?"":"hidden";
+if(null!=this.cornerHandles)for(H=0;H<this.cornerHandles.length;H++)this.cornerHandles[H].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var H=0;H<this.moveHandles.length;H++)this.moveHandles[H].parentNode.removeChild(this.moveHandles[H]);this.moveHandles=null}this.moveHandles=[];for(H=0;H<x.getChildCount(this.state.cell);H++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);
+X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(P.cell)||this.graph.selectCellForEvent(P.cell,Z);mxEvent.isPopupTrigger(Z)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Z),mxEvent.getClientY(Z),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(Z),this.graph.isMouseDown=!0);mxEvent.consume(Z)}),null,mxUtils.bind(this,function(Z){mxEvent.isPopupTrigger(Z)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(Z),mxEvent.getClientY(Z),P.cell,Z),mxEvent.consume(Z))}));this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,H)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=
+0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var W=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),H=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var Z=this.customHandles[X].shape.bounds,fa=Z.getCenterX(),la=Z.getCenterY();if(Math.abs(this.state.x-fa)<Z.width/2||Math.abs(this.state.y-la)<Z.height/2||Math.abs(this.state.x+this.state.width-fa)<Z.width/2||Math.abs(this.state.y+this.state.height-la)<Z.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(H/=
+2,this.graph.isTable(this.state.cell)&&(H+=7),x.x=this.sizers[0].bounds.width+H,x.y=this.sizers[0].bounds.height+H):x=W.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var H=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/
+x),H)+" x "+d(this.roundLength(this.bounds.height/x),H)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,H){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,H){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(x,H){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,Z=this.roundLength(H.x/X-P.x);P=this.roundLength(H.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=d(Z,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Z=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*Z.x)+"%, "+Math.round(100*Z.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),H.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2652,464 +2651,464 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
-!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,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=z-this.width),this.y<this.first.y&&(this.y=O-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",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var H=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(H)||mxEvent.isPopupTrigger(H)&&(null==x.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(x,H){F.apply(this,arguments);mxEvent.isTouchEvent(H.getEvent())&&this.graph.isCellSelected(H.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var H=x.getEvent();return mxEvent.isLeftMouseButton(H)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(H)&&!mxEvent.isShiftDown(H))||this.usePopupTrigger&&mxEvent.isPopupTrigger(H)};mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,H){if(this.cancelled)this.cancelled=!1,H.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,Z=null,fa=x=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,Z=this.first.y,x=(this.currentX-X)/this.graph.view.scale,fa=(this.currentY-Z)/this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(x=this.graph.snap(x),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(P){if(this.isSpaceEvent(H)){this.graph.model.beginUpdate();try{var la=this.graph.getCellsBeyond(X,Z,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<la.length;P++)if(this.graph.isCellMovable(la[P])){var za=this.graph.view.getState(la[P]),ua=this.graph.getCellGeometry(la[P]);null!=za&&null!=ua&&(ua=ua.clone(),ua.translate(x,fa),this.graph.model.setGeometry(la[P],ua))}}finally{this.graph.model.endUpdate()}}else la=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(la,H.getEvent());H.consume()}}};mxRubberband.prototype.mouseMove=function(x,H){if(!H.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=H.getX()+P.x;P=H.getY()+P.y;var X=this.first.x-x,Z=this.first.y-P,fa=this.graph.tolerance;if(null!=this.div||Math.abs(X)>fa||Math.abs(Z)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(H)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(H.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=x-this.width),this.y<this.first.y&&(this.y=P-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)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.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 Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=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(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=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(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
-O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
-J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
-null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
-function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
-function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
-u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
-t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
-K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
-function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.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)};
-la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
-n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};la.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),H.consume()}};var S=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);S.apply(this,arguments)};var ba=(new Date).getTime(),U=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,H,P,X){ca.apply(this,arguments);P!=this.currentTerminalState?(ba=(new Date).getTime(),
+U=0):U=(new Date).getTime()-ba;this.currentTerminalState=P};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(x,H,P){H=null!=x&&0==x;var X=this.state.getVisibleTerminalState(H);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,H):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(H),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
+new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,H,P){this.handleImage=H==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:H==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return na.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var H=this.graph.getModel(),P=H.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(H.isEdge(P)&&null!=X&&X.relative&&(H=this.graph.view.getState(x[0]),null!=H&&2>H.width&&2>H.height&&null!=H.text&&null!=H.text.boundingBox))return mxRectangle.fromRectangle(H.text.boundingBox)}return ra.apply(this,arguments)};var ya=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var x=ya.apply(this,arguments),H=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&H.push(x[P]);return H};var va=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var H=this.graph.getModel(),P=H.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return H.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(H=x.text.unrotatedBoundingBox||
+x.text.boundingBox,new mxRectangle(Math.round(H.x),Math.round(H.y),Math.round(H.width),Math.round(H.height))):va.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,H){var P=this.graph.getModel(),X=P.getParent(this.state.cell),Z=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(H)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==Z||!Z.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),H=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&H==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var pa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,H){pa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,H){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var xa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){xa.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var H=0;4>H;H++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=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(Z,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(Z,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+H=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(H,P);if(null!=H||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,H){try{if(null==x&&(null==H||0==H.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=H&&0<H.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
+P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=H)for(P=0;P<H.length;P++){var Z=document.createElement("div");Z.style.marginTop=null!=x||0<P?"6px":"0px";Z.appendChild(this.graph.createLinkForHint(H[P].getAttribute("href"),mxUtils.getTextContent(H[P])));this.linkHint.appendChild(Z)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ma=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ma.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=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(X,Z){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var H=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=H||null!=P&&0<P.length)this.updateLinkHint(H,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
+5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var H=this.cornerHandles,P=H[0].bounds.height/2;H[0].bounds.x=this.state.x-H[0].bounds.width/2+x;H[0].bounds.y=this.state.y-P+x;H[0].redraw();H[1].bounds.x=H[0].bounds.x+this.state.width-2*x;H[1].bounds.y=H[0].bounds.y;H[1].redraw();H[2].bounds.x=H[0].bounds.x;H[2].bounds.y=this.state.y+this.state.height-2*x;H[2].redraw();H[3].bounds.x=
+H[1].bounds.x;H[3].bounds.y=H[2].bounds.y;H[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+H=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(H,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,H=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=H&&(P=Math.max(P,H.y+H.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var La=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){La.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
+null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ba=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ba.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Xa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Xa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,v){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function N(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function M(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function e(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function k(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function t(){mxActor.call(this)}function B(){mxActor.call(this)}function I(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function y(){mxActor.call(this)}function ia(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,da.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,da.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,da.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,da.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,da.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,da.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function aa(){mxRectangleShape.call(this)}function qa(){mxActor.call(this)}function sa(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function T(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function W(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
+function S(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function na(){mxShape.call(this)}function ra(){mxShape.call(this)}function ya(){mxCylinder.call(this)}function va(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function pa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function xa(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxArrowConnector.call(this);
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function La(){mxActor.call(this)}function Ba(){mxActor.call(this)}function ab(){mxActor.call(this)}function Xa(){mxActor.call(this)}function x(){mxActor.call(this)}function H(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}
+function oa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Ra(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Ja(){mxActor.call(this)}function Qa(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
+function eb(c,m,v,n,u,A,C,ha,K,wa){C+=K;var ma=n.clone();n.x-=u*(2*C+K);n.y-=A*(2*C+K);u*=C+K;A*=C+K;return function(){c.ellipse(ma.x-u-C,ma.y-A-C,2*C,2*C);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var v=this.line[m];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,m,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,v,n){if(null!=m){var u=null;c.begin();for(var A=0;A<m.length;A++){var C=m[A];null!=C&&(null==u?c.moveTo(C.x+v,C.y+n):null!=u&&c.lineTo(C.x+v,C.y+n));u=C}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!m;n++){var u=this.line[n];null!=u&&null!=v&&(m=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,C=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-v));A||this.outline||!(C&&ha<u||!C&&ha<n)||this.paintForeground(c,m,v,n,u)};d.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.state){var A=this.flipH,C=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=C;C=ha}c.rotate(-this.getShapeRotation(),A,C,m+n/2,v+u/2);s=this.scale;m=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,m,v,n,u)}};d.prototype.paintTableForeground=function(c,m,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],m,v)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+d);mxUtils.extend(g,d);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};l.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/cb);c.translate((n-m)/2,(u-m)/2+m/4);c.moveTo(0,
+.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(n,u/(.5+cb));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(u-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
+m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,m,v,n,u,A){m=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),A||(c.stroke(),c.begin()),c.translate(0,
+-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,u-m),c.curveTo(n,u+m/3,0,u+m/3,0,u-m),c.close())};N.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",N);mxUtils.extend(R,mxCylinder);R.prototype.size=30;R.prototype.darkOpacity=0;R.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=C&&(c.setFillAlpha(Math.abs(C)),c.setFillColor(0>C?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",R);mxUtils.extend(G,R);mxCellRenderer.registerShape("note2",G);G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(M,mxShape);M.prototype.isoAngle=15;M.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(m,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",M);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
+15;e.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"lid",!0);c.translate(m,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),C?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+C&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(k,mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.arcSize=.1;
+k.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),C=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));m=Math.max(m,K);m=Math.min(n-K,m);C||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(m,0),c.lineTo(m,v)):(c.moveTo(n-m,v),c.lineTo(n-m,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));C?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",k);k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);var A=mxUtils.getValue(this.style,"rounded",!1),C=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);C||(m*=Math.min(n,u));m=Math.min(m,.5*n,.5*u);A||(m=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,u-m);c.arcTo(m,m,0,0,1,n-m,u);c.lineTo(A+m,u);c.arcTo(m,m,0,0,1,A,u-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",z);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=
+function(c,m,v,n,u){m=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,v,n-2*m);m*=v;return new mxRectangle(c.x+m,c.y,v-2*m,n)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};I.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-m/2);c.quadTo(3*n/4,u-1.4*m,n/2,u-m/2);c.quadTo(n/4,u-m*(1-1.4),0,u-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};k.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};z.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n-m,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",O);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(y,mxActor);y.prototype.size=.5;y.prototype.redrawPath=function(c,m,v,n,u){c.setFillColor(null);
+m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(m,0),new mxPoint(m,u/2),new mxPoint(0,u/2),new mxPoint(m,u/2),new mxPoint(m,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",y);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(c,m,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+m=n/5;c.rect(0,0,m,u);c.fillAndStroke();c.rect(2*m,0,m,u);c.fillAndStroke();c.rect(4*m,0,m,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ia);da.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};da.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)};
+da.prototype.quadTo=function(c,m,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};da.prototype.curveTo=function(c,m,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};da.prototype.arcTo=function(c,m,v,n,u,A,C){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=C};da.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(m-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var C=Math.round(A/10),ha=this.defaultVariation;5>C&&(C=5,ha/=3);var K=v(c-this.lastX)*n/C;v=v(m-this.lastY)*u/C;n/=A;u/=A;for(A=0;A<C;A++){var wa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=m};da.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var mb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){mb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var vb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){vb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new da(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var Bb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Bb.apply(this,arguments)};var Ya=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=da)Ya.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
-l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
-2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
-Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
-40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
-K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
-u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
-K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
-u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
-c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
-32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
-K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
-za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
-l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
-l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
-v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
-n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
-l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Oa,
-mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+A,u*A)),c.moveTo(m+A,v),c.lineTo(m+n-A,v),c.quadTo(m+n,v,m+n,v+A),c.lineTo(m+n,v+u-A),c.quadTo(m+n,v+u,m+n-A,v+u),c.lineTo(m+A,v+u),c.quadTo(m,v+u,m,v+u-A),c.lineTo(m,v+A),c.quadTo(m,v,m+A,v)):(c.moveTo(m,v),c.lineTo(m+n,v),c.lineTo(m+n,v+u),c.lineTo(m,v+u),c.lineTo(m,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ja,mxRectangleShape);ja.prototype.size=.1;ja.prototype.fixedSize=!1;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,v=c.height;c=new mxRectangle(c.x,c.y,m,v);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ja.prototype.paintForeground=function(c,m,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),C=parseFloat(mxUtils.getValue(this.style,"size",this.size));C=A?Math.max(0,Math.min(n,C)):n*Math.max(0,Math.min(1,C));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.max(C,Math.min(n*A,u*A)));C=Math.round(C);c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.moveTo(m+n-C,v);c.lineTo(m+n-C,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ja);mxCellRenderer.registerShape("process2",ja);mxUtils.extend(aa,mxRectangleShape);aa.prototype.paintBackground=function(c,m,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,u);c.fill()};aa.prototype.paintForeground=function(c,m,v,n,u){};mxCellRenderer.registerShape("transparent",aa);mxUtils.extend(qa,mxHexagon);qa.prototype.size=30;qa.prototype.position=.5;qa.prototype.position2=.5;qa.prototype.base=20;qa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,m,v,n,u){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),C=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ha),u-v),new mxPoint(C,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",qa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,
+m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(0,u),new mxPoint(m,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+sa);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(n-m,0),new mxPoint(n,.5*u),new mxPoint(n-m,u),new mxPoint(m,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(m+n/2,v+A);c.lineTo(m+n/2,v+u-A);c.moveTo(m+A,v+u/2);c.lineTo(m+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,v,n,u){Za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),Za.apply(this,[c,m,v,n,u]))}};mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};T.prototype.paintForeground=function(c,m,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var C=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=C){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Wa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Wa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Wa+=bb,jb+=bb);bb=m;var Ga=v;bb=ha==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(n-wa-Wa):bb+Wa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ha=new C;ha.style=this.style;C.prototype.paintVertexShape.call(ha,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=C)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",T);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,m,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(W,mxShape);W.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",W);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,v+u);c.lineTo(m+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(S,mxShape);
+S.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};S.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};S.prototype.paintForeground=function(c,m,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=
+40;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};ba.prototype.paintBackground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),C=mxUtils.getValue(this.style,"participant");null==C||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,m,v,n,A):(C=this.state.view.graph.cellRenderer.getShape(C),null!=C&&C!=ba&&(C=new C,C.apply(this.state),c.save(),C.paintVertexShape(c,m,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+n/2,v+A),c.lineTo(m+n/2,v+u),c.end(),c.stroke())};ba.prototype.paintForeground=function(c,m,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,v,n,
+Math.min(u,A))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(U,mxShape);U.prototype.width=60;U.prototype.height=30;U.prototype.corner=10;U.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};U.prototype.paintBackground=function(c,m,v,n,u){var A=this.corner,C=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(m,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,v,n,u),c.setGradient(this.fill,this.gradient,m,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,v);c.lineTo(m+C,v);c.lineTo(m+C,v+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,C-A),v+ha);c.lineTo(m,v+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+n,v);c.lineTo(m+n,v+u);c.lineTo(m,v+u);c.lineTo(m,v+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(c,m,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,v,n){n=ba.prototype.size;null!=m&&(n=mxUtils.getValue(m.style,"size",n)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;v.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,v,n){n=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(n+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",qa.prototype.size))*m.view.scale))),m.style),m,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?O.prototype.fixedSize:O.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha+u),new mxPoint(C+
+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,v,n){var u="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=u?J.prototype.fixedSize:J.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=c.x,ha=c.y,K=c.width,wa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+
+u,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+
+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<C||v.x>C+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ha,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?sa.prototype.fixedSize:sa.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C,ha+wa),new mxPoint(C+u,c),new mxPoint(C,ha)]):m==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K,ha),new mxPoint(C+K-u,c),new mxPoint(C+K,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]):m==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha+u),new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa),new mxPoint(ma,ha+wa-u),new mxPoint(C,ha+wa),new mxPoint(C,ha+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(C,ha),new mxPoint(ma,ha+
+u),new mxPoint(C+K,ha),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,v,n){var u="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=u?L.prototype.fixedSize:L.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));u&&(A*=m.view.scale);var C=
+c.x,ha=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(ma,ha),new mxPoint(C+K,ha+u),new mxPoint(C+K,ha+wa-u),new mxPoint(ma,ha+wa),new mxPoint(C,ha+wa-u),new mxPoint(C,ha+u),new mxPoint(ma,ha)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(C+u,ha),new mxPoint(C+K-u,ha),new mxPoint(C+K,c),new mxPoint(C+K-u,ha+wa),new mxPoint(C+u,ha+wa),new mxPoint(C,c),new mxPoint(C+u,ha)]);ma=new mxPoint(ma,c);n&&(v.x<C||v.x>C+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ha,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,v);c.begin();c.moveTo(n/2,A+C);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-C,A/2);c.quadTo((n-A)/2-C,A+C,n/2,A+C);c.quadTo((n+A)/2+C,A+C,(n+A)/2+C,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(c,m,v,n,u){c.translate(m,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,m,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=20;ya.prototype.jettyHeight=10;ya.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=C/2;C=v+C/2;var ha=Math.min(m,u-m),K=Math.min(ha+2*m,u-m);A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("module",ya);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=
+32;va.prototype.jettyHeight=12;va.prototype.redrawPath=function(c,m,v,n,u,A){var C=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=C/2;C=v+C/2;var ha=.3*u-m/2,K=.7*u-m/2;A?(c.moveTo(v,ha),c.lineTo(C,ha),c.lineTo(C,ha+m),c.lineTo(v,ha+m),c.moveTo(v,K),c.lineTo(C,K),c.lineTo(C,K+m),c.lineTo(v,K+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+m),c.lineTo(0,K+m),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(v,ha),c.close());c.end()};mxCellRenderer.registerShape("component",va);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,m,v,n,u){var A=n/2,C=u/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,v),new mxPoint(m+n,v+C),new mxPoint(m+A,v+u),new mxPoint(m,v+C)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(pa,mxDoubleEllipse);pa.prototype.outerStroke=!0;pa.prototype.paintVertexShape=function(c,m,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(m+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",pa);mxUtils.extend(Aa,pa);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(xa,mxArrowConnector);
+xa.prototype.defaultWidth=4;xa.prototype.isOpenEnded=function(){return!0};xa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};xa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",xa);mxUtils.extend(Ma,mxArrowConnector);Ma.prototype.defaultWidth=10;Ma.prototype.defaultArrowWidth=20;Ma.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ma.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ma.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ma);mxUtils.extend(Oa,mxActor);Oa.prototype.size=30;Oa.prototype.isRoundable=function(){return!0};Oa.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,m),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Oa);mxUtils.extend(Na,mxRectangleShape);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isHtmlAllowed=function(){return!1};Na.prototype.paintForeground=function(c,m,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*C,u*C))}C=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,v+A);c.lineTo(m+n,v+A);c.end();c.stroke();c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Na);
+mxUtils.extend(La,mxActor);La.prototype.dx=20;La.prototype.dy=20;La.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(m,v),
+new mxPoint(m,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",La);mxUtils.extend(Ba,mxActor);Ba.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ba);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,v,n,u){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+m)/2,v),new mxPoint((n+m)/2,u),new mxPoint((n-m)/2,u),new mxPoint((n-m)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Xa,
+mxActor);Xa.prototype.arrowWidth=.3;Xa.prototype.arrowSize=.2;Xa.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-
+m,u),new mxPoint(n-m,A),new mxPoint(0,A)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Xa);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));v=(u-A)/2;A=v+A;var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(m,0),new mxPoint(m,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,u/2),new mxPoint(n-m,u),new mxPoint(n-m,A),new mxPoint(m,A),new mxPoint(m,u)],this.isRounded,C,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(H,mxActor);H.prototype.size=.1;H.prototype.fixedSize=20;H.prototype.redrawPath=function(c,m,v,n,u){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,u/2,n,u);c.lineTo(m,u);c.quadTo(m-2*m,u/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",H);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
+m,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,
+.8*m),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,m,v,n,u){m=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-m),new mxPoint(n/2,u),new mxPoint(0,u-m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/2,v+u);c.lineTo(m+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(m+n/2,v);c.lineTo(m+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",za);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*n,v+.145*u);c.lineTo(m+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(m+.855*n,v+.145*u);c.lineTo(m+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ua);mxUtils.extend(oa,mxRhombus);oa.prototype.paintVertexShape=function(c,m,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+u/2);c.lineTo(m+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,m,v,n,u){c.begin();c.moveTo(m,v);c.lineTo(m+n,v);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,v+u);c.lineTo(m+n,v+u);c.lineTo(m+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,v,n,u){var A=c.state.strokeWidth/2,C=10+2*A,ha=v+u-C/2;c.begin();c.moveTo(m,v);c.lineTo(m,v+u);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha-C/2);c.moveTo(m+A,ha);c.lineTo(m+A+C,ha+C/2);c.moveTo(m+A,ha);c.lineTo(m+n-A,ha);c.moveTo(m+n,v);c.lineTo(m+n,v+u);c.moveTo(m+n-A,ha);c.lineTo(m+n-C-A,ha-C/2);c.moveTo(m+
+n-A,ha);c.lineTo(m+n-C-A,ha+C/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,m,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,C=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||C||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||C||this.outline||ha||wa||ma||K?(c.rect(m,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,v),this.outline||ha?c.lineTo(m+n,v):c.moveTo(m+n,v),this.outline||wa?c.lineTo(m+n,v+u):c.moveTo(m+n,v+u),this.outline||ma?c.lineTo(m,v+u):c.moveTo(m,v+u),(this.outline||K)&&c.lineTo(m,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Pa,mxEllipse);Pa.prototype.paintVertexShape=function(c,m,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+n/2,v),c.lineTo(m+n/2,v+u)):(c.moveTo(m,v+u/2),c.lineTo(m+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Pa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(c,
+m,v,n,u){m=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Ra);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(u,n);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(u-A)/2;v=m+A;var C=(n-A)/2;A=C+A;c.moveTo(0,m);c.lineTo(C,m);c.lineTo(C,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(n,m);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(C,u);c.lineTo(C,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,m,v,n,u){m=Math.min(n,u/2);v=Math.min(n-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-m,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-m,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(Qa,
+mxActor);Qa.prototype.cst={RECT2:"mxgraph.basic.rect"};Qa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Qa.prototype.paintVertexShape=function(c,m,v,n,u){c.translate(m,
+v);this.strictDrawShape(c,0,0,n,u)};Qa.prototype.strictDrawShape=function(c,m,v,n,u,A){var C=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
-A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
-l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
-wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
-c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
-K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
-l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
-La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
-Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
-l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
-K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
-K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
-v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
-l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
-l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
-u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
-l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
-Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
-B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
-A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
-l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
-A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
-Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
-function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
-c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
-u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
-c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
-c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
-A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
-c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
-wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
-u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
-v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
-n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
-K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+Jb=Math.max(0,Math.min(50,K));A=Qa.prototype;c.setDashed(Wa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ha||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ha||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||Ka||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,m,v,n,u,C,Sa,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),Ka&&A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),Ia&&
+A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),Ha&&A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Wa=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Wa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ha,Wa),c.begin(),Ga?A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
+m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),Ka&&Ga&&A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,m,v,n,u,C,Sa,Ta,Ua,Va,K,Ga,Ka,Ia,Ha),c.stroke()));Ga||Ka||Ia||!Ha?Ga||Ka||!Ia||Ha?!Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==
+wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),
+c.fillAndStroke()):Ga||!Ka||Ia||Ha?!Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,
+K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,
+m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga&&
+Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):!Ga||Ka||Ia||Ha?
+Ga&&!Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,
+m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,
+K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,
+K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,
+v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,
+m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,
+m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,
+u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ga&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,
+m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&Ka&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,
+C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.paintNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.paintSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.paintSW(c,m,v,n,u,C,Va,K,Ia),
+A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),c.close(),A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintSWInner(c,m,v,n,u,C,Va,K,ma,Ia),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),A.paintSEInner(c,m,v,n,u,C,Ua,K,ma),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),A.paintNEInner(c,m,v,n,u,C,Ta,K,ma),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),A.paintNWInner(c,m,v,n,u,C,Sa,K,ma),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,
+m,v,n,u,C,Ta,K,Ka),"double"==wa&&(A.moveNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,m,v,n,u,C,Sa,K,Ha),A.paintTop(c,m,v,n,u,C,Ta,K,Ka),A.lineNEInner(c,m,v,n,u,C,Ta,K,ma,Ka),A.paintTopInner(c,m,v,n,u,C,Sa,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),"double"==wa&&(A.moveSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,m,v,n,u,C,Ta,K,Ga),A.paintRight(c,m,v,n,u,C,Ua,K,Ia),A.lineSEInner(c,m,v,n,u,C,Ua,K,ma,Ia),A.paintRightInner(c,m,v,n,u,C,Ta,K,ma,Ga,Ka),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),"double"==wa&&(A.moveSWInner(c,m,v,n,u,C,Va,K,ma,Ha),A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,m,v,n,u,C,Ua,K,Ka),A.paintBottom(c,m,v,n,u,C,Va,K,Ha),A.lineSWInner(c,m,v,n,u,C,Va,K,ma,Ha),
+A.paintBottomInner(c,m,v,n,u,C,Ua,K,ma,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),"double"==wa&&(A.moveNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,m,v,n,u,C,Sa,K,Ia),A.paintLeft(c,m,v,n,u,C,Sa,K,Ga),A.lineNWInner(c,m,v,n,u,C,Sa,K,ma,Ga,Ha),A.paintLeftInner(c,m,v,n,u,C,Va,K,ma,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,v,n,u,C,Sa,Ta,
+Ua,Va,K,Ga,Ka,Ia,Ha);c.stroke()};Qa.prototype.moveNW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Qa.prototype.moveNE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ha,0)};Qa.prototype.moveSE=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ha)};Qa.prototype.moveSW=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ha,u)};Qa.prototype.paintNW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Qa.prototype.paintTop=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ha,0)};Qa.prototype.paintNE=
+function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n,ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n,ha);else c.lineTo(n,0)};Qa.prototype.paintRight=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ha)};Qa.prototype.paintLeft=function(c,m,v,n,u,A,C,ha,K){"square"==
+C||"default"==C&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};Qa.prototype.paintSE=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,n-ha,u)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-ha,u);else c.lineTo(n,u)};Qa.prototype.paintBottom=function(c,m,v,n,u,A,C,ha,K){"square"==C||"default"==C&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ha,u)};Qa.prototype.paintSW=function(c,m,v,n,u,A,C,ha,K){if(K)if("rounded"==C||"default"==C&&"rounded"==A||"invRound"==C||"default"==C&&"invRound"==A){m=0;if("rounded"==C||"default"==C&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,u-ha)}else("snip"==C||"default"==C&&"snip"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(0,u-ha);else c.lineTo(0,u)};Qa.prototype.paintNWInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
+C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};Qa.prototype.paintTopInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Qa.prototype.paintNEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-ha-.5*K,K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-ha-K,K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-ha-.5*K,K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,ha+K),c.lineTo(n-ha-K,K)};Qa.prototype.paintRightInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):c.lineTo(n-K,ha+K):c.lineTo(n-K,0):c.lineTo(n,0)};Qa.prototype.paintLeftInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):c.lineTo(K,u-ha-K):
+c.lineTo(K,u):c.lineTo(0,u)};Qa.prototype.paintSEInner=function(c,m,v,n,u,A,C,ha,K){if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,n-K,u-ha-.5*K);else if("invRound"==C||"default"==C&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,n-K,u-ha-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(n-K,u-ha-.5*K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(n-ha-K,u-ha-K),c.lineTo(n-K,u-ha-K)};Qa.prototype.paintBottomInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==C||"default"==C&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-ha-.5*K,u-K):c.lineTo(n-ha-K,u-K):c.lineTo(n,u)};Qa.prototype.paintSWInner=function(c,m,v,n,u,A,C,ha,K,wa){if(!wa)c.lineTo(K,u);else if("square"==C||"default"==C&&"square"==A)c.lineTo(K,u-K);else if("rounded"==C||"default"==C&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,u-K);else if("invRound"==C||"default"==C&&"invRound"==
+A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,u-K);else if("snip"==C||"default"==C&&"snip"==A)c.lineTo(ha+.5*K,u-K);else if("fold"==C||"default"==C&&"fold"==A)c.lineTo(K+ha,u-ha-K),c.lineTo(K+ha,u-K)};Qa.prototype.moveSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(K,u-ha-K):
+c.moveTo(0,u-K)};Qa.prototype.lineSWInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,u-ha-K):c.lineTo(0,u-K)};Qa.prototype.moveSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.moveTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,u-ha-K):c.moveTo(n-K,u)};Qa.prototype.lineSEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A?c.lineTo(n-K,u-K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,u-ha-.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,u-ha-K):
+c.lineTo(n-K,u)};Qa.prototype.moveNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.moveTo(n-K,ha+K):c.moveTo(n,K)};Qa.prototype.lineNEInner=function(c,m,v,n,u,A,C,ha,K,wa){wa?"square"==C||"default"==C&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==C||"default"==C&&"rounded"==
+A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(n-K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(n-K,ha+K):c.lineTo(n,K)};Qa.prototype.moveNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==C||"default"==C&&"square"==A?c.moveTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==
+C&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Qa.prototype.lineNWInner=function(c,m,v,n,u,A,C,ha,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==C||"default"==C&&"square"==A?c.lineTo(K,K):"rounded"==C||"default"==C&&"rounded"==A||"snip"==C||"default"==C&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==C||"default"==C&&"invRound"==A||"fold"==C||"default"==C&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Qa.prototype.paintFolds=function(c,m,v,n,u,A,C,ha,K,wa,ma,Wa,jb,bb,Ga){if("fold"==
+A||"fold"==C||"fold"==ha||"fold"==K||"fold"==wa)("fold"==C||"default"==C&&"fold"==A)&&Wa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==A)&&Wa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Qa.prototype.cst.RECT2,Qa);
+Qa.prototype.constraints=null;mxUtils.extend($a,mxConnector);$a.prototype.origPaintEdgeShape=$a.prototype.paintEdgeShape;$a.prototype.paintEdgeShape=function(c,m,v){for(var n=[],u=0;u<m.length;u++)n.push(mxUtils.clone(m[u]));u=c.state.dashed;var A=c.state.fixDash;$a.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),$a.prototype.origPaintEdgeShape.apply(this,
+[c,m,v])))};mxCellRenderer.registerShape("filledEdge",$a);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==m.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.x+ma/2,bb=n.y+Wa/2;n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb-ma/2-Wa/2,bb-Wa/2+ma/2);c.lineTo(jb-ma/2+Wa/2,bb-Wa/2-ma/2);c.lineTo(jb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);c.lineTo(jb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,v,n,u,A,C,ha,K,
+wa){var ma=u*(C+K+1),Wa=A*(C+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.moveTo(n.x-ma/2+Wa/2,n.y-Wa/2-ma/2);c.lineTo(n.x-Wa/2-3*ma/2,n.y-3*Wa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(c,m,v,n,u,A,C,ha,K,wa){var ma=n.clone(),Wa=eb.apply(this,arguments),jb=u*(C+2*K),bb=A*(C+2*K);return function(){Wa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,v,n,u,A,C,ha,K,wa){var ma=u*(C+K+1),Wa=A*(C+K+1),jb=n.clone();n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb.x-Wa,jb.y+ma);c.quadTo(n.x-Wa,n.y+ma,n.x,n.y);c.quadTo(n.x+Wa,n.y-ma,jb.x+Wa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,v,n,u,A,C,ha,K,wa){m=u*K*1.118;v=A*K*1.118;u*=C+K;A*=C+K;var ma=n.clone();ma.x-=m;ma.y-=
+v;n.x+=-u-m;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,v,n,u,A,C,ha,K,wa,ma){A*=ha+wa;C*=ha+wa;var Wa=u.clone();return function(){m.begin();m.moveTo(Wa.x,Wa.y);K?m.lineTo(Wa.x-A-C/c,Wa.y-C+A/c):m.lineTo(Wa.x+C/c-A,Wa.y-C-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=
+function(c,m,v){return hb(c,["width"],m,function(n,u,A,C,ha){ha=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(C.x+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},hb=function(c,m,v,n,u){return gb(c,m,function(A){var C=c.absolutePoints,ha=C.length-1;A=c.view.translate;var K=c.view.scale,wa=v?C[0]:C[ha];C=v?C[1]:C[ha-1];ha=C.x-wa.x;var ma=C.y-wa.y,Wa=Math.sqrt(ha*ha+ma*ma);wa=
+n.call(this,Wa,ha/Wa,ma/Wa,wa,C);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,C,ha){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Wa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Wa.x;var jb=K.y-Wa.y,bb=Math.sqrt(wa*wa+jb*jb);C.x=(C.x+A.x)*ma;C.y=(C.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Wa,K,C,ha)})},qb=function(c,m){return function(v){return[hb(v,["startWidth"],!0,function(n,u,A,C,ha){ha=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+m;return new mxPoint(C.x+
+u*n/4+A*ha/2,C.y+A*n/4-u*ha/2)},function(n,u,A,C,ha,K){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-m})]}},kb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Xa.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Xa.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},ib=function(c){return function(m){return[gb(m,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},ub=function(c,m,v){return function(n){var u=[gb(n,["size"],
+function(A){var C=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+C,A.y+C)},function(A,C){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,C.x-A.x),Math.min(A.height,C.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},ob=function(c,m,v,n,u){v=null!=v?v:.5;return function(A){var C=[gb(A,["size"],function(ha){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,wa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,wa){ha=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(v,(K.x-ha.x)/ha.width));this.state.style.size=ha},!1,n)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&C.push(lb(A));return C}},nb=function(c,m,v){c=null!=c?c:.5;return function(n){var u=[gb(n,["size"],
+function(A){var C=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",C?v:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(C?.75:.75*A.width)),A.y+A.height/4)},function(A,C){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?C.x-A.x:Math.max(0,Math.min(c,(C.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(lb(n));return u}},wb=
+function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m}},lb=function(c,m){return gb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=m?m:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},gb=function(c,m,v,n,
+u,A,C){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(wa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);C&&C(wa)};ha.getPosition=v;ha.setPosition=n;ha.ignoreGrid=null!=u?u:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ha},tb={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,
+C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,C,ha){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)+A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,C,ha,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,C,ha){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(C.x+u*(ha+c.shape.strokewidth*c.view.scale)-A*n/2,C.y+A*(ha+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,C,ha,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(C.x,C.y,ha.x,ha.y,K.x,K.y));u=mxUtils.ptLineDist(C.x,C.y,C.x+A,C.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(lb(c,v/2))}m.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
-u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
-Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
-bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var C=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&u.isSwimlane(A[ha])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ha]))==n&&C.push(A[ha]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],C)}}));return m},label:wb(),ext:wb(),rectangle:wb(),triangle:wb(),rhombus:wb(),umlLifeline:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",ba.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(m){var v=Math.max(U.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",U.prototype.width))),n=Math.max(1.5*U.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",U.prototype.height)));return new mxPoint(m.x+v,m.y+n)},function(m,
+v){this.state.style.width=Math.round(Math.max(U.prototype.corner,Math.min(m.width,v.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*U.prototype.corner,Math.min(m.height,v.y-m.y)))},!1)]},process:function(c){var m=[gb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},cross:function(c){return[gb(c,["size"],function(m){var v=Math.min(m.width,m.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)))*v/2;return new mxPoint(m.getCenterX()-v,m.getCenterY()-v)},function(m,v){var n=Math.min(m.width,m.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-v.y)/n*2,Math.max(0,m.getCenterX()-v.x)/n*2)))})]},note:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},note2:function(c){return[gb(c,["size"],function(m){var v=
+Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},manualInput:function(c){var m=[gb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Oa.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},dataStorage:function(c){return[gb(c,["size"],function(m){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?H.prototype.fixedSize:H.prototype.size));return new mxPoint(m.x+m.width-n*(v?1:m.width),m.getCenterY())},function(m,v){m="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-v.x)):Math.max(0,Math.min(1,(m.x+m.width-v.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[gb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));mxUtils.getValue(this.state.style,"base",qa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",qa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),gb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",qa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),gb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",qa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",qa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",qa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},internalStorage:function(c){var m=[gb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",ya.prototype.jettyWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"jettyHeight",ya.prototype.jettyHeight)));return new mxPoint(m.x+v/2,m.y+
+2*n)},function(m,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,v.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",La.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",La.prototype.dy)));return new mxPoint(m.x+v,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,
+Math.min(m.width,v.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+v)/2,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,v.x-m.x-m.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",k.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=m.width-v);return new mxPoint(m.x+v,m.y+n)},function(m,v){var n=Math.max(0,Math.min(m.width,v.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v*m.height/2)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",M.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(v),.5*m.height))},function(m,v){this.state.style.isoAngle=Math.max(0,50*(v.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});m.push(c);return m},step:ob(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(y.prototype.size,!1),display:ob(Ja.prototype.size,!1),cube:ub(1,
+l.prototype.size,!1),card:ub(.5,t.prototype.size,!0),loopLimit:ub(.5,Z.prototype.size,!0),trapezoid:nb(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:nb(1,O.prototype.size,O.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var C=c.absolutePoints,ha=C[0];C=C[C.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==C&&null!=v&&(C=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=C&&null!=ha){c=function(Ga,Ka,Ia){Ga-=bb.x;var Ha=Ka-bb.y;Ka=(Wa*Ga-ma*Ha)/(K*Wa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Wa);jb?(Ia&&(bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga)):(Ia&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Wa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*Ka,bb.y+wa*Ka));u.push(bb)};var bb=ha;null==n&&(n=new mxPoint(ha.x+(C.x-ha.x)/2,ha.y+(C.y-ha.y)/2));c(n.x,n.y,!0);c(C.x,C.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(m,v/(.5+n));m=(m-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v+.75*n));return c};M.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(m*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};qa.prototype.getConstraints=function(c,m,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
-ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];X.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)];sa.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,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};t.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};e.prototype.getConstraints=function(c,m,v){c=[];m=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};k.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Na.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;
+ua.prototype.constraints=mxEllipse.prototype.constraints;Pa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,m,v){c=[];var n=Math.min(m,v/2),u=Math.min(m-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ya.prototype.getConstraints=function(c,m,v){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ya.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ya.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return n};Z.prototype.constraints=mxRectangleShape.prototype.constraints;fa.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)];W.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)];va.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)];y.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)];I.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)];na.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)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.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)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=
-function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.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)];U.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)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];O.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ab.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};La.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));return c};Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Xa.prototype.getConstraints=
+function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};x.prototype.getConstraints=function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Xa.prototype.arrowWidth)))),u=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Xa.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ca.prototype.getConstraints=
+function(c,m,v){c=[];var n=Math.min(v,m),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,C=(m-u)/2;u=C+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*C,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,C,n));return c};ba.prototype.constraints=null;P.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
-t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
-f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
-x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
-try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(d){d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.addSelectionCells(p.getEdges(d))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var d=p.getSelectionCells(),f=p.getCurrentCellStyle(p.getSelectionCell()),g=1==mxUtils.getValue(f,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,g,d);p.setCellStyles(mxConstants.STYLE_RESIZABLE,g,d);p.setCellStyles(mxConstants.STYLE_ROTATABLE,g,d);p.setCellStyles(mxConstants.STYLE_DELETABLE,g,d);p.setCellStyles(mxConstants.STYLE_EDITABLE,
-g,d);p.setCellStyles("connectable",g,d)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(d){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(d){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var d=mxUtils.sortCells(p.getSelectionCells(),!0);1!=d.length||p.isTable(d[0])||p.isTableRow(d[0])?
-(d=p.getCellsForGroup(d),1<d.length&&p.setSelectionCell(p.groupCells(null,0,d))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var d=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var f=p.ungroupCells();if(null!=d)for(var g=0;g<d.length;g++)p.model.contains(d[g])&&(0==p.model.getChildCount(d[g])&&p.model.isVertex(d[g])&&p.setCellStyles("container","0",[d[g]]),f.push(d[g]))}finally{p.model.endUpdate()}0<
-f.length&&p.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var d=p.getSelectionCells();if(null!=d){for(var f=[],g=0;g<d.length;g++)p.isTableRow(d[g])||p.isTableCell(d[g])||f.push(d[g]);p.removeCellsFromParent(f)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var d=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(d)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f="";if(mxUtils.isNode(d.value)){var g=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&d.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g=d.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==g&&(g=d.value.getAttribute("tooltip"));null!=g&&(f=g)}f=new TextareaDialog(m,mxResources.get("editTooltip")+":",f,function(x){p.setTooltipForCell(d,
-x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var d=p.getLinkForCell(p.getSelectionCell());null!=d&&p.openLink(d)});this.addAction("editLink...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&null!=d&&p.isCellEditable(d)){var f=p.getLinkForCell(d)||"";m.showLinkDialog(f,mxResources.get("apply"),function(g,x,y){g=mxUtils.trim(g);p.setLinkForCell(d,0<g.length?g:null);p.setAttributeForCell(d,"linkTarget",y)},!0,p.getLinkTargetForCell(d))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
-y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
-!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
-p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
-x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
-(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
-m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
-g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
-f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
-p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
-0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
-L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
-L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
-m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
-try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});
-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var d=p.getSelectionCells(),f=p.getCurrentCellStyle(d[0]),
-g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
-p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),M=0;M<G.length;M++)p.cellLabelChanged(G[M],"")}finally{p.getModel().endUpdate()}}}function g(G,M,Q,e,f){f.getModel().beginUpdate();try{var k=f.getCellGeometry(G);null!=k&&Q&&e&&(Q/=e,k=k.clone(),1<Q?k.height=k.width/Q:k.width=k.height*Q,f.getModel().setGeometry(G,
+k));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,M,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var l=this.editorUi,D=l.editor,p=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,
+M=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&M==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(G,M){try{var Q=mxUtils.parseXml(G);D.graph.setSelectionCells(D.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(l);l.showDialog(G.container,620,420,!0,!1);G.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=l.copyXml(),null!=G&&p.removeCells(G,!1)}catch(M){}null==G&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){l.handleError(G)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(M){if(null!=M){p.getModel().beginUpdate();try{l.pasteXml(M,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),G=!0)}catch(M){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(e){if(null!=e){for(var f=!0,k=0;k<
+e.length&&f;k++)f=f&&p.model.isEdge(e[k]);var z=p.view.translate;k=p.view.scale;var t=z.x,B=z.y;z=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(z=I.getTerminalPoint(!0))}z=null!=z?z:p.getBoundingBoxFromGeometry(e,f);null!=z&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/k-t)),k=Math.round(p.snap(p.popupMenuHandler.triggerY/k-B)),p.cellsMoved(e,f-z.x,k-z.y))}}function Q(){p.getModel().beginUpdate();try{M(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{M(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),G=!0)}catch(e){}G||Q()}});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(l.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),M=0;M<G.length;M++)if(p.getModel().isVertex(G[M])){var Q=p.getCellGeometry(G[M]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(G[M],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
+null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(l.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,M){function Q(k,z){var t=e.getValue(k);z=k.cloneValue(z);z.removeAttribute("placeholders");null==t||isNaN(t.nodeType)||z.setAttribute("placeholders",t.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||z.setAttribute("label",p.convertValueToString(k));e.setValue(k,z)}G=null!=M?M:G;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(M=0;M<f.length;M++)Q(f[M],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,M){G=null!=M?M:G;null!=G&&mxEvent.isShiftDown(G)?d():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){d()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){l.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=l.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var G=l.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,M){G=null!=M?M:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),M=p.getCurrentCellStyle(p.getSelectionCell()),Q=1==mxUtils.getValue(M,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,Q,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,Q,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,Q,G);p.setCellStyles(mxConstants.STYLE_DELETABLE,Q,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,
+Q,G);p.setCellStyles("connectable",Q,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?
+(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var M=p.ungroupCells();if(null!=G)for(var Q=0;Q<G.length;Q++)p.model.contains(G[Q])&&(0==p.model.getChildCount(G[Q])&&p.model.isVertex(G[Q])&&p.setCellStyles("container","0",[G[Q]]),M.push(G[Q]))}finally{p.model.endUpdate()}0<
+M.length&&p.setSelectionCells(M)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var M=[],Q=0;Q<G.length;Q++)p.isTableRow(G[Q])||p.isTableCell(G[Q])||M.push(G[Q]);p.removeCellsFromParent(M)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(G)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var M="";if(mxUtils.isNode(G.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=G.value.getAttribute("tooltip"));null!=Q&&(M=Q)}M=new TextareaDialog(l,mxResources.get("editTooltip")+":",M,function(e){p.setTooltipForCell(G,
+e)});l.showDialog(M.container,320,200,!0,!0);M.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var M=p.getLinkForCell(G)||"";l.showLinkDialog(M,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(G,0<Q.length?Q:null);p.setAttributeForCell(G,"linkTarget",f)},!0,p.getLinkTargetForCell(G))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(G,M,Q){G=mxUtils.trim(G);if(0<G.length){var e=null,f=p.getLinkTitle(G);null!=M&&0<M.length&&(e=M[0].iconUrl,
+f=M[0].name||M[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));M=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));M.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([M],!0));M.geometry.x=e.x;M.geometry.y=e.y;p.setAttributeForCell(M,"linkTarget",Q);p.setLinkForCell(M,G);p.cellSizeUpdated(M,
+!0);p.getModel().beginUpdate();try{M=p.addCell(M),p.fireEvent(new mxEventObject("cellsInserted","cells",[M]))}finally{p.getModel().endUpdate()}p.setSelectionCell(M);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),M=p.getParentByName(G,"A",p.cellEditor.textarea),Q="";if(null==M&&null!=G&&null!=G.getElementsByTagName)for(var e=G.getElementsByTagName("a"),
+f=0;f<e.length&&null==M;f++)e[f].textContent==G.textContent&&(M=e[f]);null!=M&&"A"==M.nodeName&&(Q=M.getAttribute("href")||"",p.selectNode(M));var k=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(z){p.cellEditor.restoreSelection(k);null!=z&&p.insertLink(z)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();
+try{for(var M=0;M<G.length;M++){var Q=G[M];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var M=
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<M.length;Q++)if(state=p.getView().getState(M[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==G){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(k.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",G,[M[Q]])}else"0"==
+e&&"1"==G&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",G,[M[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",M))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),M="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&
+(M=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,M)});this.addAction("rotation",function(){var G="0",M=p.getView().getState(p.getSelectionCell());null!=M&&(G=M.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(l,G,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);
+l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var G=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),M=p.view.translate,
+Q=p.view.scale;G.x=G.x/Q-M.x;G.y=G.y/Q-M.y;G.width/=Q;G.height/=Q;null!=p.backgroundImage&&(G=mxRectangle.fromRectangle(G),G.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==G.width||0==G.height?(p.zoomTo(1),l.resetScrollbars()):(M=Editor.fitWindowBorders,null!=M&&(G.x-=M.x,G.y-=M.y,G.width+=M.width+M.x,G.height+=M.height+M.y),p.fitWindow(G))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var G=p.pageFormat,M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/G.width/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=G.y*p.view.scale-1,p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var G=p.pageFormat,
+M=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*G.width)/M,(p.container.clientHeight-10)/G.height/M))/20);mxUtils.hasScrollbars(p.container)&&(G=p.getPagePadding(),p.container.scrollTop=Math.min(G.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(G.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var G=p.getPagePadding();p.container.scrollLeft=Math.min(G.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&
+0<M&&p.zoomTo(M/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&(M=new ChangePageSetup(l,null,null,null,M/100),M.ignoreColor=!0,M.ignoreImage=!0,p.model.execute(M))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,
+300,80,!0,!0);G.init()}));var N=null;N=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();l.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.isGridEnabled()});N.setEnabled(!1);N=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;l.fireEvent(new mxEventObject("guidesEnabledChanged"))});N.setToggleAction(!0);
+N.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});N.setEnabled(!1);N=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());l.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});N=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(l);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});
+N.setToggleAction(!0);N.setSelectedCallback(function(){return p.foldingEnabled});N.isEnabled=E;N=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.scrollbars});N=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));N.setToggleAction(!0);N.setSelectedCallback(function(){return p.pageVisible});N=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionArrowsEnabled});N=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});N=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+l.fireEvent(new mxEventObject("copyConnectChanged"))});N.setToggleAction(!0);N.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});N.isEnabled=E;N=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});N.setToggleAction(!0);N.setSelectedCallback(function(){return l.editor.autosave});N.isEnabled=E;N.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+G+".html")});var R=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){R||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){R=!1}),R=!0)}));N=mxUtils.bind(this,function(G,M,Q,e){return this.addAction(G,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,M,f);(M&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(f,function(z){z.style.fontWeight=null;"B"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(z){z.style.fontStyle=null;"I"==z.nodeName&&p.replaceElement(z)}):(M&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(z){z.style.textDecoration=null;"U"==z.nodeName&&p.replaceElement(z)});for(var k=0;k<f.length;k++)0==p.model.getChildCount(f[k])&&p.autoSizeCell(f[k],
+!1)}finally{p.getModel().endUpdate()}}},null,null,e)});N("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");N("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");N("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
+try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});
+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),M=p.getCurrentCellStyle(G[0]),
+Q="1"==mxUtils.getValue(M,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),M="1";null!=G&&null!=p.getFoldingImage(G)&&(M="0");p.setCellStyles("collapsible",M);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[M],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var M=p.getModel();M=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",M.getStyle(G[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),G)},null,null,400,220);this.editorUi.showDialog(M.container,420,300,!0,!0);M.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var M=D.graph.selectionCellsHandler.getHandler(G);if(M instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;G=p.getModel().getParent(G);for(var k=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=k;)f+=k.x,Q+=k.y,G=
+p.getModel().getParent(G),k=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));M.addPointAt(M.state,f,e)}}});this.addAction("removeWaypoint",function(){var G=l.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearWaypoints",function(G,M){G=null!=M?M:G;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
+0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var k=p.getCellGeometry(f);null!=M&&mxEvent.isShiftDown(G)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=k&&(k=k.clone(),k.points=null,k.x=0,k.y=0,k.offset=null,p.getModel().setGeometry(f,k))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");N=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");N=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",M=p.getView().getState(p.getSelectionCell()),
+Q="",e=null;null!=M&&(Q=M.style[mxConstants.STYLE_IMAGE]||Q,e=M.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(G,Q,function(k,z,t,B,I,O){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(k,z,t);else{var J=p.getSelectionCells();if(null!=k&&(0<k.length||0<J.length)){var y=null;p.getModel().beginUpdate();try{if(0==J.length){J=[p.insertVertex(p.getDefaultParent(),null,"",0,0,z,t,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=ia.x;J[0].geometry.y=ia.y;null!=B&&g(J[0],B,I,O,p);y=J;p.fireEvent(new mxEventObject("cellsInserted","cells",y))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<k.length?k:null,J);var da=p.getCurrentCellStyle(J[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==k.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,J);if(null!=z&&null!=t)for(k=0;k<J.length;k++){var ja=J[k];if("0"!=p.getCurrentCellStyle(ja).expand){var aa=p.getModel().getGeometry(ja);null!=aa&&(aa=aa.clone(),aa.width=z,aa.height=t,p.getModel().setGeometry(ja,aa))}null!=B&&g(ja,B,I,O,p)}}finally{p.getModel().endUpdate()}null!=y&&(p.setSelectionCells(y),p.scrollCellToVisible(y[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=G){var M=p.getCurrentCellStyle(G),Q=M[mxConstants.STYLE_IMAGE],e=M[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(M=new CropImageDialog(l,Q,M[mxConstants.STYLE_CLIP_PATH],function(f,k,z){g(G,f,k,z,p)}),l.showDialog(M.container,300,390,!0,!0))}}).isEnabled=E;N=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+N=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));N=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=
+p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var M=new ConnectionPointsDialog(l,G);l.showDialog(M.container,350,450,!0,!1,function(){M.destroy()});M.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,g,l,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,g,l,D))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,g,l,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=g?g:!0;this.iconCls=l;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
-e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
-"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
-DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
-(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
-DrawioFile.prototype.saveFile=function(b,e,k,m){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(g){this.sync.cleanup(b,d,g)}),d):this.updateFile(b,d)};
+DrawioFile.prototype.updateFile=function(b,d,g,l){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=D?this.mergeFile(D,b,d,l):this.reloadFile(b,
+d))}catch(p){null!=d&&d(p)}}),d))};
+DrawioFile.prototype.mergeFile=function(b,d,g,l){var D=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var N=[this.ui.diffPages(null!=l?l:p,E)],R=this.ignorePatches(N);this.setShadowPages(E);if(R)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};R={};var G=this.ui.patchPages(p,N[0]),M=this.ui.getHashValueForPages(G,
+l),Q=this.ui.getHashValueForPages(E,R);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",N,"backup",this.backupPatch,"checksum",M,"current",Q,"valid",M==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=M&&M!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(G)),k=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(g,N,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+M+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(R)+"\nFrom: "+k+"\nTo: "+z+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",M,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var t=this.sync.patchRealtime(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==t||mxUtils.isEmptyObject(t)||N.push(t)}this.patch(N,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(O){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(O);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,O);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,O)}}catch(J){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),g=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var D=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,D,!0);g.appendChild(D)}return mxUtils.getPrettyXml(g)};
+DrawioFile.prototype.compressReportData=function(b,d,g){d=null!=d?d:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,d,g,l,D,p,E,N){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);var G=mxUtils.bind(this,function(z){var t=this.compressReportData(JSON.stringify(d,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+t+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==l?G(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==l?G(z):G(null)}),function(){})}else{var M=this.getCurrentUser(),Q=null!=M?M.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,k=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(R=0;R<d.length;R++)this.ui.anonymizePatch(d[R]);
+k=JSON.stringify(d);k=null!=k&&250>k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var t=null!=k?"Report":"Error",B=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+t+" in "+D+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=N?
+"-rev_"+this.ui.hashValue(N):"")+(null!=B?"-latest_"+B:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:D,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(z){}};
+DrawioFile.prototype.sendErrorReport=function(b,d,g,l){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),N=null!=E?this.ui.hashValue(E.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),M=G.lastIndexOf(".");E="xml";0<M&&(E=G.substring(M));var Q=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+N+R+"\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!=d?"\n\n"+d:
+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+D+"\n\nData:\n"+p,l)}catch(e){}};
+DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var g=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,D=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var N=this.ui.getCurrentFile();null!=N&&(N.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):
+g()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,g){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),g)};
+DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var g=0;g<b.length&&d;g++)d=d&&mxUtils.isEmptyObject(b[g]);return d};
+DrawioFile.prototype.patch=function(b,d,g){if(null!=b){var l=this.ui.editor.undoManager,D=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var N=this.changeListenerEnabled;this.changeListenerEnabled=g;var R=E.foldingEnabled,G=E.mathEnabled,M=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());M.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=M;this.changeListenerEnabled=N;g||(l.history=D,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)G!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(R!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",g)}return b};
+DrawioFile.prototype.save=function(b,d,g,l,D,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",D,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=g)g({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=g)g(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,g){};
+DrawioFile.prototype.saveFile=function(b,d,g,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,g){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var m=0;null!=k&&m<k.length;m++){var C=k[m];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(g){for(var l=0;null!=g&&l<g.length;l++){var D=g[l];null!=D.id&&0==D.id.indexOf("extFont_")&&D.parentNode.removeChild(D)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(g){b(g)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
-DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};
-DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};
+DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};
+DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>");e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length&&(e[0].style.cursor="pointer",mxEvent.addListener(e[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{e=this.getErrorMessage(b);if(null==e&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(e=mxResources.get("lastSaved",[k]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");this.ui.editor.setStatus('<div title="'+
-e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+'"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(e=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
+"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var g=this.ui.timeSince(new Date(this.lastSaved));null!=g&&(d=mxResources.get("lastSaved",[g]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
+d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
0))}};
-DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==e&&(e=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""));this.ui.spinner.stop();this.clearAutosave();e=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=e&&0<e.length?(e[0].style.cursor="pointer",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(g){"IMG"!=mxEvent.getSource(g).nodeName&&
b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,e)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-e)}};
+DrawioFile.prototype.showRefreshDialog=function(b,d,g){null==g&&(g=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),g),this.ui.showError(mxResources.get("warning")+" ("+g+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,d,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var D=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=
+g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+d)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(F){this.handleFileError(F,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,m,C):this.invalidChecksum?this.showRefreshDialog(k,m,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,m)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){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(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.handleConflictError=function(b,d){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),D=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,l,D):this.invalidChecksum?this.showRefreshDialog(g,l,this.getErrorMessage(b)):d?this.showConflictDialog(D,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(g,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){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(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(g){b(d,g)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,d,g,l,D){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,d,g,l,D)}catch(R){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=l&&l(R);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,R);else{var E=this.getCurrentUser(),N=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),N,R)}}catch(G){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,d,g,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var D=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==D&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=g&&g(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",D,"delay",b,"saving",this.savingFile);this.autosaveThread=D};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=d.lastIndexOf(".");return b===(0<g?d.substring(g):"")}return b==d};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
-function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
-LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
-{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
-graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
-edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
-fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
-edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,g){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,g,l,D,p){DrawioFile.call(this,b,d);this.title=g;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,g){this.saveAs(this.title,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.saveAs=function(b,d,g){this.saveFile(b,!1,d,g)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
+LocalFile.prototype.saveFile=function(b,d,g,l,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),N=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),R=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var M=mxUtils.bind(this,
+function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(G,"image/png"):G).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){try{var z=this.desc;this.savingFile=!1;this.desc=k;this.fileSaved(E,z,N,M);this.removeDraft()}catch(t){M(t)}}),M)}),M)}),M):(this.inConflictState=!0,M())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;M(f)}))}),M)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,p?"image/png":"text/xml",p);else if(G.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(G)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(G)}));N()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){R(G)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):R(E)};
+LocalFile.prototype.rename=function(b,d,g){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
+fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
+{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
+gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
+gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
+{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3129,580 +3128,583 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,E){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-E){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,E){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
+F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&E.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,E){q=E.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,E){E=E.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&E.isTable(q.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
+isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,E){return E.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,E){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,E){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=q&&(E.isSwimlane(q)||0<E.model.getChildCount(q))},
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,E){var Q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;E=E.editorUi.editor.graph;return null!=Q&&(E.isContainer(Q)&&"0"!=q.style.collapsible||!E.isContainer(Q)&&"1"==q.style.collapsible)},isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,E){return 1==q.vertices.length&&0==q.edges.length&&!E.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,E){E=E.editorUi.editor.graph.model;return 0<q.vertices.length?E.isVertex(E.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,E){q=0<q.vertices.length?E.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var S=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=S&&(F.isContainer(S)&&"0"!=q.style.collapsible||!F.isContainer(S)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
-E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
-0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
-"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
-this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
-qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
-qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
-va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
-va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
-qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
-Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
-this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
-mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
-ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
-q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
-null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
-mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
-null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
-!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
-R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
-(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
-q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
-StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
-q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
-Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
-var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
-null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
-!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
-EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
-(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
-(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
-"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
-"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
-!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
-E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
-"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
-E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,E){q=null!=q?q:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style",
-this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
-/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
-function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
-Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
-3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
-63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
-ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
-retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
-R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
-[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
-"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
-function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
-(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
-"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
-"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
-this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
-ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
-function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
-Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
-sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
-E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
-this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
-DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
-destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
-function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
-{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};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:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);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:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
-font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
-{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
-{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
-ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
-ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
-"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
-Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
-ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
-Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
-document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
-ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
-ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
-"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
-document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
-1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
-!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
-parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
-index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="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(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){var ja=
-document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
-null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
-0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
-null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
-mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
-q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
-E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",E)):(null==Q&&(Q='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+E+'");\n}'),q=document.createElement("style"),mxUtils.write(q,Q));return q};Graph.addFont=function(q,E,Q){if(null!=q&&0<q.length&&null!=E&&0<E.length){var Y=q.toLowerCase();if("helvetica"!=Y&&"arial"!=q&&"sans-serif"!=
-Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
-return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
-null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
-Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
-Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
-za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
-Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
-z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
-else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
-"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
-O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
-"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
-(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
-za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
-(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
-q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
-q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
-Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
-arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
-!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
-sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
-sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
-(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
-!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
-[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
-Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
-ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
-0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
-1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
-da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
-"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
-q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
-[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
-STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
-mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
-[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
-Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
-tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
-0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
-ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
-Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
-kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
-ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
-R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
-q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
-cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
-function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
-DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
-da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
-!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
-"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
-Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
-Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
-"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
-function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
-"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
-da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
-function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
-(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.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 X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
-ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var S=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==S||S==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
+F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(S){var ba=S.sets||[];S=S.options||this.getDefaultOptions();for(var U=0;U<ba.length;U++){var ca=ba[U];switch(ca.type){case "path":null!=S.stroke&&this._drawToContext(q,ca,S);break;case "fillPath":this._drawToContext(q,ca,S);break;case "fillSketch":this.fillSketch(q,ca,S)}}};F.fillSketch=function(S,ba,U){var ca=q.state.strokeColor,ea=q.state.strokeWidth,na=q.state.strokeAlpha,ra=q.state.dashed,
+ya=U.fillWeight;0>ya&&(ya=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(ya);q.setDashed(!1);this._drawToContext(S,ba,U);q.setDashed(ra);q.setStrokeWidth(ea);q.setStrokeColor(ca);q.setStrokeAlpha(na)};F._drawToContext=function(S,ba,U){S.begin();for(var ca=0;ca<ba.ops.length;ca++){var ea=ba.ops[ca],na=ea.data;switch(ea.op){case "move":S.moveTo(na[0],na[1]);break;case "bcurveTo":S.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":S.lineTo(na[0],
+na[1])}}S.end();"fillPath"===ba.type&&U.filled?S.fill():S.stroke()};return F};(function(){function q(ca,ea,na){this.canvas=ca;this.rc=ea;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
+this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
+mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ca,ea){var na=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var ya=0;ya<ra.length;ya++)na=(na<<5)-na+ra.charCodeAt(ya)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};ra=this.rc.getDefaultOptions();na.stroke=ca?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(na.filled=ea)?(na.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):na.fill="";na.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);na.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);na.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+ra.curveFitting);na.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);na.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);na.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);na.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);na.hachureGap="auto"==ea?-1:ea;na.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",ea);na.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);na.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);na.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=na.fill&&(null!=ca||null!=ea&&na.fill==ea)?"solid":
+ra.fillStyle);na.fillStyle=ea;return na};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};q.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ca,
+ea,na,ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,na,ra),this.lastX=na,this.lastY=ra)};q.prototype.curveTo=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,na,ra,ya,va),this.lastX=ya,this.lastY=va)};q.prototype.arcTo=function(ca,ea,na,ra,ya,va,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var pa=mxUtils.arcToCurves(this.lastX,this.lastY,
+ca,ea,na,ra,ya,va,Da);if(null!=pa)for(var Aa=0;Aa<pa.length;Aa+=6)this.curveTo(pa[Aa],pa[Aa+1],pa[Aa+2],pa[Aa+3],pa[Aa+4],pa[Aa+5]);this.lastX=va;this.lastY=Da}};q.prototype.rect=function(ca,ea,na,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,na,ra,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ca,ea,na,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
+na/2,ea+ra/2,na,ra,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ca,ea,na,ra,ya,va){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+ya,ea),this.lineTo(ca+na-ya,ea),this.quadTo(ca+na,ea,ca+na,ea+va),this.lineTo(ca+na,ea+ra-va),this.quadTo(ca+na,ea+ra,ca+na-ya,ea+ra),this.lineTo(ca+ya,ea+ra),this.quadTo(ca,ea+ra,ca,ea+ra-va),this.lineTo(ca,ea+va),this.quadTo(ca,ea,ca+ya,ea))};q.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),ca)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
+function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
+this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ca){return new q(ca,Editor.createRoughCanvas(ca),this)};var F=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var S=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,na,ra,ya){null!=ca.handJiggle&&ca.handJiggle.passThrough||S.apply(this,arguments)};var ba=mxShape.prototype.paint;mxShape.prototype.paint=
+function(ca){var ea=ca.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==q&&!this.outline){ca.save();var ra=this.fill,ya=this.stroke;this.stroke=this.fill=null;var va=this.configurePointerEvents,Da=ca.setStrokeColor;ca.setStrokeColor=function(){};var pa=ca.setFillColor;ca.setFillColor=function(){};na||null==ra||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;ba.apply(this,
+arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=pa;ca.setStrokeColor=Da;this.configurePointerEvents=va;this.stroke=ya;this.fill=ra;ca.restore();na&&null!=ra&&(ca.addTolerance=function(){})}ba.apply(this,arguments);ca.addTolerance=ea};var U=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,na,ra,ya,va){null!=ca.handJiggle&&ca.handJiggle.constructor==q?(ca.handJiggle.passThrough=!0,U.apply(this,arguments),ca.handJiggle.passThrough=!1):U.apply(this,arguments)}})();
+Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,S){if(null!=q&&"undefined"!==typeof pako){var ba=q.ownerDocument.getElementsByTagName("div"),U=[];if(null!=ba&&0<ba.length)for(var ca=0;ca<ba.length;ca++)if("mxgraph"==ba[ca].getAttribute("class")){U.push(ba[ca]);
+break}0<U.length&&(ba=U[0].getAttribute("data-mxgraph"),null!=ba?(U=JSON.parse(ba),null!=U&&null!=U.xml&&(q=mxUtils.parseXml(U.xml),q=q.documentElement)):(U=U[0].getElementsByTagName("div"),0<U.length&&(ba=mxUtils.getTextContent(U[0]),ba=Graph.decompress(ba,null,S),0<ba.length&&(q=mxUtils.parseXml(ba),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(ba=q.getAttribute("content"),null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(cont,ba))),null!=
+ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba)),null!=ba&&0<ba.length)q=mxUtils.parseXml(ba).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(U=null,"diagram"==q.nodeName?U=q:"mxfile"==q.nodeName&&(ba=q.getElementsByTagName("diagram"),0<ba.length&&(U=ba[Math.max(0,Math.min(ba.length-1,urlParams.page||0))])),null!=U&&(q=Editor.parseDiagramNode(U,S)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,
+F){var S=mxUtils.trim(mxUtils.getTextContent(q)),ba=null;0<S.length?(q=Graph.decompress(S,null,F),null!=q&&0<q.length&&(ba=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(ba=mxUtils.createXmlDocument(),ba.appendChild(ba.importNode(q[0],!0)),ba=ba.documentElement));return ba};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),S=null;0<F.length?S=Graph.decompress(F):null!=q.firstChild&&(S=mxUtils.getXml(q.firstChild));return S};Editor.extractGraphModelFromPdf=
+function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var S=q.indexOf("stream",F)+9;if(0<q.substring(F,S).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",S-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(S,F)),{to:"string"})}return null}S=null;F="";for(var ba=0,U=0,ca=[],ea=null;U<q.length;){var na=q.charCodeAt(U);U+=1;10!=na&&(F+=String.fromCharCode(na));
+na=="/Subject (%3Cmxfile".charCodeAt(ba)?ba++:ba=0;if(19==ba){var ra=q.indexOf("%3C%2Fmxfile%3E)",U)+15;U-=9;if(ra>U){S=q.substring(U,ra);break}}10==na&&("endobj"==F?ea=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(ea=[],ca[F.split(" ")[0]]=ea):null!=ea&&ea.push(F),F="")}null==S&&(S=Editor.extractGraphModelFromXref(ca));null!=S&&(S=decodeURIComponent(S.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return S};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,S=null;
+null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),S=q.substring(1,q.length-1))))));return S};Editor.extractParserError=function(q,F){var S=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(S=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(S=mxUtils.getTextContent(F[0])));return null!=
+S?mxUtils.trim(S):S};Editor.addRetryToError=function(q,F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||
+ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));
+null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",
+Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var F=document.createElement("style");
+F.setAttribute("type","text/css");F.appendChild(document.createTextNode(q.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(F,S)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=
+q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);
+null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(F=parseFloat(q.zoomFactor),!isNaN(F)&&1<F?Graph.prototype.zoomFactor=F:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(F=parseInt(q.gridSteps),!isNaN(F)&&0<F?mxGraphView.prototype.gridSteps=F:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(F=parseInt(q.pageFormat.width),S=parseInt(q.pageFormat.height),!isNaN(F)&&0<F&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=
+new mxRectangle(0,0,F,S),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);
+q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
+null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var S=document.createElement("style");
+S.setAttribute("type","text/css");S.appendChild(document.createTextNode(q));F.parentNode.insertBefore(S,F);q=q.split("url(");for(S=1;S<q.length;S++){var ba=q[S].indexOf(")");ba=Editor.trimCssUrl(q[S].substring(0,ba));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",ba);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],S=0;S<q;S++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
+F)F!=this.graph.currentStyle&&(S=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=S&&(ba=new mxCodec(S.ownerDocument),ba.decode(S,this.graph.getStylesheet())));else{var S=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=S){var ba=new mxCodec(S.ownerDocument);ba.decode(S,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
+"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),S=0;S<F.length;S++)this.graph.addExtFont(F[S].name,
+F[S].url)}catch(U){console.log("ExtFonts format error: "+U.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var S=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&S.setAttribute("style",
+this.graph.currentStyle);var ba=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=ba&&S.setAttribute("backgroundImage",JSON.stringify(ba));S.setAttribute("math",this.graph.mathEnabled?"1":"0");S.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(ba=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),S.setAttribute("extFonts",ba.join("|")));return S};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
+if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var S=mxUtils.parseXml(F).documentElement;return"mxfile"==S.nodeName||"mxGraphModel"==S.nodeName}}catch(ba){}return!1};Editor.prototype.extractGraphModel=function(q,F,S){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
+"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
+function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([U]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var S=Editor.prototype.init;
+Editor.prototype.init=function(){S.apply(this,arguments);var U=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var ba=document.createElement("script");ba.setAttribute("type","text/javascript");ba.setAttribute("src",q);F[0].parentNode.appendChild(ba)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",S=[""],ba=0,U=!0,ca;q=$jscomp.makeIterator(q);for(ca=q.next();!ca.done;ca=q.next())ca=ca.value,'"'===ca?(U&&ca===F&&(S[ba]+=ca),U=!U):","===ca&&U?ca=S[++ba]="":S[ba]+=ca,F=ca;return S}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
+F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var S="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+S+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,S=this;q.convert=function(ba){if(null!=ba){var U="http://"==ba.substring(0,7)||"https://"==ba.substring(0,8);U&&!navigator.onLine?ba=Editor.svgBrokenImage.src:!U||ba.substring(0,q.baseUrl.length)==q.baseUrl||S.crossOriginImages&&S.isCorsEnabledForUrl(ba)?"chrome-extension://"==
+ba.substring(0,19)||mxClient.IS_CHROMEAPP||(ba=F.apply(this,arguments)):ba=PROXY_URL+"?url="+encodeURIComponent(ba)}return ba};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var S=!0,ba=window.setTimeout(mxUtils.bind(this,function(){S=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ca){window.clearTimeout(ba);
+S&&F(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(ba);if(S)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=U.height;ca.width=U.width;ea.drawImage(U,0,0);F(ca.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(ba);S&&F(Editor.svgBrokenImage.src)};U.src=
+q}}catch(ca){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,S,ba){null==ba&&(ba=this.createImageUrlConverter());var U=0,ca=S||{};S=mxUtils.bind(this,function(ea,na){ea=q.getElementsByTagName(ea);for(var ra=0;ra<ea.length;ra++)mxUtils.bind(this,function(ya){try{if(null!=ya){var va=ba.convert(ya.getAttribute(na));if(null!=va&&"data:"!=va.substring(0,5)){var Da=ca[va];null==Da?(U++,this.convertImageToDataUri(va,function(pa){null!=pa&&(ca[va]=pa,ya.setAttribute(na,pa));U--;
+0==U&&F(q)})):ya.setAttribute(na,Da)}else null!=va&&ya.setAttribute(na,va)}}catch(pa){}})(ea[ra])});S("image","xlink:href");S("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",S=0,ba=q.length,U,ca,ea;S<ba;){U=q.charCodeAt(S++)&255;if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}ca=q.charCodeAt(S++);if(S==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);F+="=";break}ea=q.charCodeAt(S++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(ca&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
+6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return F};Editor.prototype.loadUrl=function(q,F,S,ba,U,ca,ea,na){try{var ra=!ea&&(ba||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var ya=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(va){if(200<=va.getStatus()&&299>=va.getStatus()){if(null!=F){var Da=va.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){va=mxUtilsBinaryToArray(va.request.responseBody).toArray();Da=Array(va.length);for(var pa=0;pa<va.length;pa++)Da[pa]=String.fromCharCode(va[pa]);Da=Da.join("")}ca=null!=ca?ca:"data:image/png;base64,";Da=ca+Editor.base64Encode(Da)}F(Da)}}else null!=S&&(0==va.getStatus()?S({message:mxResources.get("accessDenied")},va):404==va.getStatus()?S({code:va.getStatus()},va):S({message:mxResources.get("error")+" "+va.getStatus()},va))}),function(va){null!=S&&
+S({message:mxResources.get("error")+" "+va.getStatus()})},ra,this.timeout,function(){U&&null!=S&&S({code:App.ERROR_TIMEOUT,retry:ya})},na)});ya()}catch(va){null!=S&&S(va)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var S=q.split("url(");if(0<S.length){F=[S[0]];q=window.location.pathname;var ba=null!=q?q.lastIndexOf("/"):-1;0<=ba&&(q=q.substring(0,ba+1));ba=document.getElementsByTagName("base");var U=null;null!=ba&&0<ba.length&&(U=ba[0].getAttribute("href"));for(var ca=1;ca<
+S.length;ca++)if(ba=S[ca].indexOf(")"),0<ba){var ea=Editor.trimCssUrl(S[ca].substring(0,ba));this.graph.isRelativeUrl(ea)&&(ea=null!=U?U+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);F.push('url("'+ea+'"'+S[ca].substring(ba))}else F.push(S[ca])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,S){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));S(q,F)};Editor.prototype.embedCssFonts=
+function(q,F){var S=q.split("url("),ba=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==ba){for(var ra=[S[0]],ya=1;ya<S.length;ya++){var va=S[ya].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(S[ya].substring(0,va))]);ra.push('"'+S[ya].substring(va))}F(ra.join(""))}});if(0<S.length){for(q=1;q<S.length;q++){var ca=S[q].indexOf(")"),ea=null,na=S[q].indexOf("format(",ca);0<na&&(ea=Editor.trimCssUrl(S[q].substring(na+7,S[q].indexOf(")",
+na))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=ra;ba++;var ya="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ra))ya="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ra))ya="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ra))ya="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ra))ya="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ra))ya="application/vnd.ms-fontobject";
+else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(ra))ya="application/font-sfnt";this.mapFontUrl(ya,ra,mxUtils.bind(this,function(va,Da){this.loadUrl(Da,mxUtils.bind(this,function(pa){this.cachedFonts[ra]=pa;ba--;U()}),mxUtils.bind(this,function(pa){ba--;U()}),!0,null,"data:"+va+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(S[q].substring(0,ca)),ea)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
+F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var S=[],ba=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==ba&&this.embedCssFonts(S.join(""),q)}),ca=0;ca<F.length;ca++)mxUtils.bind(this,function(ea,
+na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(ba++,this.loadUrl(na,mxUtils.bind(this,function(ra){this.cachedGoogleFonts[na]=ra;S.push(ra+"\n");ba--;U()}),mxUtils.bind(this,function(ra){ba--;S.push("@import url("+na+");\n");U()}))):S.push(this.cachedGoogleFonts[na]+"\n"):S.push('@font-face {font-family: "'+ea+'";src: url("'+na+'")}\n')})(F[ca].name,F[ca].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
+S=0;S<F.length;S++){var ba=mxUtils.getTextContent(F[S]);0>ba.indexOf("mxPageSelector")&&0<ba.indexOf("MathJax")&&q[0].appendChild(F[S].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var S=q.getElementsByTagName("defs"),ba=q.ownerDocument;0==S.length?(S=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"defs"):ba.createElement("defs"),null!=q.firstChild?q.insertBefore(S,q.firstChild):q.appendChild(S)):S=S[0];q=null!=
+ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);S.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,S){var ba=mxClient.IS_FF?8192:16384;return Math.min(S,Math.min(ba/q,ba/F))};Editor.prototype.exportToCanvas=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa,xa,Ma,Oa,Na){try{ca=null!=
+ca?ca:!0;ea=null!=ea?ea:!0;Da=null!=Da?Da:this.graph;pa=null!=pa?pa:0;var La=ra?null:Da.background;La==mxConstants.NONE&&(La=null);null==La&&(La=ba);null==La&&0==ra&&(La=Ma?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,pa,Aa,null,ea,null,null,null,ya,null,Ma,Oa,Na),mxUtils.bind(this,function(Ba){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){Z.drawImage(ab,0,0);q(H,Ba)},0):(Z.drawImage(ab,
+0,0),q(H,Ba))},H=document.createElement("canvas"),P=parseInt(Ba.getAttribute("width")),X=parseInt(Ba.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=ca?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);H.setAttribute("width",P);H.setAttribute("height",X);var Z=H.getContext("2d");null!=La&&(Z.beginPath(),Z.rect(0,0,P,X),Z.fillStyle=La,Z.fill());1!=na&&Z.scale(na,na);if(xa){var fa=Da.view,la=fa.scale;fa.scale=1;var za=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor))));
+fa.scale=la;za="data:image/svg+xml;base64,"+za;var ua=Da.gridSize*fa.gridSteps*na,oa=Da.getGraphBounds(),ta=fa.translate.x*la,Ea=fa.translate.y*la,Fa=ta+(oa.x-ta)/la-pa,Pa=Ea+(oa.y-Ea)/la-pa,Ra=new Image;Ra.onload=function(){try{for(var Ca=-Math.round(ua-mxUtils.mod((ta-Fa)*na,ua)),Ja=-Math.round(ua-mxUtils.mod((Ea-Pa)*na,ua));Ca<P;Ca+=ua)for(var Qa=Ja;Qa<X;Qa+=ua)Z.drawImage(Ra,Ca/na,Qa/na);x()}catch($a){null!=U&&U($a)}};Ra.onerror=function(Ca){null!=U&&U(Ca)};Ra.src=za}else x()}catch(Ca){null!=
+U&&U(Ca)}});ab.onerror=function(x){null!=U&&U(x)};ya&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ba,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(Ba,x),this.loadFonts(Xa)}catch(H){null!=U&&U(H)}}))}catch(x){null!=U&&U(x)}}),S,va)}catch(Ba){null!=U&&U(Ba)}};
+Editor.crcTable=[];for(var D=0;256>D;D++)for(var p=D,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[D]=p;Editor.updateCRC=function(q,F,S,ba){for(var U=0;U<ba;U++)q=Editor.crcTable[(q^F.charCodeAt(S+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,S=0;S<q.length;S++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(S))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,S,ba,U){function ca(va,Da){var pa=ra;ra+=Da;return va.substring(pa,ra)}function ea(va){va=ca(va,4);
+return va.charCodeAt(3)+(va.charCodeAt(2)<<8)+(va.charCodeAt(1)<<16)+(va.charCodeAt(0)<<24)}function na(va){return String.fromCharCode(va>>24&255,va>>16&255,va>>8&255,va&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ra=0;if(ca(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(ca(q,4),"IHDR"!=ca(q,4))null!=U&&U();else{ca(q,17);U=q.substring(0,ra);do{var ya=ea(q);if("IDAT"==ca(q,4)){U=q.substring(0,ra-8);"pHYs"==F&&"dpi"==
+S?(S=Math.round(ba/.0254),S=na(S)+na(S)+String.fromCharCode(1)):S=S+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+ba;ba=4294967295;ba=Editor.updateCRC(ba,F,0,4);ba=Editor.updateCRC(ba,S,0,S.length);U+=na(S.length)+F+S+na(ba^4294967295);U+=q.substring(ra-8,q.length);break}U+=q.substring(ra-8,ra-4+ya);ca(q,ya);ca(q,4)}while(ya);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";
+var N=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){N.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var R=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){R.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var S=null;null!=q.editor.graph.getModel().getParent(F)?S=F.getId():null!=q.currentPage&&
+(S=q.currentPage.getId());return S});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var M=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?M.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,S=F.editor.graph,ba=this.createOption(mxResources.get("shadow"),function(){return S.shadowVisible},function(U){var ca=new ChangePageSetup(F);ca.ignoreColor=!0;
+ca.ignoreImage=!0;ca.shadowVisible=U;S.model.execute(ca)},{install:function(U){this.listener=function(){U(S.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(ba.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(ba,60));q.appendChild(ba)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
+var F=this.editorUi,S=F.editor.graph;if(S.isEnabled()){var ba=F.getCurrentFile();if(null!=ba&&ba.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(ea){F.editor.setAutosave(ea);F.editor.autosave&&ba.isModified()&&ba.fileChanged()},{install:function(ea){this.listener=function(){ea(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
+S.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return S.mathEnabled},function(ea){F.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(S.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var ca=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position=
+"relative";ca.style.marginLeft="6px";ca.style.top="2px";U.appendChild(ca)}return q};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:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
+type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+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:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
+font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
+stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,S){if(null!=F){var ba=function(ca){if(null!=ca)if(S)for(var ea=0;ea<ca.length;ea++)F[ca[ea].name]=ca[ea];else for(var na in F){var ra=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==na&&ca[ea].type==F[na].type){ra=!0;break}ra||
+delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),ba(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{ba(JSON.parse(q))}catch(ca){}}};var f=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},S=q.vertices,ba=q.edges,U=0;U<S.length;U++)this.findCommonProperties(S[U],F,0==U);for(U=0;U<ba.length;U++)this.findCommonProperties(ba[U],F,0==S.length&&0==U);null!=Object.getOwnPropertyNames&&
+0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,S){function ba(Z,fa,la,za){Da.getModel().beginUpdate();try{var ua=[],oa=[];if(null!=la.index){for(var ta=[],Ea=la.parentRow.nextSibling;Ea&&
+Ea.getAttribute("data-pName")==Z;)ta.push(Ea.getAttribute("data-pValue")),Ea=Ea.nextSibling;la.index<ta.length?null!=za?ta.splice(za,1):ta[la.index]=fa:ta.push(fa);null!=la.size&&ta.length>la.size&&(ta=ta.slice(0,la.size));fa=ta.join(",");null!=la.countProperty&&(Da.setCellStyles(la.countProperty,ta.length,Da.getSelectionCells()),ua.push(la.countProperty),oa.push(ta.length))}Da.setCellStyles(Z,fa,Da.getSelectionCells());ua.push(Z);oa.push(fa);if(null!=la.dependentProps)for(Z=0;Z<la.dependentProps.length;Z++){var Fa=
+la.dependentPropsDefVal[Z],Pa=la.dependentPropsVals[Z];if(Pa.length>fa)Pa=Pa.slice(0,fa);else for(var Ra=Pa.length;Ra<fa;Ra++)Pa.push(Fa);Pa=Pa.join(",");Da.setCellStyles(la.dependentProps[Z],Pa,Da.getSelectionCells());ua.push(la.dependentProps[Z]);oa.push(Pa)}if("function"==typeof la.onChange)la.onChange(Da,fa);va.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ua,"values",oa,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function U(Z,fa,la){var za=mxUtils.getOffset(q,
+!0),ua=mxUtils.getOffset(Z,!0);fa.style.position="absolute";fa.style.left=ua.x-za.x+"px";fa.style.top=ua.y-za.y+"px";fa.style.width=Z.offsetWidth+"px";fa.style.height=Z.offsetHeight-(la?4:0)+"px";fa.style.zIndex=5}function ca(Z,fa,la){var za=document.createElement("div");za.style.width="32px";za.style.height="4px";za.style.margin="2px";za.style.border="1px solid black";za.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(va,function(ua){this.editorUi.pickColor(fa,
+function(oa){za.style.background="none"==oa?"url('"+Dialog.prototype.noColorImage+"')":oa;ba(Z,oa,la)});mxEvent.consume(ua)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(za);return btn}function ea(Z,fa,la,za,ua,oa,ta){null!=fa&&(fa=fa.split(","),pa.push({name:Z,values:fa,type:la,defVal:za,countProperty:ua,parentRow:oa,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(va,function(Ea){for(var Fa=oa,Pa=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==
+Z)Fa=Fa.nextSibling,Pa++;else break;var Ra={type:la,parentRow:oa,index:Pa,isDeletable:!0,defVal:za,countProperty:ua};Pa=ya(Z,"",Ra,0==Pa%2,ta);ba(Z,za,Ra);Fa.parentNode.insertBefore(Pa,Fa.nextSibling);mxEvent.consume(Ea)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(Z,fa,la,za,ua,oa,ta){if(0<ua){var Ea=Array(ua);fa=null!=fa?fa.split(","):[];for(var Fa=0;Fa<ua;Fa++)Ea[Fa]=null!=fa[Fa]?fa[Fa]:null!=za?za:"";pa.push({name:Z,values:Ea,type:la,defVal:za,
+parentRow:oa,flipBkg:ta,size:ua})}return document.createElement("div")}function ra(Z,fa,la){var za=document.createElement("input");za.type="checkbox";za.checked="1"==fa;mxEvent.addListener(za,"change",function(){ba(Z,za.checked?"1":"0",la)});return za}function ya(Z,fa,la,za,ua){var oa=la.dispName,ta=la.type,Ea=document.createElement("tr");Ea.className="gePropRow"+(ua?"Dark":"")+(za?"Alt":"")+" gePropNonHeaderRow";Ea.setAttribute("data-pName",Z);Ea.setAttribute("data-pValue",fa);za=!1;null!=la.index&&
+(Ea.setAttribute("data-index",la.index),oa=(null!=oa?oa:"")+"["+la.index+"]",za=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";oa=mxResources.get(oa,null,oa);mxUtils.write(Fa,oa);Fa.setAttribute("title",oa);za&&(Fa.style.textAlign="right");Ea.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ta)Fa.appendChild(ca(Z,fa,la));else if("bool"==ta||"boolean"==ta)Fa.appendChild(ra(Z,fa,la));else if("enum"==ta){var Pa=la.enumList;for(ua=0;ua<Pa.length;ua++)if(oa=
+Pa[ua],oa.val==fa){mxUtils.write(Fa,mxResources.get(oa.dispName,null,oa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(va,function(){var Ra=document.createElement("select");U(Fa,Ra);for(var Ca=0;Ca<Pa.length;Ca++){var Ja=Pa[Ca],Qa=document.createElement("option");Qa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(Qa,mxResources.get(Ja.dispName,null,Ja.dispName));Ra.appendChild(Qa)}Ra.value=fa;q.appendChild(Ra);mxEvent.addListener(Ra,"change",function(){var $a=mxUtils.htmlEntities(Ra.value);
+ba(Z,$a,la)});Ra.focus();mxEvent.addListener(Ra,"blur",function(){q.removeChild(Ra)})}))}else"dynamicArr"==ta?Fa.appendChild(ea(Z,fa,la.subType,la.subDefVal,la.countProperty,Ea,ua)):"staticArr"==ta?Fa.appendChild(na(Z,fa,la.subType,la.subDefVal,la.size,Ea,ua)):"readOnly"==ta?(ua=document.createElement("input"),ua.setAttribute("readonly",""),ua.value=fa,ua.style.width="96px",ua.style.borderWidth="0px",Fa.appendChild(ua)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(Fa,
+"click",mxUtils.bind(va,function(){function Ra(){var Ja=Ca.value;Ja=0==Ja.length&&"string"!=ta?0:Ja;la.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",ta="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=la.min&&Ja<la.min?Ja=la.min:null!=la.max&&Ja>la.max&&(Ja=la.max);Ja=encodeURIComponent(("int"==ta?parseInt(Ja):Ja)+"");ba(Z,Ja,la)}var Ca=document.createElement("input");U(Fa,Ca,!0);Ca.value=decodeURIComponent(fa);Ca.className="gePropEditor";"int"!=ta&&"float"!=ta||la.allowAuto||
+(Ca.type="number",Ca.step="int"==ta?"1":"any",null!=la.min&&(Ca.min=parseFloat(la.min)),null!=la.max&&(Ca.max=parseFloat(la.max)));q.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ja){13==Ja.keyCode&&Ra()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Ra()})})));la.isDeletable&&(ua=mxUtils.button("-",mxUtils.bind(va,function(Ra){ba(Z,"",la,la.index);mxEvent.consume(Ra)})),ua.style.height="16px",ua.style.width="25px",ua.style.float="right",ua.className="geColorBtn",Fa.appendChild(ua));
+Ea.appendChild(Fa);return Ea}var va=this,Da=this.editorUi.editor.graph,pa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var xa=document.createElement("tr");xa.className="gePropHeader";var Ma=document.createElement("th");Ma.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";Ma.appendChild(Oa);
+mxUtils.write(Ma,mxResources.get("property"));xa.style.cursor="pointer";var Na=function(){var Z=Aa.querySelectorAll(".gePropNonHeaderRow");if(va.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var fa="none";for(var la=q.childNodes.length-1;0<=la;la--)try{var za=q.childNodes[la],ua=za.nodeName.toUpperCase();"INPUT"!=ua&&"SELECT"!=ua||q.removeChild(za)}catch(oa){}}else Oa.src=Sidebar.prototype.expandedImage,fa="";for(la=0;la<Z.length;la++)Z[la].style.display=fa};mxEvent.addListener(xa,
+"click",function(){va.editorUi.propertiesCollapsed=!va.editorUi.propertiesCollapsed;Na()});xa.appendChild(Ma);Ma=document.createElement("th");Ma.className="gePropHeaderCell";Ma.innerHTML=mxResources.get("value");xa.appendChild(Ma);Aa.appendChild(xa);var La=!1,Ba=!1;xa=null;1==S.vertices.length&&0==S.edges.length?xa=S.vertices[0].id:0==S.vertices.length&&1==S.edges.length&&(xa=S.edges[0].id);null!=xa&&Aa.appendChild(ya("id",mxUtils.htmlEntities(xa),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(xa=
+F[ab],"function"!=typeof xa.isVisible||xa.isVisible(S,this)){var Xa=null!=S.style[ab]?mxUtils.htmlEntities(S.style[ab]+""):null!=xa.getDefaultValue?xa.getDefaultValue(S,this):xa.defVal;if("separator"==xa.type)Ba=!Ba;else{if("staticArr"==xa.type)xa.size=parseInt(S.style[xa.sizeProperty]||F[xa.sizeProperty].defVal)||0;else if(null!=xa.dependentProps){var x=xa.dependentProps,H=[],P=[];for(Ma=0;Ma<x.length;Ma++){var X=S.style[x[Ma]];P.push(F[x[Ma]].subDefVal);H.push(null!=X?X.split(","):[])}xa.dependentPropsDefVal=
+P;xa.dependentPropsVals=H}Aa.appendChild(ya(ab,Xa,xa,La,Ba));La=!La}}for(Ma=0;Ma<pa.length;Ma++)for(xa=pa[Ma],F=xa.parentRow,S=0;S<xa.values.length;S++)ab=ya(xa.name,xa.values[S],{type:xa.type,parentRow:xa.parentRow,isDeletable:xa.isDeletable,index:S,defVal:xa.defVal,countProperty:xa.countProperty,size:xa.size},0==S%2,xa.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(xa){mxEvent.addListener(xa,
+"mouseenter",function(){xa.style.opacity="1"});mxEvent.addListener(xa,"mouseleave",function(){xa.style.opacity="0.5"})}var S=this.editorUi,ba=S.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var ca="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(" "),
+ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var na=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var ya=document.createElement("div");ya.style.display="inline-block";ya.style.width="6px";ya.style.height="6px";ya.style.marginLeft="4px";ya.style.marginRight="3px";ya.style.borderRadius="3px";ya.style.cursor="pointer";ya.style.background="transparent";ya.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(xa){mxEvent.addListener(ya,"click",mxUtils.bind(this,function(){va(xa)}))})(ra);na.push(ya);ea.appendChild(ya)}var va=mxUtils.bind(this,function(xa){null!=na[xa]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=xa,Da(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(xa){var Ma=mxUtils.bind(this,
+function(Na){var La=mxUtils.button("",mxUtils.bind(this,function(Xa){ba.getModel().beginUpdate();try{for(var x=S.getSelectionState().cells,H=0;H<x.length;H++){for(var P=ba.getModel().getStyle(x[H]),X=0;X<ca.length;X++)P=mxUtils.removeStylename(P,ca[X]);var Z=ba.getModel().isVertex(x[H])?ba.defaultVertexStyle:ba.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Xa)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(Z,
+mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Xa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Xa)||!ba.getModel().isVertex(x[H])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Xa)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
+Na.stroke||mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Z,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_GRADIENTCOLOR,null)),ba.getModel().isVertex(x[H])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Z,mxConstants.STYLE_FONTCOLOR,
+null))));ba.getModel().setStyle(x[H],P)}}finally{ba.getModel().endUpdate()}}));La.className="geStyleButton";La.style.width="36px";La.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";La.style.margin="0px 6px 6px 0px";if(null!=Na){var Ba="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(Ba=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?La.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+Na.gradient+
+"', GradientType=0)":La.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?La.style.background="url('"+Dialog.prototype.noColorImage+"')":La.style.backgroundColor=""==Na.fill?mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");La.style.border=Na.stroke==mxConstants.NONE?
+Ba+" transparent":""==Na.stroke?Ba+" "+mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ba+" "+(Na.stroke||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&La.setAttribute("title",Na.title)}else{Ba=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+"#000000");La.style.backgroundColor=Ba;La.style.border="1px solid "+ab}La.style.borderRadius="0";U.appendChild(La)});U.innerText="";for(var Oa=0;Oa<xa.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),Ma(xa[Oa])});null==this.format.currentScheme?va(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):va(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var pa=document.createElement("div");pa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(pa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(pa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){va(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(pa);F(Aa);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),S=this.editorUi.editor.graph,ba=null;1==F.cells.length&&(ba=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),ba.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),ba.style.width="210px",ba.style.marginBottom="2px",q.appendChild(ba));S=1==F.cells.length?S.view.getState(F.cells[0]):null;null!=S&&null!=S.shape&&null!=S.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
+mxResources.get("editShape")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(U){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft=
+"2px"),q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
+F){var S=Graph.fontMapping[F];null==S&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==S&&(S='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,S));return q};Graph.addFont=function(q,F,S){if(null!=q&&0<q.length&&null!=F&&0<F.length){var ba=q.toLowerCase();if("helvetica"!=ba&&"arial"!=q&&"sans-serif"!=
+ba){var U=Graph.customFontElements[ba];null!=U&&U.url!=F&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=F,"http:"==F.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(F)),U={name:q,url:F,elt:Graph.createFontElement(q,U)},Graph.customFontElements[ba]=U,Graph.recentCustomFonts[ba]=U,F=document.getElementsByTagName("head")[0],null!=S&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=S,U.elt.onerror=S):S()),null!=F&&F.appendChild(U.elt)):null!=S&&S()}else null!=S&&S()}else null!=S&&
+S();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var S=q[F].getAttribute("data-font-src");if(null!=S){var ba="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=ba&&Graph.addFont(ba,S)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var S=mxUtils.getValue(q,
+mxConstants.STYLE_FONTFAMILY,null);null!=S&&Graph.addFont(S,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";
+Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
+F};var S=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):S.apply(this,arguments)};var ba=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var ca=this.graph.getCellStyle(U);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||
+0;ea.marginTop=ca.marginTop||0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return ba.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(t.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,S,ba,U,ca,ea,na,ra,ya,va){B.apply(this,arguments);Graph.processFontAttributes(va)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,S){function ba(){for(var xa=ea.getSelectionCells(),Ma=[],Oa=0;Oa<xa.length;Oa++)ea.isCellVisible(xa[Oa])&&Ma.push(xa[Oa]);ea.setSelectionCells(Ma)}function U(xa){ea.setHiddenTags(xa?[]:na.slice());
+ba();ea.refresh()}function ca(xa,Ma){ya.innerText="";if(0<xa.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=xa&&0<xa.length)for(var La=0;La<xa.length;La++)(function(Ba){var ab=0>mxUtils.indexOf(ea.hiddenTags,Ba),Xa=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var H=document.createElement("img");
+H.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);H.setAttribute("title",mxResources.get(ab?"hideIt":"show",[Ba]));mxUtils.setOpacity(H,ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";x.appendChild(H);mxEvent.addListener(H,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(ea.hiddenTags,Ba)):(ea.toggleHiddenTag(Ba),ba(),ea.refresh());mxEvent.consume(X)});Xa.appendChild(x);x=document.createElement("td");
+x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",Ba);a=document.createElement("a");mxUtils.write(a,Ba);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var Z=ea.getCellsForTags([Ba],null,null,!0);ea.isEnabled()?ea.setSelectionCells(Z):ea.highlightCells(Z)}else if(ab&&
+0<ea.hiddenTags.length)U(!0);else{Z=na.slice();var fa=mxUtils.indexOf(Z,Ba);Z.splice(fa,1);ea.setHiddenTags(Z);ba();ea.refresh()}mxEvent.consume(X)});Xa.appendChild(x);if(ea.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==Ma){x.style.align="center";x.style.width="16px";H=document.createElement("img");H.setAttribute("src",Editor.crossImage);H.setAttribute("title",mxResources.get("removeIt",[Ba]));mxUtils.setOpacity(H,
+ab?75:25);H.style.verticalAlign="middle";H.style.cursor="pointer";H.style.width="16px";if(F||Editor.isDarkMode())H.style.filter="invert(100%)";mxEvent.addListener(H,"click",function(X){var Z=mxUtils.indexOf(na,Ba);0<=Z&&na.splice(Z,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ba]);ea.refresh();mxEvent.consume(X)});x.appendChild(H)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=Ma&&0<=mxUtils.indexOf(Ma,
+Ba);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[Ba]));mxEvent.addListener(P,"change",function(X){P.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ba]):ea.removeTagsForCells(ea.getSelectionCells(),[Ba]);mxEvent.consume(X)});x.appendChild(P)}Xa.appendChild(x)}Na.appendChild(Xa)})(xa[La]);Oa.appendChild(Na);ya.appendChild(Oa)}}var ea=this,na=ea.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect=
+"none";ra.style.overflow="hidden";ra.style.padding="10px";ra.style.height="100%";var ya=document.createElement("div");ya.style.boxSizing="border-box";ya.style.borderRadius="4px";ya.style.userSelect="none";ya.style.overflow="auto";ya.style.position="absolute";ya.style.left="10px";ya.style.right="10px";ya.style.top="10px";ya.style.border=ea.isEnabled()?"1px solid #808080":"none";ya.style.bottom=ea.isEnabled()?"48px":"10px";ra.appendChild(ya);var va=mxUtils.button(mxResources.get("reset"),function(xa){ea.setHiddenTags([]);
+mxEvent.isShiftDown(xa)||(na=ea.hiddenTags.slice());ba();ea.refresh()});va.setAttribute("title",mxResources.get("reset"));va.className="geBtn";va.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=S&&S(na,function(xa){na=xa;pa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";ea.addListener(mxEvent.ROOT,function(){na=ea.hiddenTags.slice()});var pa=mxUtils.bind(this,function(xa,Ma){if(q()){xa=ea.getAllTags();for(Ma=0;Ma<
+xa.length;Ma++)0>mxUtils.indexOf(na,xa[Ma])&&na.push(xa[Ma]);na.sort();ea.isSelectionEmpty()?ca(na):ca(na,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,pa);ea.model.addListener(mxEvent.CHANGE,pa);ea.addListener(mxEvent.REFRESH,pa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
+Aa.style.left="10px";ea.isEnabled()&&(Aa.appendChild(va),Aa.appendChild(Da),ra.appendChild(Aa));return{div:ra,refresh:pa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var S=Graph.customFontElements[F];q.push({name:S.name,url:S.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var S=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q,
+F);for(var ba=0;ba<S.length;ba++)S[ba].getAttribute("face")==q&&S[ba].getAttribute("data-font-src")!=F&&S[ba].setAttribute("data-font-src",F)}};var O=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return O.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(S){null!=window.console&&console.log("Error in vars URL parameter: "+S)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=J.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var y=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,S,ba,U,ca,ea,na,ra,ya,va,Da,pa,Aa){var xa=null,Ma=null,Oa=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(xa=this.stylesheet,Ma=this.shapeForegroundColor,Oa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=y.apply(this,arguments),La=this.getCustomFonts();if(va&&0<La.length){var Ba=Na.ownerDocument,ab=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"style"):Ba.createElement("style");null!=Ba.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Xa="",x="",H=0;H<La.length;H++){var P=
+La[H].name,X=La[H].url;Graph.isCssFontUrl(X)?Xa+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(Ba.createTextNode(Xa+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=xa&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=Ma,this.stylesheet=xa,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){da.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
+arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var S=q.view.scale,ba=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*S,q.y+4*S,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==ba&&F.scale==S||(F.bounds=q,F.value=ba,F.scale=
+S,F.redraw())}};var aa=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){aa.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var qa=Graph.prototype.refresh;Graph.prototype.refresh=function(){qa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var sa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){sa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var S=!1,ba=0,U=0,ca=mxUtils.bind(this,function(){S||(S=!0,this.model.beginUpdate())}),ea=
+mxUtils.bind(this,function(){S&&(S=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<ba&&ba--;0==ba&&ra()}),ra=mxUtils.bind(this,function(){if(U<q.length){var ya=this.stoppingCustomActions,va=q[U++],Da=[];if(null!=va.open)if(ea(),this.isCustomLink(va.open)){if(!this.customLinkClicked(va.open))return}else this.openLink(va.open);null==va.wait||ya||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;na()}),ba++,this.pendingWaitThread=
+window.setTimeout(this.pendingExecuteNextAction,""!=va.wait?parseInt(va.wait):1E3),ea());null!=va.opacity&&null!=va.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(va.opacity,!0)),va.opacity.value);null!=va.fadeIn&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeIn,!0)),0,1,na,ya?0:va.fadeIn.delay));null!=va.fadeOut&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(va.fadeOut,!0)),1,0,na,ya?0:va.fadeOut.delay));null!=
+va.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeIn,!0),!0)));null!=va.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(va.wipeOut,!0),!1)));null!=va.toggle&&(ca(),this.toggleCells(this.getCellsForAction(va.toggle,!0)));if(null!=va.show){ca();var pa=this.getCellsForAction(va.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(pa),1);this.setCellsVisible(pa,!0)}null!=va.hide&&(ca(),pa=this.getCellsForAction(va.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(pa),
+0),this.setCellsVisible(pa,!1));null!=va.toggleStyle&&null!=va.toggleStyle.key&&(ca(),this.toggleCellStyles(va.toggleStyle.key,null!=va.toggleStyle.defaultValue?va.toggleStyle.defaultValue:"0",this.getCellsForAction(va.toggleStyle,!0)));null!=va.style&&null!=va.style.key&&(ca(),this.setCellStyles(va.style.key,va.style.value,this.getCellsForAction(va.style,!0)));pa=[];null!=va.select&&this.isEnabled()&&(pa=this.getCellsForAction(va.select),this.setSelectionCells(pa));null!=va.highlight&&(pa=this.getCellsForAction(va.highlight),
+this.highlightCells(pa,va.highlight.color,va.highlight.duration,va.highlight.opacity));null!=va.scroll&&(pa=this.getCellsForAction(va.scroll));null!=va.viewbox&&this.fitWindow(va.viewbox,va.viewbox.border);0<pa.length&&this.scrollCellToVisible(pa[0]);if(null!=va.tags){pa=[];null!=va.tags.hidden&&(pa=pa.concat(va.tags.hidden));if(null!=va.tags.visible)for(var Aa=this.getAllTags(),xa=0;xa<Aa.length;xa++)0>mxUtils.indexOf(va.tags.visible,Aa[xa])&&0>mxUtils.indexOf(pa,Aa[xa])&&pa.push(Aa[xa]);this.setHiddenTags(pa);
+this.refresh()}0<Da.length&&(ba++,this.executeAnimations(Da,na,ya?1:va.steps,ya?0:va.delay));0==ba?ra():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=F&&F()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var S=this.getLinkForCell(F);null!=S&&"data:action/json,"==S.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,S));if(this.isHtmlLabel(F)){var ba=document.createElement("div");ba.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var U=
+ba.getElementsByTagName("a"),ca=!1,ea=0;ea<U.length;ea++)S=U[ea].getAttribute("href"),null!=S&&"data:action/json,"==S.substring(0,17)&&(U[ea].setAttribute("href",this.updateCustomLink(q,S)),ca=!0);ca&&this.labelChanged(F,ba.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var S=JSON.parse(F.substring(17));null!=S.actions&&(this.updateCustomLinkActions(q,S.actions),F="data:action/json,"+JSON.stringify(S))}catch(ba){}return F};Graph.prototype.updateCustomLinkActions=
+function(q,F){for(var S=0;S<F.length;S++){var ba=F[S],U;for(U in ba)this.updateCustomLinkAction(q,ba[U],"cells"),this.updateCustomLinkAction(q,ba[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,S){if(null!=F&&null!=F[S]){for(var ba=[],U=0;U<F[S].length;U++)if("*"==F[S][U])ba.push(F[S][U]);else{var ca=q[F[S][U]];null!=ca?""!=ca&&ba.push(ca):ba.push(F[S][U])}F[S]=ba}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,
+null,F));if(null!=q.excludeCells){for(var S=[],ba=0;ba<F.length;ba++)0>q.excludeCells.indexOf(F[ba].id)&&S.push(F[ba]);F=S}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var S=0;S<q.length;S++)if("*"==q[S]){var ba=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(ca){return ca!=ba},ba))}else{var U=this.model.getCell(q[S]);null!=U&&F.push(U)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;
+for(var F=0;F<q.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,S,ba){var U=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},na=0;na<q.length;na++)0<q[na].length&&(ea[q[na]]=!0,ca++);for(na=0;na<F.length;na++)if(S&&this.model.getParent(F[na])==this.model.root||this.model.isVertex(F[na])||this.model.isEdge(F[na])){var ra=this.getTagsForCell(F[na]),ya=!1;if(0<ra.length&&(ra=ra.split(" "),
+ra.length>=q.length)){for(var va=ya=0;va<ra.length&&ya<ca;va++)null!=ea[ra[va]]&&ya++;ya=ya==ca}ya&&(1!=ba||this.isCellVisible(F[na]))&&U.push(F[na])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,S=[],ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);S=[];if(0<U.length){U=U.split(" ");for(var ca={},ea=0;ea<U.length;ea++)if(null==F||null!=F[U[ea]])ca[U[ea]]=
+!0,S.push(U[ea]);F=ca}else return[]}return S};Graph.prototype.getTagsForCells=function(q){for(var F=[],S={},ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);if(0<U.length){U=U.split(" ");for(var ca=0;ca<U.length;ca++)null==S[U[ca]]&&(S[U[ca]]=!0,F.push(U[ca]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){for(var ba=
+this.getTagsForCell(q[S]),U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.trim(F[ea]);""!=na&&0>mxUtils.indexOf(U,na)&&(ba=0<ba.length?ba+" "+na:na,ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",ba)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var S=0;S<q.length;S++){var ba=this.getTagsForCell(q[S]);if(0<ba.length){for(var U=ba.split(" "),ca=!1,ea=0;ea<F.length;ea++){var na=mxUtils.indexOf(U,
+F[ea]);0<=na&&(U.splice(na,1),ca=!0)}ca&&this.setAttributeForCell(q[S],"tags",U.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var S=0;S<q.length;S++)this.model.setVisible(q[S],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(q,F,S,ba){for(var U=0;U<q.length;U++)this.highlightCell(q[U],F,S,ba)};Graph.prototype.highlightCell=function(q,F,S,ba,U){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;S=null!=S?S:1E3;q=this.view.getState(q);var ca=null;null!=q&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+U),ca=new mxCellHighlight(this,F,U,!1),null!=ba&&(ca.opacity=ba),ca.highlight(q),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition",
+"all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},1200)},S));return ca};Graph.prototype.addSvgShadow=function(q,F,S,ba){S=null!=S?S:!1;ba=null!=ba?ba:!0;var U=q.ownerDocument,ca=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"filter"):U.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):U.createElement("feGaussianBlur");ea.setAttribute("in",
+"SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feOffset"):U.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feFlood"):U.createElement("feFlood");ea.setAttribute("flood-color",
+this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result","offsetColor");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feComposite"):U.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feBlend"):U.createElement("feBlend");
+ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);ea=q.getElementsByTagName("defs");0==ea.length?(U=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"defs"):U.createElement("defs"),null!=q.firstChild?q.insertBefore(U,q.firstChild):q.appendChild(U)):U=ea[0];U.appendChild(ca);S||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&ba&&(q.setAttribute("width",
+parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),
+F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var S=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(S),"locked","0"));null!=S&&this.setDefaultParent(S)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=
+[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+
+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.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/abstract"]=[SHAPES_PATH+"/mxElectrical.js",
+STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.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",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
+[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
+STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,
+5)&&(F="mxgraph.sysml"));return F};var V=mxMarker.createMarker;mxMarker.createMarker=function(q,F,S,ba,U,ca,ea,na,ra,ya){if(null!=S&&null==mxMarker.markers[S]){var va=this.getPackageForType(S);null!=va&&mxStencilRegistry.getStencil(va)}return V.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,S,ba,U,ca){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,
+arguments)};PrintDialog.prototype.create=function(q,F){function S(){pa.value=Math.max(1,Math.min(na,Math.max(parseInt(pa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(na,Math.min(parseInt(pa.value),parseInt(Da.value))))}function ba(oa){function ta(Ya,Za,fb){var hb=Ya.useCssTransforms,qb=Ya.currentTranslate,kb=Ya.currentScale,ib=Ya.view.translate,ub=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,
+0),Ya.view.scale=1);var ob=Ya.getGraphBounds(),nb=0,wb=0,lb=za.get(),gb=1/Ya.pageScale,tb=Na.checked;if(tb){gb=parseInt(fa.value);var Cb=parseInt(la.value);gb=Math.min(lb.height*Cb/(ob.height/Ya.view.scale),lb.width*gb/(ob.width/Ya.view.scale))}else gb=parseInt(Oa.value)/(100*Ya.pageScale),isNaN(gb)&&(Ea=1/Ya.pageScale,Oa.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Ea);lb.height=Math.ceil(lb.height*Ea);gb*=Ea;!tb&&Ya.pageVisible?(ob=Ya.getPageLayout(),nb-=ob.x*lb.width,
+wb-=ob.y*lb.height):tb=!0;if(null==Za){Za=PrintDialog.createPrintPreview(Ya,gb,lb,0,nb,wb,tb);Za.pageSelector=!1;Za.mathEnabled=!1;Aa.checked&&(Za.isCellVisible=function(pb){return Ya.isCellSelected(pb)});nb=q.getCurrentFile();null!=nb&&(Za.title=nb.getTitle());var xb=Za.writeHead;Za.writeHead=function(pb){xb.apply(this,arguments);mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),pb.writeln("}"),pb.writeln("</style>"));
+null!=q.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(q.editor.fontCss),pb.writeln("</style>"));for(var yb=Ya.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,m=yb[Ab].url;Graph.isCssFontUrl(m)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),pb.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var zb=Za.renderPage;Za.renderPage=function(pb,yb,Ab,c,m,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}nb=null;wb=U.shapeForegroundColor;tb=U.shapeBackgroundColor;lb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(nb=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",
+U.shapeBackgroundColor="#ffffff",U.refresh());Za.open(null,null,fb,!0);U.enableFlowAnimation=lb;null!=nb&&(U.shapeForegroundColor=wb,U.shapeBackgroundColor=tb,U.stylesheet=nb,U.refresh())}else{lb=Ya.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";Za.backgroundColor=lb;Za.autoOrigin=tb;Za.appendGraph(Ya,gb,nb,wb,fb,!0);fb=Ya.getCustomFonts();if(null!=Za.wnd)for(nb=0;nb<fb.length;nb++)wb=fb[nb].name,tb=fb[nb].url,Graph.isCssFontUrl(tb)?Za.wnd.document.writeln('<link rel="stylesheet" href="'+
+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(Za.wnd.document.writeln('<style type="text/css">'),Za.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(wb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),Za.wnd.document.writeln("</style>"))}hb&&(Ya.useCssTransforms=hb,Ya.currentTranslate=qb,Ya.currentScale=kb,Ya.view.translate=ib,Ya.view.scale=ub);return Za}var Ea=parseInt(ua.value)/100;isNaN(Ea)&&(Ea=1,ua.value="100 %");Ea*=.75;var Fa=null,Pa=U.shapeForegroundColor,
+Ra=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(Fa=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Ca=Da.value,Ja=pa.value,Qa=!ya.checked,$a=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ya.checked,Ca,Ja,Na.checked,fa.value,la.value,parseInt(Oa.value)/100,parseInt(ua.value)/100,za.get());else{Qa&&(Qa=Aa.checked||Ca==ra&&Ja==ra);if(!Qa&&null!=q.pages&&q.pages.length){var eb=
+0;Qa=q.pages.length-1;ya.checked||(eb=parseInt(Ca)-1,Qa=parseInt(Ja)-1);for(var cb=eb;cb<=Qa;cb++){var db=q.pages[cb];Ca=db==q.currentPage?U:null;if(null==Ca){Ca=q.createTemporaryGraph(U.stylesheet);Ca.shapeForegroundColor=U.shapeForegroundColor;Ca.shapeBackgroundColor=U.shapeBackgroundColor;Ja=!0;eb=!1;var rb=null,mb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ja=db.viewState.pageVisible,eb=db.viewState.mathEnabled,rb=db.viewState.background,mb=db.viewState.backgroundImage,
+Ca.extFonts=db.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=q.createImageForPageLink(mb.originalSrc,db));Ca.background=rb;Ca.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;Ca.pageVisible=Ja;Ca.mathEnabled=eb;var vb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var Ya=vb.apply(this,arguments),Za=this.backgroundImage;if(null!=Za&&null!=Za.width&&null!=Za.height){var fb=this.view.translate,hb=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((fb.x+
+Za.x)*hb,(fb.y+Za.y)*hb,Za.width*hb,Za.height*hb))}return Ya};var Bb=Ca.getGlobalVariable;Ca.getGlobalVariable=function(Ya){return"page"==Ya?db.getName():"pagenumber"==Ya?cb+1:"pagecount"==Ya?null!=q.pages?q.pages.length:1:Bb.apply(this,arguments)};document.body.appendChild(Ca.container);q.updatePageRoot(db);Ca.model.setRoot(db.root)}$a=ta(Ca,$a,cb!=Qa);Ca!=U&&Ca.container.parentNode.removeChild(Ca.container)}}else $a=ta(U);null==$a?q.handleError({message:mxResources.get("errorUpdatingPreview")}):
+($a.mathEnabled&&(Qa=$a.wnd.document,oa&&($a.wnd.IMMEDIATE_PRINT=!0),Qa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),$a.closeDocument(),!$a.mathEnabled&&oa&&PrintDialog.printPreview($a));null!=Fa&&(U.shapeForegroundColor=Pa,U.shapeBackgroundColor=Ra,U.stylesheet=Fa,U.refresh())}}var U=q.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,
+F||mxResources.get("print"));ca.appendChild(ea);var na=1,ra=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ya=document.createElement("input");ya.style.cssText="margin-right:8px;margin-bottom:8px;";ya.setAttribute("value","all");ya.setAttribute("type","radio");ya.setAttribute("name","pages-printdialog");ea.appendChild(ya);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));ea.appendChild(F);
+mxUtils.br(ea);var va=ya.cloneNode(!0);ya.setAttribute("checked","checked");va.setAttribute("value","range");ea.appendChild(va);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");ea.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type","number");Da.setAttribute("min","1");Da.style.width="50px";ea.appendChild(Da);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));
+ea.appendChild(F);var pa=Da.cloneNode(!0);ea.appendChild(pa);mxEvent.addListener(Da,"focus",function(){va.checked=!0});mxEvent.addListener(pa,"focus",function(){va.checked=!0});mxEvent.addListener(Da,"change",S);mxEvent.addListener(pa,"change",S);if(null!=q.pages&&(na=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){ra=F+1;Da.value=ra;pa.value=ra;break}Da.setAttribute("max",na);pa.setAttribute("max",na);q.isPagesEnabled()?1<na&&(ca.appendChild(ea),va.checked=
+!0):va.checked=!0;mxUtils.br(ea);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var xa=document.createElement("div");xa.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",xa.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",ea.appendChild(Aa));F=document.createElement("span");
+mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var Ma=document.createElement("input");Ma.style.marginRight="8px";Ma.setAttribute("value","adjust");Ma.setAttribute("type","radio");Ma.setAttribute("name","printZoom");xa.appendChild(Ma);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));xa.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
+Oa.style.width="50px";xa.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){Ma.checked=!0});ca.appendChild(xa);ea=ea.cloneNode(!1);var Na=Ma.cloneNode(!0);Na.setAttribute("value","fit");Ma.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);ea.appendChild(F);xa=document.createElement("table");xa.style.display="inline-block";var La=document.createElement("tbody"),Ba=document.createElement("tr"),
+ab=Ba.cloneNode(!0),Xa=document.createElement("td"),x=Xa.cloneNode(!0),H=Xa.cloneNode(!0),P=Xa.cloneNode(!0),X=Xa.cloneNode(!0),Z=Xa.cloneNode(!0);Xa.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Xa,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min","1");fa.setAttribute("type","number");fa.style.width="40px";x.appendChild(fa);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+H.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var la=fa.cloneNode(!0);X.appendChild(la);mxEvent.addListener(fa,"focus",function(){Na.checked=!0});mxEvent.addListener(la,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));Z.appendChild(F);Ba.appendChild(Xa);Ba.appendChild(x);Ba.appendChild(H);ab.appendChild(P);ab.appendChild(X);ab.appendChild(Z);La.appendChild(Ba);La.appendChild(ab);xa.appendChild(La);ea.appendChild(xa);
+ca.appendChild(ea);ea=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));ea.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var za=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));ea.appendChild(F);var ua=
+document.createElement("input");ua.style.cssText="margin:0 8px 0 8px;";ua.setAttribute("value","100 %");ua.style.width="60px";ea.appendChild(ua);ca.appendChild(ea);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&F.appendChild(ea);q.isOffline()||(xa=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+xa.className="geBtn",F.appendChild(xa));PrintDialog.previewEnabled&&(xa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();ba(!1)}),xa.className="geBtn",F.appendChild(xa));xa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();ba(!0)});xa.className="geBtn gePrimaryBtn";F.appendChild(xa);q.editor.cancelFirst||F.appendChild(ea);ca.appendChild(F);this.container=ca};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
+function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
+this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var W=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{W.getContext("2d").drawImage(ka,
+0,0);var q=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
-function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
-d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,f,k,z,t,B,I){B=null!=B?B:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var O=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";t=null!=t?t:Error(e);(new Image).src=O+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=z?":colno:"+
+encodeURIComponent(z):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(J){}try{I||null==window.console||console.error(B,e,f,k,z,t)}catch(J){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
+function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
+e)}}catch(k){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
-d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
-H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
-3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
-G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
-t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
-la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
-fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
-Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
-f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
-I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
-D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&
-null!=t.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
-Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
-"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
-d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
-"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
-D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
-"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
-d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
-this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
-D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
-this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
-(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
-D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
-"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
-T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
-if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
-D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
-oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
-y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
-"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
-d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
-d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
-H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
-f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
-mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
-return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
-(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border",
-"0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
-this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
-18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
-w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
-M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
-null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
-6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
-da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
-0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
-"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
-0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
-d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
-41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
-Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
-f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{G?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
-0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
-ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
-I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
-G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
-D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
-G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
-document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
-2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
-"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
-var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
-420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
-mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
-g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
-var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
-t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
-":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
-"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
-f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,
-mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
-"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
-mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
-"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
-function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
-function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
-300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,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%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
-fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
-!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
-document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";
-t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
-x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
-var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
-"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
-"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
-"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
-"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
-G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
-mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
-"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
-T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
-Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
-null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
-"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
-280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(y?"&edit=_blank":
-"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
-function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
-arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
-f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
-y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
-ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
-this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
-H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
-null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
-M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
-var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
-if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
-function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
-null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
-" "),mxUtils.bind(this,function(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
-null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
-oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
-EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
-"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
-this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
-H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
-d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
-this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
-function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
-function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
-va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
-3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
-var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
-ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(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(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
-function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
-function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(t,
-!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):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
-G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
-function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
-return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
-na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
-config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
-"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
-ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
-1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
-this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
-V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
-H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
-null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
-var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
-fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
-this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
-mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
-na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
-function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
-N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.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,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
-null!=fa&&(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)})),fa.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
-null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
-ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
-this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
-ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
-function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
-null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&
-!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
-5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
-"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var G=mxEvent.getSource(t);
-null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
-this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
-"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
-function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
-"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
-H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
-"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
-this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
-this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
-(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
-function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
-(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
-this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
-"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
-y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
-H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
-[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
-G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
-"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
-"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
-null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
-d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
-"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
-mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(t){}try{var f=document.createElement("canvas"),k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var t=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(B){}};k.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(t){}try{f=document.createElement("canvas");f.width=f.height=1;var z=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==z.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(e,f,k){return this.editor.graph.openLink(e,f,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,k){localStorage.setItem(e,f);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(e,f,k){var z=null==e||null==f;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=t.spin;t.spin=function(O,J){var y=!1;this.active||(B.call(this,O),this.active=!0,null!=J&&(z&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),y=document.createElement("div"),
+y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,e)+"px",y.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=J.substring(J.length-3,J.length)&&"!"!=J.charAt(J.length-1)&&(J+="..."),y.innerHTML=J,O.appendChild(y),t.status=y),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(O,J)}));this.stop();return ia}),y=!0);return y};var I=t.stop;t.stop=function(){I.call(this);this.active=!1;null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status);t.status=null};t.pause=function(){return function(){}};
+return t};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(z){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,z=this.editor.graph,t=this;f.getFunction=function(B){if(z.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var I=t.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&t.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&t.movePage(I,0)};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.movePage(I,t.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&t.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&t.selectPage(t.pages[0])};if(39==B.keyCode)return function(){I<t.pages.length-1&&t.selectNextPage(!0)};if(40==B.keyCode)return function(){I<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+z.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?k.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var k=e.indexOf("&lt;mxfile ");if(0<=k){var z=e.lastIndexOf("&lt;/mxfile&gt;");z>k&&(f=e.substring(k,z+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var t=mxUtils.parseXml(e),B=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,z=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var t=z.length-1;0<=t;t--){var B=this.updatePageRoot(new DiagramPage(z[t]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,B,0==t?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=k)for(t=0;t<k.length;t++)f.model.execute(new ChangePage(this,k[t],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,k,z,t,B,I,O,J,y,ia){f=null!=f?f:this.editor.graph;t=null!=t?t:!1;J=null!=J?J:!0;var da=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var ja="_blank";else da=ja=z;if(null==e)return"";var aa=e;if("mxfile"!=aa.nodeName.toLowerCase()){if(ia){var qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
+qa.appendChild(e)}else{qa=Graph.zapGremlins(mxUtils.getXml(e));aa=Graph.compress(qa);if(Graph.decompress(aa)!=qa)return qa;qa=e.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,aa)}aa=e.ownerDocument.createElement("mxfile");aa.appendChild(qa)}y?(aa=aa.cloneNode(!0),aa.removeAttribute("modified"),aa.removeAttribute("host"),aa.removeAttribute("agent"),aa.removeAttribute("etag"),aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),
+aa.removeAttribute("type")):(aa.removeAttribute("userAgent"),aa.removeAttribute("version"),aa.removeAttribute("editor"),aa.removeAttribute("pages"),aa.removeAttribute("type"),mxClient.IS_CHROMEAPP?aa.setAttribute("host","Chrome"):EditorUi.isElectronApp?aa.setAttribute("host","Electron"):aa.setAttribute("host",window.location.hostname),aa.setAttribute("modified",(new Date).toISOString()),aa.setAttribute("agent",navigator.appVersion),aa.setAttribute("version",EditorUi.VERSION),aa.setAttribute("etag",
+Editor.guid()),e=null!=k?k.getMode():this.mode,null!=e&&aa.setAttribute("type",e),1<aa.getElementsByTagName("diagram").length&&null!=this.pages&&aa.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(aa):mxUtils.getXml(aa);if(!B&&!t&&(I||null!=k&&/(\.html)$/i.test(k.getTitle())))ia=this.getHtml2(mxUtils.getXml(aa),f,null!=k?k.getTitle():null,ja,da);else if(B||!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(z=null),
+ia=this.getEmbeddedSvg(ia,f,z,null,O,J,da);return ia};EditorUi.prototype.getXmlFileData=function(e,f,k,z){e=null!=e?e:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.compressXml;var t=this.editor.getGraphXml(e,z);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(J){var y=J.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&k?(y=mxUtils.trim(mxUtils.getTextContent(J)),J=J.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&J.appendChild(mxUtils.parseXml(y).documentElement))):
+null==y||k?J=J.cloneNode(!0):(J=J.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(y)));t.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(t)),t=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var O=new mxCodec(mxUtils.createXmlDocument());O=O.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+O,null,z);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(O));delete B.needsUpdate}else z&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(O=new mxCodec(mxUtils.createXmlDocument()),O=O.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,O,null,z),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(O))));e(I)}return t};EditorUi.prototype.anonymizeString=function(e,f){for(var k=[],z=0;z<e.length;z++){var t=e.charAt(z);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));
+e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(B){e[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var z in e[EditorUi.DIFF_UPDATE]){var t=e[EditorUi.DIFF_UPDATE][z];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(f=mxUtils.bind(this,function(B){var I=t.cells[B];if(null!=I){for(var O in I)null!=I[O].value&&(I[O].value="["+I[O].value.length+"]"),null!=I[O].xmlValue&&(I[O].xmlValue="["+I[O].xmlValue.length+"]"),null!=I[O].style&&(I[O].style=
+"["+I[O].style.length+"]"),mxUtils.isEmptyObject(I[O])&&delete I[O];mxUtils.isEmptyObject(I)&&delete t.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete e[EditorUi.DIFF_UPDATE][z]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&
+e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,f));if(null!=e.childNodes)for(k=0;k<e.childNodes.length;k++)this.anonymizeAttributes(e.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+
+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(e,f,k,z,t,B,I,
+O,J,y,ia){t=null!=t?t:!0;B=null!=B?B:!1;var da=this.editor.graph;if(f||!e&&null!=J&&/(\.svg)$/i.test(J.getTitle())){var ja=null!=da.themes&&"darkTheme"==da.defaultThemeName;y=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var aa=da.getGlobalVariable;da=this.createTemporaryGraph(ja?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?da.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=qa.viewState&&null!=qa.viewState&&da.setBackgroundImage(qa.viewState.backgroundImage);da.getGlobalVariable=function(sa){return"page"==sa?qa.getName():"pagenumber"==sa?1:aa.apply(this,arguments)};document.body.appendChild(da.container);da.model.setRoot(qa.root)}}I=null!=I?I:this.getXmlFileData(t,B,y,ia);J=null!=J?J:this.getCurrentFile();e=this.createFileData(I,da,J,window.location.href,e,f,k,z,t,O,y);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return e};EditorUi.prototype.getHtml=
+function(e,f,k,z,t,B){B=null!=B?B:!0;var I=null,O=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var J=f.view.scale;B=Math.floor(I.x/J-f.view.translate.x);J=Math.floor(I.y/J-f.view.translate.y);I=f.background;null==t&&(f=this.getBasenames().join(";"),0<f.length&&(O=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",B);e.setAttribute("y0",J)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
+"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=z&&e.setAttribute("edit",z));null!=t&&(t=t.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";z=Graph.compress(e);Graph.decompress(z)!=e&&(z=encodeURIComponent(e));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?
+"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+z+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+O+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,k,z,t){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\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(e))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
+null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){k=null;this.fileNode=f;this.pages=[];for(var z=0;z<e.length;z++)null==
+e[z].getAttribute("id")&&e[z].setAttribute("id",z),f=new DiagramPage(e[z]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[z+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(k=f);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var t=urlParams["layer-ids"].split(" ");f={};for(z=0;z<t.length;z++)f[t[z]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(z=0;z<I.length;z++){var O=I[z];B.setVisible(O,f[O.id]||!1)}}catch(J){}};EditorUi.prototype.getBaseFilename=function(e){var f=
+this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
+function(e,f,k,z,t,B,I,O,J,y,ia,da){try{z=null!=z?z:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!t),aa=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,z,t,null,null,null,f);this.saveData(aa,e,qa,"text/xml")}else if("html"==e)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(aa,e,qa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==e)aa=ja+".png";else if("jpeg"==e)aa=ja+".jpg";else if("remoteSvg"==e){aa=ja+".svg";e="svg";var sa=parseInt(J);"string"===typeof O&&0<O.indexOf("%")&&(O=parseInt(O)/100);if(0<sa){var L=this.editor.graph,V=L.getGraphBounds();var T=Math.ceil(V.width*O/L.view.scale+2*sa);var Y=Math.ceil(V.height*O/L.view.scale+2*sa)}}this.saveRequest(aa,e,mxUtils.bind(this,function(S,ba){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ca=this.createDownloadRequest(S,
+e,z,ba,I,t,O,J,y,ia,da,T,Y);this.editor.graph.pageVisible=U;return ca}catch(ea){this.handleError(ea)}}))}else{var W=null,ka=mxUtils.bind(this,function(S){S.length<=MAX_REQUEST_SIZE?this.saveData(aa,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,z);k&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(S){this.spinner.stop();ka(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(S))})))}else aa=ja+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(S){this.spinner.stop();ka(S)}),z)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){var aa=this.editor.graph,qa=aa.getGraphBounds();k=this.getFileData(!0,null,null,
+null,k,0==B?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var sa="",L="";if(qa.width*qa.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==B&&(L="&allPages=1"));"xmlpng"==f&&(y="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){sa="&from="+B;break}B=aa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!t?
+t||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;t={globalVars:aa.getExportVariables()};J&&(t.grid={size:aa.gridSize,steps:aa.view.gridSteps,color:aa.view.gridColor});Graph.translateDiagram&&(t.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+sa+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+z+"&embedXml="+y+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(null!=I?
+"&scale="+I:"")+(null!=O?"&border="+O:"")+(da&&isFinite(da)?"&w="+da:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,k){var z=window.location.hash,t=mxUtils.bind(this,function(I){var O=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<O.length&&(O+="\n"),O+=I);I=new LocalFile(this,"csv"!=e.format&&0<O.length?O:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return z};this.fileLoaded(I);"csv"==e.format&&this.importCsv(O,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var J=null!=e.interval?parseInt(e.interval):6E4,y=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ja===this.currentPage&&(200<=aa.getStatus()&&
+300>=aa.getStatus()?(this.updateDiagram(aa.getText()),da()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(y);y=window.setTimeout(ia,J)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ia()}));da();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var B=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){t(I)}),
+mxUtils.bind(this,function(I){null!=k&&k(I)}))}else t("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var W=new mxCellOverlay(Y.image||t.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);W.addListener(mxEvent.CLICK,function(ka,q){z.alert(Y.tooltip)});return W}var k=null,z=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var t=this.editor.graph,B=t.getModel();B.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
+e;){if("update"==e.nodeName){var O=B.getCell(e.getAttribute("id"));if(null!=O){try{var J=e.getAttribute("value");if(null!=J){var y=mxUtils.parseXml(J).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))B.setValue(O,y);else for(var ia=y.attributes,da=0;da<ia.length;da++)t.setAttributeForCell(O,ia[da].nodeName,0<ia[da].nodeValue.length?ia[da].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+O.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&t.model.setStyle(O,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+O.id+": "+Y)}try{var aa=e.getAttribute("icon");if(null!=aa){var qa=0<aa.length?JSON.parse(aa):null;null!=qa&&qa.append||t.removeCellOverlays(O);null!=qa&&t.addCellOverlay(O,f(qa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}try{var sa=e.getAttribute("geometry");if(null!=sa){sa=JSON.parse(sa);var L=t.getCellGeometry(O);if(null!=L){L=L.clone();for(key in sa){var V=parseFloat(sa[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(sa[key])}t.model.setGeometry(O,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+O.id+": "+Y)}}}else if("model"==e.nodeName){for(var T=e.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(new mxCodec(e.firstChild)).decode(T,B)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(t.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))t.view.translate=
+new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return k};EditorUi.prototype.getCopyFilename=function(e,f){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var z=k.lastIndexOf(".");0<=z&&(e=k.substring(z),k=k.substring(0,z));if(f){f=k;var t=new Date;
+k=t.getFullYear();z=t.getMonth()+1;var B=t.getDate(),I=t.getHours(),O=t.getMinutes();t=t.getSeconds();k=f+(" "+(k+"-"+z+"-"+B+"-"+I+"-"+O+"-"+t))}return k=mxResources.get("copyOf",[k])+e};EditorUi.prototype.fileLoaded=function(e,f){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
+if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
+null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
+z=!0;if(!this.isOffline()&&null!=e.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(O){}e=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||t():t()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else t();return z};EditorUi.prototype.getHashValueForPages=function(e,f){var k=0,z=new mxGraphModel,t=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<e.length;B++){this.updatePageRoot(e[B]);var I=
+e[B].node.cloneNode(!1);I.removeAttribute("name");z.root=e[B].root;var O=t.encode(z);this.editor.graph.saveViewState(e[B].viewState,O,!0);O.removeAttribute("pageWidth");O.removeAttribute("pageHeight");I.appendChild(O);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(I,function(J,y,ia,da){return!da||"mxGeometry"!=J.nodeName&&"mxPoint"!=J.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?da&&"mxCell"==J.nodeName&&
+"previous"==y?null:ia:Math.round(ia)},f)<<0}return k};EditorUi.prototype.hashValue=function(e,f,k){var z=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(z^=this.hashValue(e.nodeName,f,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var t=0;t<e.attributes.length;t++){var B=e.attributes[t].name,I=null!=f?f(e,B,e.attributes[t].value,!0):e.attributes[t].value;null!=I&&(z^=this.hashValue(B,
+f,k)+this.hashValue(I,f,k))}}if(null!=e.childNodes)for(t=0;t<e.childNodes.length;t++)z=(z<<5)-z+this.hashValue(e.childNodes[t],f,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=k&&(k.byteCount+=e.length);for(t=0;t<e.length;t++)f=(f<<5)-f+e.charCodeAt(t)<<0;z^=f}return z};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,k,z,t,B,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(e));f.appendChild(k);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
+if(null==e){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(e=k[k.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;k=f.lastChild;var z=k.previousSibling;f.insertBefore(k,e);f.insertBefore(z,k)};EditorUi.prototype.loadLibrary=function(e,f){var k=mxUtils.parseXml(e.getData());if("mxlibrary"==k.documentElement.nodeName){var z=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(e,z,k.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,k,z){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var t=this.sidebar.palettes[e.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var B=null,I=mxUtils.bind(this,function(T,Y){0==T.length&&e.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(T,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var O=this.sidebar.addPalette(e.getHash(),k,null!=z?z:!0,mxUtils.bind(this,function(T){I(f,T)}));this.repositionLibrary(t);var J=O.parentNode.previousSibling;z=J.getAttribute("title");
+null!=z&&0<z.length&&".scratchpad"!=e.title&&J.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+z);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";J.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var da=null;if(".scratchpad"!=e.title||this.closableScratchpad)y.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(T){if(!mxEvent.isConsumed(T)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(T)}}));
+if(e.isEditable()){var ja=this.editor.graph,aa=null,qa=mxUtils.bind(this,function(T){this.showLibraryDialog(e.getTitle(),O,f,e,e.getMode());mxEvent.consume(T)}),sa=mxUtils.bind(this,function(T){e.setModified(!0);e.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=ia.cloneNode(!1),aa.setAttribute("src",Editor.spinImage),aa.setAttribute("title",mxResources.get("saving")),aa.style.cursor="default",aa.style.marginRight="2px",aa.style.marginTop="-2px",y.insertBefore(aa,y.firstChild),
+J.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&(aa.parentNode.removeChild(aa),J.style.paddingRight=18*y.childNodes.length+"px")})):null==da&&(da=ia.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),y.insertBefore(da,y.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
+LocalLibrary,!0,function(){null==da||e.isModified()||(J.style.paddingRight=18*y.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(Y)})),J.style.paddingRight=18*y.childNodes.length+"px")}),L=mxUtils.bind(this,function(T,Y,W,ka){T=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(T)));for(var q=0;q<T.length;q++){var F=ja.getCellGeometry(T[q]);null!=F&&F.translate(-Y.x,-Y.y)}O.appendChild(this.sidebar.createVertexTemplateFromCells(T,Y.width,Y.height,ka||"",!0,null,
+!1));T={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(T))),w:Y.width,h:Y.height};null!=ka&&(T.title=ka);f.push(T);sa(W);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),V=mxUtils.bind(this,function(T){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(T),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),W=ja.view.getBounds(Y),
+ka=ja.view.scale;W.x/=ka;W.y/=ka;W.width/=ka;W.height/=ka;W.x-=ja.view.translate.x;W.y-=ja.view.translate.y;L(Y,W)}mxEvent.consume(T)});mxEvent.addGestureListeners(O,function(){},mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),O.style.backgroundColor="#f1f3f4",O.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(T))}),
+mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(O.style.backgroundColor="",O.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(T),mxEvent.consume(T))}));mxEvent.addListener(O,"mouseleave",mxUtils.bind(this,function(T){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
+O.style.backgroundColor="",O.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(O,"dragover",mxUtils.bind(this,function(T){O.style.backgroundColor="#f1f3f4";T.dataTransfer.dropEffect="copy";O.style.cursor="copy";this.sidebar.hideTooltip();T.stopPropagation();T.preventDefault()})),mxEvent.addListener(O,"drop",mxUtils.bind(this,function(T){O.style.cursor="";O.style.backgroundColor="";0<T.dataTransfer.files.length&&this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,
+mxUtils.bind(this,function(Y,W,ka,q,F,S,ba,U,ca){if(null!=Y&&"image/"==W.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,S),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,S),T,mxEvent.isAltDown(T)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var ea=!1,na=mxUtils.bind(this,function(ra,
+ya){null!=ra&&"application/pdf"==ya&&(ya=Editor.extractGraphModelFromPdf(ra),null!=ya&&0<ya.length&&(ra=ya));if(null!=ra)if(ra=mxUtils.parseXml(ra),"mxlibrary"==ra.documentElement.nodeName)try{var va=JSON.parse(mxUtils.getTextContent(ra.documentElement));I(va,O);f=f.concat(va);sa(T);this.spinner.stop();ea=!0}catch(xa){}else if("mxfile"==ra.documentElement.nodeName)try{var Da=ra.documentElement.getElementsByTagName("diagram");for(va=0;va<Da.length;va++){var pa=this.stringToCells(Editor.getDiagramNodeXml(Da[va])),
+Aa=this.editor.graph.getBoundingBoxFromGeometry(pa);L(pa,new mxRectangle(0,0,Aa.width,Aa.height),T)}ea=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}ea||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=ca&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(ca,function(ra){na(ra,"text/xml")},null,ba):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(Y,ba)&&null!=ca?this.isExternalDataComms()?this.parseFile(ca,mxUtils.bind(this,function(ra){4==ra.readyState&&(this.spinner.stop(),200<=ra.status&&299>=ra.status?na(ra.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ra.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,W)}}));T.stopPropagation();T.preventDefault()})),
+mxEvent.addListener(O,"dragleave",function(T){O.style.cursor="";O.style.backgroundColor="";T.stopPropagation();T.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));y.insertBefore(ia,y.firstChild);mxEvent.addListener(ia,"click",qa);mxEvent.addListener(O,"dblclick",function(T){mxEvent.getSource(T)==O&&qa(T)});z=ia.cloneNode(!1);z.setAttribute("src",Editor.plusImage);z.setAttribute("title",mxResources.get("add"));y.insertBefore(z,
+y.firstChild);mxEvent.addListener(z,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(z=document.createElement("span"),z.setAttribute("title",mxResources.get("help")),z.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(z,"?"),mxEvent.addGestureListeners(z,mxUtils.bind(this,function(T){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(T)})),y.insertBefore(z,y.firstChild))}J.appendChild(y);J.style.paddingRight=
+18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var k=0;k<e.length;k++){var z=e[k],t=z.data;if(null!=t){t=this.convertDataUri(t);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==z.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+t,z.w,z.h,"",z.title||"",!1,null,!0))}else null!=z.xml&&(t=this.stringToCells(Graph.decompress(z.xml)),0<t.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(t,
+z.w,z.h,z.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};"1"!=urlParams["live-ui"]&&EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,k,
+z,t,B,I){e=new ImageDialog(this,e,f,k,z,t,B,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(k,z){z||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,k,z,t){e=new LibraryDialog(this,
+e,f,k,z,t);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));e.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");
+e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var k=f.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(z){z.preventDefault()}));mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(z){this.actions.get("shapes").funct();mxEvent.consume(z)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,k,z,t,B,I){var O=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,
+e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(aa){}if(null!=J||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=J){null!=J.retry&&(y=mxResources.get("cancel"),ia=function(){O();J.retry()});if(404==J.code||404==J.status||403==J.code){I=403==J.code?null!=J.message?mxUtils.htmlEntities(J.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var da=null!=t?null:null!=B?B:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==J.code||404==J.status)){da="#U"==
+da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);this.handleError(e,f,k,z,t)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function aa(){V.innerText="";for(var T=0;T<qa.length;T++){var Y=document.createElement("option");mxUtils.write(Y,qa[T].displayName);Y.value=T;V.appendChild(Y);Y=document.createElement("option");
+Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,"<"+qa[T].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=qa.length;V.appendChild(Y)}var qa=this.drive.getUsersList(),sa=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");sa.appendChild(L);var V=document.createElement("select");V.style.width="200px";aa();
+mxEvent.addListener(V,"change",mxUtils.bind(this,function(){var T=V.value,Y=qa.length!=T;Y&&this.drive.setUser(qa[T]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(qa=this.drive.getUsersList(),aa())}),mxUtils.bind(this,function(W){this.handleError(W)}),!0)}));sa.appendChild(V);sa=new CustomDialog(this,sa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(sa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();
+null!=k&&k()}),480,150);return}}null!=J.message?I=""==J.message&&null!=J.name?mxUtils.htmlEntities(J.name):mxUtils.htmlEntities(J.message):null!=J.response&&null!=J.response.error?I=mxUtils.htmlEntities(J.response.error):"undefined"!==typeof window.App&&(J.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):J.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof J&&0<J.length&&(I=mxUtils.htmlEntities(J)))}var ja=B=null;null!=J&&null!=J.helpLink?
+(B=mxResources.get("help"),ja=mxUtils.bind(this,function(){return this.editor.graph.openLink(J.helpLink)})):null!=J&&null!=J.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+J.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(J.ownerEmail))}));this.showError(f,I,y,k,ia,null,null,B,ja,null,null,null,z?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,f,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),
+f);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,f,k,z,t,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=k&&k()},z,t,null,null,null,null,O);this.showDialog(e.container,340,46+O,!0,B);e.init()};EditorUi.prototype.showBanner=function(e,f,k,z){var t=!1;if(!(this.bannerShowing||this["hideBanner"+e]||
+isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var B=document.createElement("div");B.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition",
+"all 1s ease");B.className="geBtn gePrimaryBtn";t=document.createElement("img");t.setAttribute("src",IMAGE_PATH+"/logo.png");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(t);t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get(z?"doNotShowAgain":"close"));t.setAttribute("border","0");t.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(t);mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!z){f.appendChild(I);var O=document.createElement("label");O.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(O,mxResources.get("doNotShowAgain"));f.appendChild(O);
+B.style.paddingBottom="30px";B.appendChild(f)}var J=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||z)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(t,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);J()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){J()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(ia){var da=mxEvent.getSource(ia);da!=I&&da!=O?(null!=k&&k(),J(),mxEvent.consume(ia)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);t=!0}return t};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,k,z){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<z&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",z));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,k,z,t){var B="jpeg"==k?"jpg":k;z=this.getBaseFilename(z)+(null!=f?".drawio":"")+"."+B;e=this.createImageDataUri(e,
+f,k,t);this.saveData(z,B,e.substring(e.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
+!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,k,z,t,B){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=z?this.base64ToBlob(e,k):new Blob([e],{type:k}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(e,!0):(k.document.write(e),
+k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,k,z);else{var I=document.createElement("a");B=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var O=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(O?parseInt(O[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(z?this.base64ToBlob(e,k):new Blob([e],{type:k}));B?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(J){}}else this.createEchoRequest(e,f,k,z,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,k,z,t,B){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
+k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(z?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var k=e.length,z=Math.ceil(k/1024),t=Array(z),B=0;B<z;++B){for(var I=1024*B,O=Math.min(I+1024,k),J=Array(O-I),y=0;I<O;++y,++I)J[y]=e[I].charCodeAt(0);t[B]=new Uint8Array(J)}return new Blob(t,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,k,z,t,B,I,O){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+t&&(!mxClient.IS_IOS||!navigator.standalone);t=this.getServiceCount(B);isLocalStorage&&t++;var J=4>=t?2:6<t?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(y,ia){try{if("_blank"==ia)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,k,z);else if(null!=k&&"text/html"==k.substring(0,9)){var da=new EmbedDialog(this,e);this.showDialog(da.container,450,240,!0,!0);da.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,y,k,z,null,O):null!=y&&0<y.length&&this.pickFolder(ia,mxUtils.bind(this,function(aa){try{this.exportFile(e,y,k,z,ia,aa)}catch(qa){this.handleError(qa)}}))}catch(aa){this.handleError(aa)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,B,I,null,1<t,J,e,k,z);B=this.isServices(t)?t>J?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(e,f,k){var z=window.open("about:blank");null==z||null==z.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),z.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):z.document.write("<html>"+e+"</html>"):z.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),z.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(z){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
+Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;
+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=f.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);
+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(z)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var z=this.editor.graph.getAllTags();f.style.display=0<z.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=e(mxUtils.bind(this,function(z){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var B=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.zIndex;var I=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});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(O){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var J=this.createImageDataUri(O,null,"png");O=document.createElement("img");O.style.maxWidth="140px";O.style.maxHeight="140px";O.style.cursor="pointer";O.style.backgroundColor="white";O.setAttribute("title",mxResources.get("openInNewWindow"));
+O.setAttribute("border","0");O.setAttribute("src",J);this.exportDialog.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.openInNewWindow(J.substring(J.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",t);document.body.appendChild(this.exportDialog)}mxEvent.consume(z)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,k,z,t){this.isLocalFileSave()?this.saveLocalFile(k,e,z,t,f):this.saveRequest(e,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(k,B,z,t,f,I)}),k,t,z)};EditorUi.prototype.saveRequest=function(e,f,k,z,t,B,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var O=this.getServiceCount(!1);isLocalStorage&&O++;var J=4>=O?2:6<O?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,ia){if("_blank"==
+ia||null!=y&&0<y.length){var da=k("_blank"==ia?null:y,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=da&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?da.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=z)try{this.exportFile(z,y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.spinner.spin(document.body,mxResources.get("saving"))&&da.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=da.getStatus()&&299>=da.getStatus())try{this.exportFile(da.getText(),y,B,!0,ia,ja)}catch(aa){this.handleError(aa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(aa){this.spinner.stop();this.handleError(aa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<O,J,z,B,t);O=this.isServices(O)?4<O?390:280:160;this.showDialog(e.container,420,O,!0,!0);e.init()};EditorUi.prototype.isServices=
+function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,k,z,t,B){};EditorUi.prototype.pickFolder=function(e,f,k){f(null)};EditorUi.prototype.exportSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();k=null!=k?k:qa;var sa=f?null:this.editor.graph.background;sa==mxConstants.NONE&&(sa=null);null==sa&&0==f&&(sa=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(sa,e,I,O,null,k,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!ja,ia,da);z&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(t?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(W){this.isLocalFileSave()||W.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(W)}))});var T=mxUtils.bind(this,function(W){this.spinner.stop();t&&W.setAttribute("content",this.getFileData(!0,null,null,null,k,J,null,null,null,!1));aa(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(W))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(W){B?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(W,T,this.thumbImageCache)):T(W)});ja?this.embedFonts(L,
+Y):(this.editor.addFontCss(L),Y(L))}catch(W){this.handleError(W)}};EditorUi.prototype.addRadiobox=function(e,f,k,z,t,B,I){return this.addCheckbox(e,k,z,t,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;var J=document.createElement("input");J.style.marginRight="8px";J.style.marginTop="16px";J.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();J.id=I;null!=O&&J.setAttribute("name",O);k&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);
+z&&J.setAttribute("disabled","disabled");B&&(e.appendChild(J),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",I),e.appendChild(k),t||mxUtils.br(e));return J};EditorUi.prototype.addEditButton=function(e,f){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var z=this.getCurrentFile(),t="";null!=z&&z.getMode()!=App.MODE_DEVICE&&z.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("makeCopy"));B.appendChild(z);z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");B.appendChild(z);e.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,t,mxResources.get("ok"),
+function(O){null!=O?t=O:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===B.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(e,f){function k(){var O=document.createElement("div");O.style.width="100%";O.style.height="100%";O.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(O.style.border="1px solid black",O.style.backgroundColor=B):(O.style.backgroundPosition="center center",O.style.backgroundRepeat="no-repeat",O.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(O)}mxUtils.write(e,mxResources.get("links")+":");var z=document.createElement("select");z.style.width=
+"100px";z.style.padding="0px";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));z.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));z.appendChild(t);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),z.appendChild(f));e.appendChild(z);mxUtils.write(e,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(O){this.pickColor(B||"none",function(J){B=J;k()});mxEvent.consume(O)}));k();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return B},getTarget:function(){return z.value},focus:function(){z.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,k,z,t,B,I){I=null!=I?I:[];z&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&I.push("edit="+encodeURIComponent(t)),B&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,k,z,t,B,I,O,J,y){J=this.createUrlParameters(e,f,k,z,t,B,J);e=this.getCurrentFile();f=!0;null!=I?k="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
+O||null==e||e.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&J.push("title="+encodeURIComponent(e.getTitle()));y&&1<k.length&&(J.push("open="+k.substring(1)),k="");return(z&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<J.length?"?"+J.join("&"):"")+k};EditorUi.prototype.createHtml=function(e,f,k,z,t,B,I,O,J,y,ia,da){this.getBasenames();var ja={};""!=t&&t!=mxConstants.NONE&&(ja.highlight=t);"auto"!==z&&(ja.target=z);y||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(ja.zoom=k/100);k=[];I&&(k.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(k.push("zoom"),ja.resize=!0);O&&k.push("layers");J&&k.push("tags");0<k.length&&(y&&k.push("lightbox"),ja.toolbar=k.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";da(f,'<script type="text/javascript" src="'+(0<e.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,f,k,z){var t=document.createElement("div");t.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+t.appendChild(B);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var O=document.createElement("input");O.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";O.setAttribute("value","url");O.setAttribute("type","radio");O.setAttribute("name","type-embedhtmldialog");B=O.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);var J=document.createElement("span");mxUtils.write(J,mxResources.get("includeCopyOfMyDiagram"));
+I.appendChild(J);mxUtils.br(I);I.appendChild(O);J=document.createElement("span");mxUtils.write(J,mxResources.get("publicDiagramUrl"));I.appendChild(J);var y=this.getCurrentFile();null==k&&null!=y&&y.constructor==window.DriveFile&&(J=document.createElement("a"),J.style.paddingLeft="12px",J.style.color="gray",J.style.cursor="pointer",mxUtils.write(J,mxResources.get("share")),I.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));
+B.setAttribute("checked","checked");null==k&&O.setAttribute("disabled","disabled");t.appendChild(I);var ia=this.addLinkSection(t),da=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";t.appendChild(ja);var aa=this.addCheckbox(t,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var qa=qa=this.addCheckbox(t,mxResources.get("allPages"),I,!I),sa=this.addCheckbox(t,mxResources.get("layers"),!0),L=this.addCheckbox(t,mxResources.get("tags"),!0),V=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;I=380;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,V);var Y=T.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?T.getEditSelect().removeAttribute("disabled"):
+T.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,t,mxUtils.bind(this,function(){z(O.checked?k:null,da.checked,ja.value,ia.getTarget(),ia.getColor(),aa.checked,qa.checked,sa.checked,L.checked,V.checked,null!=T?T.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,k,z,t,B,I,O){var J=document.createElement("div");J.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,
+e||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";J.appendChild(y);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));y.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));da.style.marginTop="12px";da.className="geBtn";y.appendChild(da);J.appendChild(y);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));
+y.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(ka){this.spinner.stop();ka=new ErrorDialog(this,null,mxResources.get(null!=ka?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(ka.container,300,80,!0,!1);ka.init()}))}))}var ja=null,aa=null;if(null!=k||null!=z)e+=30,mxUtils.write(J,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",J.appendChild(ja),mxUtils.write(J,mxResources.get("height")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginBottom="10px",aa.value=z+"px",J.appendChild(aa),mxUtils.br(J);var qa=this.addLinkSection(J,B);k=
+null!=this.pages&&1<this.pages.length;var sa=null;if(null==ia||ia.constructor!=window.DriveFile||f)sa=this.addCheckbox(J,mxResources.get("allPages"),k,!k);var L=this.addCheckbox(J,mxResources.get("lightbox"),!0,null,null,!B),V=this.addEditButton(J,L),T=V.getEditInput();B&&(T.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(J,mxResources.get("layers"),!0);Y.style.marginLeft=T.style.marginLeft;Y.style.marginTop="8px";var W=this.addCheckbox(J,mxResources.get("tags"),
+!0);W.style.marginLeft=T.style.marginLeft;W.style.marginBottom="16px";W.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),T.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));T.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,J,mxUtils.bind(this,function(){t(qa.getTarget(),qa.getColor(),null==
+sa?!0:sa.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=aa?aa.value:null,W.checked)}),null,mxResources.get("create"),I,O);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";B.appendChild(I);if(t){mxUtils.write(B,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";B.appendChild(O);mxUtils.write(B,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type",
+"text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";B.appendChild(J);mxUtils.br(B)}var y=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=z?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var da=z?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=da&&
+(da.style.marginBottom="16px");e=new CustomDialog(this,B,mxUtils.bind(this,function(){var ja=parseInt(O.value)/100||1,aa=parseInt(J.value)||0;k(!y.checked,null!=ia?ia.checked:!1,null!=da?da.checked:!1,ja,aa)}),null,e,f);this.showDialog(e.container,300,(t?25:0)+(z?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,k,z,t,B,I,O,J){I=null!=I?I:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var ia=this.editor.graph,da="jpeg"==O?220:300,ja=document.createElement("h3");
+mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(ja);mxUtils.write(y,mxResources.get("zoom")+":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value=this.lastExportZoom||"100%";y.appendChild(aa);mxUtils.write(y,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type",
+"text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";y.appendChild(qa);mxUtils.br(y);var sa=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
+"8px";e=["selectionOnly","diagram","page"];var T={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);T[e[ja]]=Y}J?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(V),mxUtils.br(y),da+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(sa.checked=!0)})):B&&(y.appendChild(L),mxUtils.write(y,mxResources.get("crop")),
+mxUtils.br(y),da+=30,mxEvent.addListener(sa,"change",function(){sa.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?J&&(sa.style.display="none",sa.nextSibling.style.display="none",sa.nextSibling.nextSibling.style.display="none",da-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(sa,"change",function(){V.value=sa.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(y,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=O),ka=null;Editor.isDarkMode()&&(ka=this.addCheckbox(y,mxResources.get("dark"),!0),da+=26);var q=this.addCheckbox(y,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==O||"jpeg"==O)F=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var S=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=O);S.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight=
+"8px";ba.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),T.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),ea.style.display="inline-block",
+ca.style.display="none"):"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),q.removeAttribute("disabled"),T.page.style.display="",ea.style.display="none",ca.style.display="")}));f&&(y.appendChild(ba),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),da+=60);var ca=document.createElement("select");ca.style.maxWidth="260px";ca.style.marginLeft="8px";ca.style.marginRight=
+"10px";ca.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ca.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ca.appendChild(f);var ea=document.createElement("div");mxUtils.write(ea,mxResources.get("LinksLost"));
+ea.style.margin="7px";ea.style.display="none";"svg"==O&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(ca),y.appendChild(ea),mxUtils.br(y),mxUtils.br(y),da+=50);k=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=aa.value;t(aa.value,W.checked,!sa.checked,q.checked,S.checked,ba.checked,qa.value,L.checked,!1,ca.value,null!=F?F.checked:null,null!=ka?ka.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,z);this.showDialog(k.container,
+340,da,!0,!0,null,null,null,null,!0);aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,k,z,t){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var O=document.createElement("h3");mxUtils.write(O,f);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(O)}var J=this.addCheckbox(B,mxResources.get("fit"),
+!0),y=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&z,!z),ia=this.addCheckbox(B,k),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,da),aa=ja.getEditInput(),qa=1<I.model.getChildCount(I.model.getRoot()),sa=this.addCheckbox(B,mxResources.get("layers"),qa,!qa);sa.style.marginLeft=aa.style.marginLeft;sa.style.marginBottom="12px";sa.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(qa&&sa.removeAttribute("disabled"),aa.removeAttribute("disabled")):
+(sa.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&da.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){e(J.checked,y.checked,ia.checked,da.checked,ja.getLink(),sa.checked)}),null,mxResources.get("embed"),t);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,k,z,t,B,I,O){function J(aa){var qa=" ",sa=
+"";z&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",sa+="cursor:pointer;");e&&(sa+="max-width:100%;");var L=
+"";k&&(L=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');I('<img src="'+aa+'"'+L+(""!=sa?' style="'+sa+'"':"")+qa+"/>")}var y=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var qa=z?this.getFileData(!0):null;aa=this.createImageDataUri(aa,qa,"png");J(aa)}),null,null,null,mxUtils.bind(this,function(aa){O({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,
+null,Editor.defaultBorder);else if(f=this.getFileData(!0),y.width*y.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";k&&(da="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(z?"1":"0")+da+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?J("data:image/png;base64,"+ja.getText()):O({message:mxResources.get("unknownError")})}))}else O({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(e,f,k,z,t,B,I){var O=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),J=O.getElementsByTagName("a");if(null!=J)for(var y=0;y<J.length;y++){var ia=J[y].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==J[y].getAttribute("target")&&J[y].removeAttribute("target")}z&&O.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(O);if(k){var da=" ",ja="";z&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(O,mxUtils.bind(this,function(aa){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ja?' style="'+ja+'"':"")+da+"/>")}))}else ja="",z&&(f=this.getSelectedPageIndex(),O.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(t?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(O.getAttribute("width")),t=parseInt(O.getAttribute("height")),O.setAttribute("viewBox","-0.5 -0.5 "+e+" "+t),ja+="max-width:100%;max-height:"+t+"px;",O.removeAttribute("height")),""!=ja&&O.setAttribute("style",ja),this.editor.addFontCss(O),this.editor.graph.mathEnabled&&this.editor.addMathCss(O),I(mxUtils.getXml(O))};EditorUi.prototype.timeSince=
+function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var k=null;if("diagram"==
+e.nodeName)k=e;else if("mxfile"==e.nodeName){var z=e.getElementsByTagName("diagram");if(0<z.length){k=z[0];var t=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:t.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}z=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(B){}finally{this.editor.graph=z}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
+1,k=0;if(null!=e){if(e.hasAttribute("scale")){var z=parseFloat(e.getAttribute("scale"));!isNaN(z)&&0<z&&(f=z)}e.hasAttribute("border")&&(z=parseInt(e.getAttribute("border")),!isNaN(z)&&0<z&&(k=z))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,f,k,z,t){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,O=null;if(null!=k&&0<k.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),B),O=k;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var J=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&B.setBackgroundImage(y.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?y.getName():"pagenumber"==ia?1:J.apply(this,
+arguments)};document.body.appendChild(B.container);B.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==O&&(O=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ia.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(O));e(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,z,null,B.shadowVisible,null,B,t,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){O=null!=O?O:!0;ia=null!=ia?ia:0;I=null!=J?J:f.background;I==mxConstants.NONE&&(I=null);B=f.getSvg(I,y,ia,null,null,B,null,null,null,f.shadowVisible||da,null,ja,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ia);null!=e&&B.setAttribute("content",e);null!=k&&B.setAttribute("resource",k);var aa=mxUtils.bind(this,
+function(qa){qa=(z?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=t&&t(qa);return qa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=t)this.embedFonts(B,mxUtils.bind(this,function(qa){O?this.editor.convertImages(qa,mxUtils.bind(this,function(sa){aa(sa)})):aa(qa)}));else return aa(B)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),f(e)}catch(z){f(e)}}))}catch(k){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){J=null!=J?J:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var aa=this.editor.graph.isSelectionEmpty();k=null!=k?k:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();
+try{this.saveCanvas(qa,t?this.getFileData(!0,null,null,null,k,O):null,J,null==this.pages||0==this.pages.length,ia)}catch(sa){this.handleError(sa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,k,e||1,f,z,null,null,B,I,y,da,ja)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,k,z,t,B,I){f=null!=
+f?f:0;k=null!=k?k:0;var O=[];try{var J=this.editor.graph;if(null!=e&&0<e.length){J.model.beginUpdate();try{var y=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var da=ia.getElementsByTagName("diagram");if(1==da.length&&!B){if(ia=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(e[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=da[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<da.length){B=[];var aa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[da[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(da[0]),z=!1,aa=1);for(;aa<da.length;aa++){var qa=da[aa].getAttribute("id");da[aa].removeAttribute("id");var sa=this.updatePageRoot(new DiagramPage(da[aa]));e[qa]=da[aa].getAttribute("id");var L=this.pages.length;null==sa.getName()&&sa.setName(mxResources.get("pageWithNumber",
+[L+1]));J.model.execute(new ChangePage(this,sa,sa,L,!0));B.push(sa)}this.updatePageLinks(e,B)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){O=J.importGraphModel(ia,f,k,z);if(null!=O)for(aa=0;aa<O.length;aa++)this.updatePageLinksForCell(e,O[aa]);var V=J.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var T=new ChangePageSetup(this,null,V);T.ignoreColor=!0;J.model.execute(T)}}I&&this.insertHandler(O,null,null,J.defaultVertexStyle,
+J.defaultEdgeStyle,!1,!0)}finally{J.model.endUpdate()}}}catch(Y){if(t)throw Y;this.handleError(Y)}return O};EditorUi.prototype.updatePageLinks=function(e,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(e,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(e,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc=
+"data:page/id,"+k)}}catch(z){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var k=document.createElement("div"),z=this.editor.graph,t=z.getLinkForCell(f);null!=t&&z.setLinkForCell(f,this.updatePageLink(e,t));if(z.isHtmlLabel(f)){k.innerHTML=z.sanitizeHtml(z.getLabel(f));for(var B=k.getElementsByTagName("a"),I=!1,O=0;O<B.length;O++)t=B[O].getAttribute("href"),null!=t&&(B[O].setAttribute("href",this.updatePageLink(e,t)),I=!0);I&&z.labelChanged(f,k.innerHTML)}for(O=0;O<z.model.getChildCount(f);O++)this.updatePageLinksForCell(e,
+z.model.getChildAt(f,O))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var k=e[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var z=JSON.parse(f.substring(17));if(null!=z.actions){for(var t=0;t<z.actions.length;t++){var B=z.actions[t];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);k=e[I];null!=k?B.open="data:page/id,"+k:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(z)}}catch(O){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,k,z,t){z=null!=z?z:e.name;k=null!=k?k:mxUtils.bind(this,function(I){this.handleError(I)});var B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(z);try{var O="UNKNOWN-VISIO",J=z.lastIndexOf(".");if(0<=J&&J<z.length)O=z.substring(J+
+1).toUpperCase();else{var y=z.lastIndexOf("/");0<=y&&y<z.length&&(z=z.substring(y+1))}EditorUi.logEvent({category:O+"-MS-IMPORT-FILE",action:"filename_"+z,label:I?"remote":"local"})}catch(da){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,z);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(z)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=t&&ia.setRequestHeader("x-convert-custom",t);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var da=ia.response;if("text/xml"==da.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(aa){try{f(aa.target.result)}catch(qa){k({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(da)}else this.doImportVisio(da,f,k,z)}catch(aa){k(aa)}else try{""==ia.responseType||
+"text"==ia.responseType?k({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){k({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(aa){k({})}});ia.send(I)}else try{this.doImportVisio(e,f,k,z)}catch(da){k(da)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(e,f,k){k=null!=k?k:mxUtils.bind(this,function(t){this.handleError(t)});var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,k)}catch(t){k(t)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
+f,k){var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var t=JSON.parse(e);f(LucidImporter.importState(t));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",t];null!=t.state&&B.push(JSON.parse(t.state));if(null!=t.svgThumbs)for(var I=0;I<t.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(t.svgThumbs[I]));null!=
+t.thumb&&B.push(t.thumb);console.log.apply(console,B)}}catch(O){}}catch(O){null!=window.console&&console.error(O),k(O)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",z)})})})}):mxscript("js/extensions.min.js",z))};EditorUi.prototype.generateMermaidImage=function(e,f,k,z){var t=this,B=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var O=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<O.length){var J=parseFloat(O[0].getAttribute("width")),y=parseFloat(O[0].getAttribute("height"));if(isNaN(J)||isNaN(y))try{var ia=O[0].getAttribute("viewBox").split(/\s+/);J=parseFloat(ia[2]);y=parseFloat(ia[3])}catch(da){J=J||100,y=y||100}k(t.convertDataUri(Editor.createSvgDataUri(I)),J,y)}else z({message:mxResources.get("invalidInput")})}catch(da){z(da)}})}catch(I){z(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(e,f,k,z){function t(O,J,y){c1=O>>2;c2=(O&3)<<4|J>>4;c3=(J&15)<<2|y>>6;c4=y&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(O){if(10>O)return String.fromCharCode(48+O);O-=10;if(26>O)return String.fromCharCode(65+O);O-=26;if(26>O)return String.fromCharCode(97+
+O);O-=26;return 0==O?"-":1==O?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(O){r="";for(i=0;i<O.length;i+=3)r=i+2==O.length?r+t(O.charCodeAt(i),O.charCodeAt(i+1),0):i+1==O.length?r+t(O.charCodeAt(i),0,0):r+t(O.charCodeAt(i),O.charCodeAt(i+1),O.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(O){if(200<=this.status&&300>this.status)if("txt"==
+f)k(this.response);else{var J=new FileReader;J.readAsDataURL(this.response);J.onloadend=function(y){var ia=new Image;ia.onload=function(){try{var da=ia.width,ja=ia.height;if(0==da&&0==ja){var aa=J.result,qa=aa.indexOf(","),sa=decodeURIComponent(escape(atob(aa.substring(qa+1)))),L=mxUtils.parseXml(sa).getElementsByTagName("svg");0<L.length&&(da=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}k(J.result,da,ja)}catch(V){z(V)}};ia.src=J.result};J.onerror=function(y){z(y)}}else z(O)};
+I.onerror=function(O){z(O)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,k){var z=this.editor.graph,t=null;z.getModel().beginUpdate();try{t=z.insertVertex(null,null,"<pre>"+e+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),z.updateCellSize(t,!0)}finally{z.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(e,f,k,z,t,B,I,O){B=null!=B?B:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var J=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var y=Editor.extractGraphModelFromPdf(e);if(null!=
+y&&0<y.length)return this.importXml(y,f,k,B,!0,O)}if(Editor.isPngDataUrl(e)&&(y=Editor.extractGraphModelFromPng(e),null!=y&&0<y.length))return this.importXml(y,f,k,B,!0,O);if("data:image/svg+xml;"==e.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(y=e.substring(e.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(y,f,k,B,!0,O);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
+mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(sa,L,V){J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(sa)+";"))}),I,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),qa=Math.round(ja.width*aa);ja=Math.round(ja.height*
+aa);J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),qa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;J.getModel().beginUpdate();try{ja=J.insertVertex(J.getDefaultParent(),null,e,J.snap(f),J.snap(k),1,1,"text;"+(z?"html=1;":"")),J.updateCellSize(ja),J.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{J.getModel().endUpdate()}J.setSelectionCell(ja)}))}else{e=
+Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,k,B,null,O);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,k,B,null,O))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{J=this.editor.graph;t=null;J.getModel().beginUpdate();try{t=J.insertVertex(J.getDefaultParent(),null,"",J.snap(f),J.snap(k),1,1,"text;whiteSpace=wrap;"+(z?"html=1;":""));
+J.fireEvent(new mxEventObject("textInserted","cells",[t]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");t.value=e;J.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var da=J.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=da.width;t.geometry.height=da.height}Graph.isLink(t.value)&&J.setLinkForCell(t,t.value);t.geometry.width+=J.gridSize;t.geometry.height+=
+J.gridSize}finally{J.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
+EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display=
+"none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,O){StorageFile.listFiles(this,"F",I,O)});window.openBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.getFileContent(this,I,O,J)});window.deleteBrowserFile=mxUtils.bind(this,function(I,O,J){StorageFile.deleteFile(this,I,O,J)});if(!f){var z=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,O){null!=O&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(O)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(J){this.importXml(J,0,0,!0)}),null,O)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!f){var t=this.dialog,B=t.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=z;B.apply(t,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,k){var z=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(B){if(mxUtils.isEmptyObject(B.files))k();else{var I=0,O,J=!1;B.forEach(function(y,ia){y=
+ia.name.toLowerCase();"diagram/diagram.xml"==y?(J=!0,ia.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):k()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>I&&(I=y,O=ia))});0<I?O.async("string").then(function(y){(new XMLHttpRequest).upload&&z.isRemoteFileFormat(y,e.name)?z.isOffline()?z.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):z.parseFileData(y,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+k())}),e.name):k()}):J||k()}},function(B){k(B)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importFile=function(e,f,k,z,t,B,I,O,J,y,ia,da){y=null!=y?y:!0;var ja=!1,aa=null,qa=mxUtils.bind(this,function(sa){var L=null;null!=sa&&"<mxlibrary"==sa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,sa,I)):L=this.importXml(sa,k,z,y,null,null!=da?mxEvent.isControlDown(da):null);null!=
+O&&O(L)});"image"==f.substring(0,5)?(J=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(aa=this.importXml(f,k,z,y,null,null!=da?mxEvent.isControlDown(da):null),J=!0)),J||(f=this.editor.graph,J=e.indexOf(";"),0<J&&(e=e.substring(0,J)+e.substring(e.indexOf(",",J+1))),y&&f.isGridEnabled()&&(k=f.snap(k),z=f.snap(z)),aa=[f.insertVertex(null,null,"",k,z,t,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,qa)):null!=J&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(J,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,t=mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status?qa(sa.responseText):null!=O&&O(null))}),null!=e?this.parseFileData(e,t,I):this.parseFile(J,
+t,I)):0==e.indexOf("PK")&&null!=J?(ja=!0,this.importZipFile(J,qa,mxUtils.bind(this,function(){aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y);O(aa)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(aa=this.insertTextAt(this.validateFileData(e),k,z,!0,null,y,null,null!=da?mxEvent.isControlDown(da):null));ja||null==O||O(aa);return aa};EditorUi.prototype.importFiles=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja){z=null!=z?z:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var aa=
+null!=f&&null!=k,qa=!0;f=null!=f?f:0;k=null!=k?k:0;var sa=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){sa=!0;break}var T=mxUtils.bind(this,function(){var Y=this.editor.graph,W=Y.gridSize;t=null!=t?t:mxUtils.bind(this,function(U,ca,ea,na,ra,ya,va,Da,pa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+U,va)),null):this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,va,!0)),null):this.importFile(U,ca,ea,na,ra,ya,va,Da,pa,aa,da,ja)}catch(Aa){return this.handleError(Aa),null}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var ka=e.length,q=ka,F=[],S=mxUtils.bind(this,function(U,ca){F[U]=ca;if(0==--q){this.spinner.stop();if(null!=
+O)O(F);else{var ea=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(ea=ea.concat(na))}}finally{Y.getModel().endUpdate()}}B(ea)}}),ba=0;ba<ka;ba++)mxUtils.bind(this,function(U){var ca=e[U];if(null!=ca){var ea=new FileReader;ea.onload=mxUtils.bind(this,function(na){if(null==I||I(ca))if("image/"==ca.type.substring(0,6))if("image/svg"==ca.type.substring(0,9)){var ra=Graph.clipSvgDataUri(na.target.result),ya=ra.indexOf(",");ya=decodeURIComponent(escape(atob(ra.substring(ya+
+1))));var va=mxUtils.parseXml(ya);ya=va.getElementsByTagName("svg");if(0<ya.length){ya=ya[0];var Da=da?null:ya.getAttribute("content");null!=Da&&"<"!=Da.charAt(0)&&"%"!=Da.charAt(0)&&(Da=unescape(window.atob?atob(Da):Base64.decode(Da,!0)));null!=Da&&"%"==Da.charAt(0)&&(Da=decodeURIComponent(Da));null==Da||"<mxfile "!==Da.substring(0,8)&&"<mxGraphModel "!==Da.substring(0,14)?S(U,mxUtils.bind(this,function(){try{if(null!=va){var xa=va.getElementsByTagName("svg");if(0<xa.length){var Ma=xa[0],Oa=Ma.getAttribute("width"),
+Na=Ma.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var La=Ma.getAttribute("viewBox");if(null==La||0==La.length)Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var Ba=La.split(" ");3<Ba.length&&(Oa=parseFloat(Ba[2]),Na=parseFloat(Ba[3]))}ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var ab=Math.min(1,Math.min(z/Math.max(1,Oa)),z/Math.max(1,Na)),Xa=t(ra,ca.type,f+U*W,k+U*W,Math.max(1,
+Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),ca.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Xa[0].geometry.width=Oa;Xa[0].geometry.height=Na;Ma.setAttribute("viewBox","0 0 "+Oa+" "+Na);ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var H=ra.indexOf(";");0<H&&(ra=ra.substring(0,H)+ra.substring(ra.indexOf(",",H+1)));Y.setCellStyles("image",ra,[Xa[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}return Xa}}}catch(H){}return null})):
+S(U,mxUtils.bind(this,function(){return t(Da,"text/xml",f+U*W,k+U*W,0,0,ca.name)}))}else S(U,mxUtils.bind(this,function(){return null}))}else{ya=!1;if("image/png"==ca.type){var pa=da?null:this.extractGraphModelFromPng(na.target.result);if(null!=pa&&0<pa.length){var Aa=new Image;Aa.src=na.target.result;S(U,mxUtils.bind(this,function(){return t(pa,"text/xml",f+U*W,k+U*W,Aa.width,Aa.height,ca.name)}));ya=!0}}ya||(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(na.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,na.target.result,mxUtils.bind(this,function(Ma,Oa,Na){S(U,mxUtils.bind(this,function(){if(null!=Ma&&Ma.length<y){var La=qa&&this.isResampleImageSize(ca.size,ia)?Math.min(1,Math.min(z/Oa,z/Na)):1;return t(Ma,ca.type,f+U*W,k+U*W,Math.round(Oa*La),Math.round(Na*La),ca.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),qa,z,ia,ca.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ra=na.target.result,t(ra,ca.type,f+U*W,k+U*W,240,160,ca.name,function(xa){S(U,function(){return xa})},ca)});/(\.v(dx|sdx?))($|\?)/i.test(ca.name)||/(\.vs(x|sx?))($|\?)/i.test(ca.name)?t(null,ca.type,f+U*W,k+U*W,240,160,ca.name,function(na){S(U,function(){return na})},ca):"image"==ca.type.substring(0,5)||"application/pdf"==ca.type?ea.readAsDataURL(ca):ea.readAsText(ca)}})(ba)});
+if(sa){sa=[];for(V=0;V<e.length;V++)sa.push(e[V]);e=sa;this.confirmImageResize(function(Y){qa=Y;T()},J)}else T()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(e,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+null,t=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();k();e(I)};null==z||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){t(B,!0)},function(B){t(B,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
+!0,!0):t(!1,z)};EditorUi.prototype.parseFile=function(e,f,k){k=null!=k?k:e.name;var z=new FileReader;z.onload=mxUtils.bind(this,function(){this.parseFileData(z.result,f,k)});z.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,k){var z=new XMLHttpRequest;z.open("POST",OPEN_URL);z.setRequestHeader("Content-Type","application/x-www-form-urlencoded");z.onreadystatechange=function(){f(z)};z.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
+action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,k,z,t,B,I){t=null!=t?t:this.maxImageSize;var O=Math.max(1,e.width),J=Math.max(1,e.height);if(z&&this.isResampleImageSize(null!=I?I:f.length,B))try{var y=Math.max(O/t,J/t);if(1<y){var ia=Math.round(O/y),da=Math.round(J/y),ja=document.createElement("canvas");ja.width=ia;ja.height=da;ja.getContext("2d").drawImage(e,0,0,
+ia,da);var aa=ja.toDataURL();if(aa.length<f.length){var qa=document.createElement("canvas");qa.width=ia;qa.height=da;var sa=qa.toDataURL();aa!==sa&&(f=aa,O=ia,J=da)}}}catch(L){}k(f,O,J)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,k){try{var z=new Image;z.onload=function(){z.width=0<z.width?z.width:120;z.height=0<z.height?z.height:120;f(z)};null!=k&&(z.onerror=k);z.src=e}catch(t){if(null!=k)k(t);else throw t;
+}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&
+(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("plantUml")+
+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(W,Y.format,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+ka+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(ka),[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=q,S.height=F,f.cellsResized([L],[S],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:W,format:Y.format}))}finally{f.getModel().endUpdate()}},
+function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,T){var Y=JSON.parse(T);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(W){null!=W&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(W,Y.config,function(ka,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",ka,[L]);var S=f.model.getGeometry(L);null!=S&&(S=S.clone(),S.width=Math.max(S.width,
+q),S.height=Math.max(S.height,F),f.cellsResized([L],[S],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:W,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(ka){e.handleError(ka)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var k=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var T=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=T)this.editPlantUmlData(L,V,T);else if(T=this.graph.getAttributeForCell(L,"mermaidData"),
+null!=T)this.editMermaidData(L,V,T);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):k.apply(this,arguments)}}catch(W){e.handleError(W)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(T){e.handleError(T)}return V};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=z.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});
+return V};var t=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:
+null;if(null!=L){var T=L.indexOf(",");if(0<T)for(L=L.substring(T+1),V=V.getProperty("patches"),T=0;T<V.length;T++)if(null!=V[T][EditorUi.DIFF_UPDATE]&&null!=V[T][EditorUi.DIFF_UPDATE][L]||null!=V[T][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[T][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var T=B.apply(this,arguments);if(null!=T&&null!=T.originalSrc)if(!V)T={src:T.originalSrc};else if(V&&null!=this.themes&&
+"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,W=this.shapeForegroundColor,ka=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";T=e.createImageForPageLink(T.originalSrc);this.shapeBackgroundColor=ka;this.shapeForegroundColor=W;this.stylesheet=Y}return T};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
+(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var O=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return O.apply(this,arguments)};var J=f.addClickHandler;f.addClickHandler=function(L,V,T){var Y=V;
+V=function(W,ka){if(null==ka){var q=mxEvent.getSource(W);"a"==q.nodeName.toLowerCase()&&(ka=q.getAttribute("href"))}null!=ka&&f.isCustomLink(ka)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&f.customLinkClicked(ka)&&mxEvent.consume(W);null!=Y&&Y(W,ka)};J.call(this,L,V,T)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,
+V,T){e.editor.graph.isSelectionEmpty()?y.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,T)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=
+null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var da=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:
+1:da.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,T){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(T)&&mxEvent.isPopupTrigger(T))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(T)}};this.editor.getOrCreateFilename=function(){var L=e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var aa=
+this.actions.get("print");aa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);aa.visible=aa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
+!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
+null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,T=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,
+function(Y){null!=T&&(T.parentNode.removeChild(T),T=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(ka,q,F,S,ba,U){f.insertImage(ka,ba,U)},function(){},function(ka){return"image/"==ka.type.substring(0,6)},function(ka){for(var q=0;q<ka.length;q++)ka[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var W=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),
+mxUtils.bind(this,function(ka){var q=Math.max(1,ka.width);ka=Math.max(1,ka.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,ka));f.insertImage(decodeURIComponent(W),q*F,ka*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",
+!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(aa=this.editor.graph.view,aa.setUnit(mxSettings.getUnit()),aa.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,aa.unit),this.refresh());if("1"==urlParams.styledev){aa=
+document.getElementById("geFooter");null!=aa&&(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)})),aa.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?
+!0:qa.apply(this,arguments)}}aa=document.getElementById("geInfo");null!=aa&&aa.parentNode.removeChild(aa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var sa=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=sa&&(sa.parentNode.removeChild(sa),sa=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==sa&&(!mxClient.IS_IE||10<document.documentMode)&&(sa=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=sa&&(sa.parentNode.removeChild(sa),sa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),T=L.dataTransfer.files,Y=f.view.translate,W=f.view.scale,ka=V.x/W-Y.x,q=V.y/W-Y.y;if(0<T.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(T,!0)):(mxEvent.isAltDown(L)&&(q=ka=null),this.importFiles(T,ka,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=ka=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,ka,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,
+"text/html")){var S=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(S);var ba=null;T=V.getElementsByTagName("img");null!=T&&1==T.length?(S=T[0].getAttribute("src"),null==S&&(S=T[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)||(ba=!0)):(T=V.getElementsByTagName("a"),null!=T&&1==T.length?S=T[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(S=mxUtils.getTextContent(V[0]))));var U=!0,ca=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(S,ka,q,!0,ba,null,U,mxEvent.isControlDown(L)))});ba&&null!=S&&S.length>this.resampleThreshold?this.confirmImageResize(function(ea){U=ea;ca()},mxEvent.isControlDown(L)):ca()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(ea){var na=Math.max(1,ea.width);ea=Math.max(1,ea.height);var ra=this.maxImageSize;ra=Math.min(1,Math.min(ra/Math.max(1,na)),ra/Math.max(1,ea));f.setSelectionCell(f.insertVertex(null,
+null,"",ka,q,na*ra,ea*ra,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(ea){f.setSelectionCells(this.insertTextAt(F,ka,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),ka,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+aa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",aa);this.addListener("sketchModeChanged",aa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):("1"==urlParams["live-ui"]||"min"==uiTheme&&"1"!=urlParams.embedInline)&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&
+!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=f.clipboardData||f.originalEvent.clipboardData,z=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,
+5)){z=!0;break}if(!z){var B=k.items;for(index in B){var I=B[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(J,y,ia,da,ja,aa){e.insertImage(J,ja,aa)},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var y=0;y<J.length;y++)J[y]()});else{var O=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],O.x,O.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(J){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function e(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position=
+"absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var z=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(B){var I=mxEvent.getSource(B);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||z||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(k),z=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(B){var I=B.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=I&&17!=I&&91!=I&&93!=I||(z=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"cut",
+mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=B.clipboardData&&this.pasteCells(B,k,!0,!0),!mxEvent.isConsumed(B))){var I=f.container.scrollLeft,O=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=O;
+this.pasteCells(B,k,!1,!0)}),0)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function k(da){return""==da||"dark"==da||"kennedy"==da||null==da}var z=Editor.currentTheme;e=k(e)?"default":e;z=k(z)?"default":
+z;var t="sketch"==z&&"default"==e||"default"==z&&"sketch"==e;if(t&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,O=B.y,J=mxUtils.getOffset(this.editor.graph.container),y=this.editor.graph.container.scrollLeft-J.x,ia=this.editor.graph.container.scrollTop-J.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,
+function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"sketch"==z&&"default"==e?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==z&&"sketch"==
+e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var da=this.editor.graph.view.scale;J=mxUtils.getOffset(this.editor.graph.container);
+this.editor.graph.container.scrollLeft=y+J.x+(B.x-I)*da;this.editor.graph.container.scrollTop=ia+J.y+(B.y-O)*da;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return t};EditorUi.prototype.switchTheme=function(e){this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);
+this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"sketch"==e?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):
+"default"==e&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=
+e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;
+f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;"sketch"==e?(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="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,
+10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};
+EditorUi.prototype.switchCssForTheme=function(e){"sketch"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"sketch"==
+e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(e){if("sketch"==e&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),k=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));e=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";k.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",e);
+this.actions.get("redo").addListener("stateChanged",e);e();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(e){if("sketch"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var k=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var z=null!=this.pages?this.pages.length:1,t=this.getPageIndex(this.currentPage);t=null!=t?t+1:1;var B=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+t+"/"+z+")"+(null!=B?" ["+B+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
+k);this.editor.addListener("pagesPatched",k);k();e.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));k=this.createMenu("viewZoom",Editor.plusImage);k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(k);mxUtils.bind(this,function(z){mxEvent.addListener(z,
+"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var t=mxUtils.bind(this,function(){z.innerText="";mxUtils.write(z,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);this.editor.addListener("resetGraphView",t);this.editor.addListener("pageSelected",
+t)})(k);e.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("sketch"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var z=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);z.style.paddingLeft="12px";z.style.backgroundSize="";z.style.width="26px";z.style.height="30px";z.style.opacity="0.7";var t=this.createMenu("insert",Editor.plusImage);t.style.backgroundSize="";t.style.marginBottom="4px";t.style.display="block";t.style.width="30px";t.style.height="30px";t.style.padding="4px";t.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){var O=function(y,ia,da,ja){null!=ia&&y.setAttribute("title",ia);y.style.cursor="pointer";y.style.margin=
+"8px 0px";y.style.display="block";f.appendChild(y);null!=ja&&(y.style.position="relative",y.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),y.appendChild(ia));return y};O(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");O(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");O(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");O(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var J=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(new mxPoint(0,0),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,0),!1);J.geometry.points=
+[];J.geometry.relative=!0;J.edge=!0;O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,J.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");J=J.clone();J.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";J.geometry.width=this.editor.graph.defaultEdgeLength+20;J.geometry.setTerminalPoint(new mxPoint(0,20),!0);J.geometry.setTerminalPoint(new mxPoint(J.geometry.width,20),!1);
+O(this.sidebar.createEdgeTemplateFromCells([J],J.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));O(z,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(t)}"1"!=urlParams.embedInline&&f.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(k),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"sketch"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="4px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="relative",e.style.height="21px",e.style.width="21px",e.style.right="0px",e.style.top="3px",this.sketchMenubarElt.appendChild(e))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),
+this.statusContainer.style.marginTop=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.right="14px",e.style.top="5px",document.body.appendChild(e)))};EditorUi.prototype.createMenu=function(e,f){var k=this.menus.get(e),z=this.menubar.addMenu(mxResources.get(e),k.funct);z.className="geToolbarButton";z.style.display="inline-block";z.style.cursor="pointer";z.style.height=
+"24px";z.setAttribute("title",mxResources.get(e));this.menus.menuCreated(k,z,"geMenuItem");null!=f&&(z.style.backgroundImage="url("+f+")",z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="100% 100%",z.style.width="24px",z.innerText="");return z};EditorUi.prototype.createMenuItem=function(e,f,k){var z=document.createElement("a");z.className="geToolbarButton";z.setAttribute("title",mxResources.get(e));z.style.backgroundImage="url("+f+")";z.style.backgroundPosition=
+"center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width="24px";z.style.height="24px";var t=this.actions.get(e);null!=t&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(B){B.preventDefault()})),mxEvent.addListener(z,"click",function(B){"disabled"!=z.getAttribute("disabled")&&t.funct(B);mxEvent.consume(B)}),k||(e=function(){t.isEnabled()?
+(z.removeAttribute("disabled"),z.style.cursor="pointer"):(z.setAttribute("disabled","disabled"),z.style.cursor="default");z.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),t.addListener("stateChanged",e),e()));return z};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?
+580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,k,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=
+function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var N=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top=
+"0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=e?e:1)&&this.editor.graph.sizeDidChange()):N.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?
+66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }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); "+
@@ -3710,456 +3712,456 @@ mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
-p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);null==urlParams.dark&&(mxSettings.settings.darkMode=e,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var R=document.createElement("link");R.setAttribute("rel","stylesheet");R.setAttribute("href",STYLE_PATH+"/dark.css");
+R.setAttribute("charset","UTF-8");R.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
-(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
+(e=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
-null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
-d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
-"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
-f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
-f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
-mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
-mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
-this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
-function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
-EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
-this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
-0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
-decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
-x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
-t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
-299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
-document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
-200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
-this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
-function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
-d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
-I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
-pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
-null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
-(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
-!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
-H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
-[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
-"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
-this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
-ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
-xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
-function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
-data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
-return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
-X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
-ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
-mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
-sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
-mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
-null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
-null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
-H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
-try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
-"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
-mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
-mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
-this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
-mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
-mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
-f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
-null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
-T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
-g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
-Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
-"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
-D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
-Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
-H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
-null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
-parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
-0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
-!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
-null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
-mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
-"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
-Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
-ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
-x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
-this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
-this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
-this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
-this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
-this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
-this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
-t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
-mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
-!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
-!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
-ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
-localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
-f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
-X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
-mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
-"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
-function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
-ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
-!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
-Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
-ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
-I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
-0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
-mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
-(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
-H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
-mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
-mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,m=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,m);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==R.parentNode&&document.getElementsByTagName("head")[0].appendChild(R):
+null!=R.parentNode&&R.parentNode.removeChild(R)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
+e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"sketch"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
+null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"sketch"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var k=e.indexOf(",");0<k&&(f=this.getPageById(e.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(z,t){try{this.spinner.stop();var B=this.createImageDataUri(z,f,"png"),I=parseInt(t.getAttribute("width")),O=parseInt(t.getAttribute("height"));this.writeImageToClipboard(B,I,O,mxUtils.bind(this,function(J){this.handleError(J)}))}catch(J){this.handleError(J)}}),null,null,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(z){this.handleError(z)}};EditorUi.prototype.writeImageToClipboard=function(e,f,k,z){var t=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](z)};EditorUi.prototype.copyCells=function(e,f){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var z=
+mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(z));mxUtils.setTextContent(e,encodeURIComponent(t));f?(k.removeCells(z,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,k,z){var t=this.editor.graph,B=null;t.lastPasteXml==e?t.pasteCounter++:(t.lastPasteXml=e,t.pasteCounter=0);var I=t.pasteCounter*t.gridSize;if(k||this.isCompatibleString(e))B=this.importXml(e,I,I),t.setSelectionCells(B);else if(f&&1==t.getSelectionCount()){I=t.getStartEditingCell(t.getSelectionCell(),z);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==t.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,
+e,[I]);else{t.model.beginUpdate();try{t.labelChanged(I,e),Graph.isLink(e)&&t.setLinkForCell(I,e)}finally{t.model.endUpdate()}}t.setSelectionCell(I)}else B=t.getInsertPoint(),t.isMouseInsertPoint()&&(I=0,t.lastPasteXml==e&&0<t.pasteCounter&&t.pasteCounter--),B=this.insertTextAt(e,B.x+I,B.y+I,!0),t.setSelectionCells(B);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(e,f,k,z){if(!mxEvent.isConsumed(e)){var t=f,B=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),O=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var J=decodeURIComponent(I);this.isCompatibleString(J)&&(O=!0,I=J)}catch(qa){}O=O?null:e.clipboardData.getData("text/html");null!=O&&0<O.length?(t=this.parseHtmlData(O),B="text/plain"!=t.getAttribute("data-type")):null!=I&&0<I.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,
+O))}I=t.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))k=I[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(qa){var sa=this.editor.graph;sa.lastPasteXml==qa?sa.pasteCounter++:(sa.lastPasteXml=qa,sa.pasteCounter=0);var L=sa.pasteCounter*sa.gridSize;sa.setSelectionCells(this.importXml(qa,L,L));sa.scrollCellToVisible(sa.getSelectionCell())}),mxUtils.bind(this,
+function(qa){this.handleError(qa)})),mxEvent.consume(e));else{var y=B?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText),ia=!1;try{var da=y.lastIndexOf("%3E");0<=da&&da<y.length-3&&(y=y.substring(0,da+3))}catch(qa){}try{I=t.getElementsByTagName("span"),(J=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(J)||0==J.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,y=J)}catch(qa){}try{if(null!=
+y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,z,ia,e)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(y,z,ia,e);try{mxEvent.consume(e)}catch(qa){}}else if(!k){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,k=0;k<e.length;k++)mxEvent.addListener(e[k],"dragleave",function(z){null!=f&&(f.parentNode.removeChild(f),f=null);z.stopPropagation();z.preventDefault()}),mxEvent.addListener(e[k],"dragover",mxUtils.bind(this,function(z){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());z.stopPropagation();z.preventDefault()})),
+mxEvent.addListener(e[k],"drop",mxUtils.bind(this,function(z){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<z.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(z.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z)):this.openFiles(z.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(z);if(null==t){var B=null!=z.dataTransfer?z.dataTransfer:
+z.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?t=B.getData("Text"):(t=null,t=0<=mxUtils.indexOf(B.types,"text/uri-list")?z.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=t&&0<t.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(t),B=B.getElementsByTagName("img"),0<B.length&&(t=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(t=B.getData("text/plain"))),
+null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(t):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}z.stopPropagation();z.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,k=0;if(null==e){var z=document.body;var t=document.documentElement;var B=(z.clientWidth||t.clientWidth)-3;z=Math.max(z.clientHeight||0,t.clientHeight)-3}else f=e.offsetTop,k=e.offsetLeft,B=e.clientWidth,
+z=e.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=f+"px";t.style.left=k+"px";t.style.width=Math.max(0,B-3)+"px";t.style.height=Math.max(0,z-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
+var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var k=new mxCodec(f.ownerDocument),z=new mxGraphModel;k.decode(f,z);f=z.getChildAt(z.getRoot(),0);for(k=0;k<z.getChildCount(f);k++)e.push(z.getChildAt(f,k))}return e};EditorUi.prototype.openFileHandle=function(e,f,k,z,t){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var B=mxUtils.bind(this,function(O){f=0<=
+f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==O.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,O,f))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(O,f,z)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(k,mxUtils.bind(this,function(O){this.spinner.stop();
+B(O)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(O){4==O.readyState&&(this.spinner.stop(),200<=O.status&&299>=O.status?B(O.responseText):this.handleError({message:mxResources.get(413==O.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(O){this.spinner.stop();this.openLocalFile(O,f,z)}),mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,z);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(O){this.spinner.stop();B(O)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,z)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(t=null,z=!0,
+e=I)}this.spinner.stop();this.openLocalFile(e,f,z,t,null!=t?k:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(z){var t=new FileReader;t.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,z.name,z,f)}catch(I){this.handleError(I)}});t.onerror=mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B);window.openFile=null});"image"!==z.type.substring(0,
+5)&&"application/pdf"!==z.type||"image/svg"===z.type.substring(0,9)?t.readAsText(z):t.readAsDataURL(z)})(e[k])};EditorUi.prototype.openLocalFile=function(e,f,k,z,t){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var O=mxUtils.parseXml(e);null!=O&&(this.editor.setGraphXml(O.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,k,z,t))});if(null!=
+e&&0<e.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=z)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var k in e)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function k(I){if(null!=
+I){var O=I.lastIndexOf(".");0<O&&(I=I.substring(O+1,I.length));null==f[I]&&(f[I]=!0)}}var z=this.editor.graph,t=z.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));z.model.isEdge(e)&&(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=z.model.getChildCount(e);for(var B=0;B<t;B++)this.addBasenamesForCell(z.model.getChildAt(e,B),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
+!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,z,t){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(t)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.model.cells,O;for(O in I){var J=I[O];null!=J&&null!=J.style&&(J.style+=";sketch=1;"+(-1==J.style.indexOf("fontFamily=")||-1<J.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=z?z:!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(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var z=f.background;if(null==z||z==mxConstants.NONE)z=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,z,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(e){var f=null,k=!1,z=!1,t=null,B=mxUtils.bind(this,function(J,y){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,B);mxEvent.addListener(window,"message",mxUtils.bind(this,function(J){if(J.source==(window.opener||window.parent)){var y=J.data,ia=null,da=mxUtils.bind(this,function(pa){if(null!=pa&&"function"===
+typeof pa.charAt&&"<"!=pa.charAt(0))try{Editor.isPngDataUrl(pa)?pa=Editor.extractGraphModelFromPng(pa):"data:image/svg+xml;base64,"==pa.substring(0,26)?pa=atob(pa.substring(26)):"data:image/svg+xml;utf8,"==pa.substring(0,24)&&(pa=pa.substring(24)),null!=pa&&("%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Aa){}return pa});if("json"==urlParams.proto){var ja=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[J],"data",
+[y])}catch(pa){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var aa=new FilenameDialog(this,y.defaultValue||"",null!=
+y.okKey?mxResources.get(y.okKey):y.ok,function(pa){null!=pa?I.postMessage(JSON.stringify({event:"prompt",value:pa,message:y}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(aa.container,300,80,!0,!1);aa.init();return}if("draft"==y.action){var qa=da(y.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();
+I.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(aa.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&
+this.actions.get("exit").funct()}));try{aa.init()}catch(pa){I.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var sa=1==y.enableRecent,L=1==y.enableSearch,V=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var T=this.getCurrentUser(),Y=new TemplatesDialog(this,function(pa,Aa,xa){pa=pa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,
+name:Aa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=T?T.id:null,sa?mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,pa,Aa)}):null,L?mxUtils.bind(this,function(pa,Aa,xa,Ma){this.remoteInvoke("searchDiagrams",[pa,Ma],null,Aa,xa)}):null,mxUtils.bind(this,function(pa,Aa,xa){this.remoteInvoke("getFileContent",[pa.url],null,Aa,xa)}),null,
+V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}aa=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(pa,Aa,xa,Ma){pa=pa||this.emptyDiagramXml;null!=y.callback?I.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Aa,tempUrl:xa,libs:Ma,builtIn:!0,message:y}),"*"):
+(e(pa,J,pa!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,sa?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(pa,Aa){this.remoteInvoke("searchDiagrams",[pa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Aa,xa){I.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Aa,
+name:xa}),"*")}),null,null,V?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==y.withoutType);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(pa){this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==y.action){var W=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:W,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?
+this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var ka=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,ka):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=
+y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var q=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,S=mxUtils.bind(this,function(pa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
+y.format;Aa.message=y;Aa.data=pa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),ba=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==y.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);S(pa)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ca=mxUtils.bind(this,function(){if(null!=this.pages&&
+this.currentPage.getId()!=U){var pa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==U){Aa=this.updatePageRoot(this.pages[xa]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(La){return"page"==La?Aa.getName():"pagenumber"==La?1:pa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=y.layerIds){var Ma=F.model,Oa=Ma.getChildCells(Ma.getRoot()),Na={};for(xa=
+0;xa<y.layerIds.length;xa++)Na[y.layerIds[xa]]=!0;for(xa=0;xa<Oa.length;xa++)Ma.setVisible(Oa[xa],Na[Oa[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){ba(La.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){ba(null)}),null,null,y.scale,y.transparent,y.shadow,null,F,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(k=!0,this.setFileData(q),k=!1);ca()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":
+"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?S("data:image/png;base64,"+pa.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(ca=mxUtils.bind(this,function(){var pa=this.createLoadMessage("export");pa.message=y;if("html2"==y.format||
+"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();pa.xml=mxUtils.getXml(Aa);pa.data=this.getFileData(null,null,!0,null,null,null,Aa);pa.format=y.format}else if("html"==y.format)Aa=this.editor.getGraphXml(),pa.data=this.getHtml(Aa,this.editor.graph),pa.xml=mxUtils.getXml(Aa),pa.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=y.background?y.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);pa.xml=
+this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var xa=mxUtils.bind(this,function(Ma){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=Editor.createSvgDataUri(Ma);I.postMessage(JSON.stringify(pa),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,xa,null,null,y.embedImages,Aa,y.scale,y.border,y.shadow,y.keepTheme);
+else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(Ma){y.embedImages||null==y.embedImages?this.editor.convertImages(Ma,mxUtils.bind(this,
+function(Oa){xa(mxUtils.getXml(Oa))})):xa(mxUtils.getXml(Ma))}));return}I.postMessage(JSON.stringify(pa),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var ea=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ea.apply(this,arguments);ca()}}k=!0;this.setFileData(y.xml);k=!1;this.editor.graph.mathEnabled||ca()}else ca();return}if("load"==y.action){ja=y.toSketch;z=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=
+y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var na=Editor.sketchMode;this.doSetSketchMode(y.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(na=Editor.darkMode,this.doSetDarkMode(y.dark),na!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=
+y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var ra=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";ia=mxUtils.bind(this,function(){var pa=this.editor.graph,Aa=pa.maxFitScale;pa.maxFitScale=y.maxFitScale;pa.fit(2*ra);pa.maxFitScale=Aa;pa.container.scrollTop-=2*ra;pa.container.scrollLeft-=2*ra;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(pa){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var ya=this.getCurrentFile();null!=ya&&(qa=da(y.xml),null!=qa&&""!=qa&&ya.mergeFile(new LocalFile(this,qa),function(){I.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(pa){I.postMessage(JSON.stringify({event:"merge",message:y,error:pa}),"*")}))}else"remoteInvokeReady"==
+y.action?this.handleRemoteInvokeReady(I):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,J.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(pa){this.handleError(pa)}}var va=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Da=mxUtils.bind(this,function(pa,Aa){k=!0;
+try{e(pa,Aa,null,ja)}catch(xa){this.handleError(xa)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=va();z&&null==f&&(f=mxUtils.bind(this,function(xa,Ma){xa=va();xa==t||k||(Ma=this.createLoadMessage("autosave"),Ma.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));t=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=pa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=
+y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(da="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(pa){Da(pa,J)},mxUtils.bind(this,function(pa){this.handleError(pa)}),da)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,
+mxUtils.bind(this,function(pa){4==pa.readyState&&200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)&&Da(pa.responseText,J)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(pa){Da(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=da(y),Da(y,J)):this.loadDescriptor(y,mxUtils.bind(this,function(pa){Da(va(),J)}),
+mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");if("json"==urlParams.proto){var O=this.editor.graph.openLink;this.editor.graph.openLink=function(J,y,ia){O.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:J,target:y,allowOpener:ia}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.menubar&&"1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";e.style.position="absolute";e.style.paddingTop="2px";e.style.paddingLeft="8px";e.style.paddingBottom="2px";e.style.marginRight="12px";e.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):
+mxResources.get("saveAndExit");mxUtils.write(f,k);f.setAttribute("title",k);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));e.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),e.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
+mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),e.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,k),f.setAttribute("title",k),f.className="geBigButton geBigStandardButton",
+f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),e.appendChild(f));this.toolbar.container.appendChild(e);this.toolbar.staticElements.push(e)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
+null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var k=e.split("\n"),z=[],t=[],B=[],I={};if(0<k.length){var O={},J=this.editor.graph,y=null,ia=null,
+da=null,ja=null,aa=null,qa=null,sa=null,L="whiteSpace=wrap;html=1;",V=null,T=null,Y="",W="auto",ka="auto",q=!1,F=null,S=null,ba=40,U=40,ca=100,ea=0,na=mxUtils.bind(this,function(){null!=f?f(Fa):(J.setSelectionCells(Fa),J.scrollCellToVisible(J.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ra=J.getFreeInsertPoint(),ya=ra.x,va=ra.y;ra=va;var Da=null,pa="auto";T=null;for(var Aa=[],xa=null,Ma=null,Oa=0;Oa<k.length&&"#"==
+k[Oa].charAt(0);){e=k[Oa].replace(/\r$/,"");for(Oa++;Oa<k.length&&"\\"==e.charAt(e.length-1)&&"#"==k[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(k[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var La=mxUtils.trim(e.substring(1,Na)),Ba=mxUtils.trim(e.substring(Na+1));"label"==La?Da=J.sanitizeHtml(Ba):"labelname"==La&&0<Ba.length&&"-"!=Ba?aa=Ba:"labels"==La&&0<Ba.length&&"-"!=Ba?sa=JSON.parse(Ba):"style"==La?ia=Ba:"parentstyle"==La?L=Ba:"unknownStyle"==La&&"-"!=
+Ba?qa=Ba:"stylename"==La&&0<Ba.length&&"-"!=Ba?ja=Ba:"styles"==La&&0<Ba.length&&"-"!=Ba?da=JSON.parse(Ba):"vars"==La&&0<Ba.length&&"-"!=Ba?y=JSON.parse(Ba):"identity"==La&&0<Ba.length&&"-"!=Ba?V=Ba:"parent"==La&&0<Ba.length&&"-"!=Ba?T=Ba:"namespace"==La&&0<Ba.length&&"-"!=Ba?Y=Ba:"width"==La?W=Ba:"height"==La?ka=Ba:"collapsed"==La&&"-"!=Ba?q="true"==Ba:"left"==La&&0<Ba.length?F=Ba:"top"==La&&0<Ba.length?S=Ba:"ignore"==La?Ma=Ba.split(","):"connect"==La?Aa.push(JSON.parse(Ba)):"link"==La?xa=Ba:"padding"==
+La?ea=parseFloat(Ba):"edgespacing"==La?ba=parseFloat(Ba):"nodespacing"==La?U=parseFloat(Ba):"levelspacing"==La?ca=parseFloat(Ba):"layout"==La&&(pa=Ba)}}}if(null==k[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(k[Oa].replace(/\r$/,""));Na=e=null;La=[];for(Ba=0;Ba<ab.length;Ba++)V==ab[Ba]&&(e=Ba),T==ab[Ba]&&(Na=Ba),La.push(mxUtils.trim(ab[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Da&&(Da="%"+La[0]+"%");if(null!=Aa)for(var Xa=
+0;Xa<Aa.length;Xa++)null==O[Aa[Xa].to]&&(O[Aa[Xa].to]={});V=[];for(Ba=Oa+1;Ba<k.length;Ba++){var x=this.editor.csvToArray(k[Ba].replace(/\r$/,""));if(null==x){var H=40<k[Ba].length?k[Ba].substring(0,40)+"...":k[Ba];throw Error(H+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}J.model.beginUpdate();try{for(Ba=0;Ba<V.length;Ba++){x=V[Ba];var P=null,X=null!=e?Y+x[e]:null;k=!1;null!=X&&(P=J.model.getCell(X),k=null==P||0<=mxUtils.indexOf(z,P));var Z=new mxCell(Da,new mxGeometry(ya,
+ra,0,0),ia||"whiteSpace=wrap;html=1;");Z.collapsed=q;Z.vertex=!0;Z.id=X;null==P||k||J.model.setCollapsed(P,q);for(var fa=0;fa<x.length;fa++)J.setAttributeForCell(Z,La[fa],x[fa]),null==P||k||J.setAttributeForCell(P,La[fa],x[fa]);if(null!=aa&&null!=sa){var la=sa[Z.getAttribute(aa)];null!=la&&(J.labelChanged(Z,la),null==P||k||J.cellLabelChanged(P,la))}if(null!=ja&&null!=da){var za=da[Z.getAttribute(ja)];null!=za&&(Z.style=za)}J.setAttributeForCell(Z,"placeholders","1");Z.style=J.replacePlaceholders(Z,
+Z.style,y);null==P||k?J.fireEvent(new mxEventObject("cellsInserted","cells",[Z])):(J.model.setStyle(P,Z.style),0>mxUtils.indexOf(B,P)&&B.push(P),J.fireEvent(new mxEventObject("cellsInserted","cells",[P])));k=null!=P;P=Z;if(!k)for(Xa=0;Xa<Aa.length;Xa++)O[Aa[Xa].to][P.getAttribute(Aa[Xa].to)]=P;null!=xa&&"link"!=xa&&(J.setLinkForCell(P,P.getAttribute(xa)),J.setAttributeForCell(P,xa,null));var ua=this.editor.graph.getPreferredSizeForCell(P);T=null!=Na?J.model.getCell(Y+x[Na]):null;if(P.vertex){H=null!=
+T?0:ya;Oa=null!=T?0:va;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=H+parseFloat(P.getAttribute(F)));null!=S&&null!=P.getAttribute(S)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(S)));var oa="@"==W.charAt(0)?P.getAttribute(W.substring(1)):null;P.geometry.width=null!=oa&&"auto"!=oa?parseFloat(P.getAttribute(W.substring(1))):"auto"==W||"auto"==oa?ua.width+ea:parseFloat(W);var ta="@"==ka.charAt(0)?P.getAttribute(ka.substring(1)):null;P.geometry.height=null!=ta&&"auto"!=ta?parseFloat(ta):"auto"==ka||
+"auto"==ta?ua.height+ea:parseFloat(ka);ra+=P.geometry.height+U}k?(null==I[X]&&(I[X]=[]),I[X].push(P)):(z.push(P),null!=T?(T.style=J.replacePlaceholders(T,L,y),J.addCell(P,T),t.push(T)):B.push(J.addCell(P)))}for(Ba=0;Ba<t.length;Ba++)oa="@"==W.charAt(0)?t[Ba].getAttribute(W.substring(1)):null,ta="@"==ka.charAt(0)?t[Ba].getAttribute(ka.substring(1)):null,"auto"!=W&&"auto"!=oa||"auto"!=ka&&"auto"!=ta||J.updateGroupBounds([t[Ba]],ea,!0);var Ea=B.slice(),Fa=B.slice();for(Xa=0;Xa<Aa.length;Xa++){var Pa=
+Aa[Xa];for(Ba=0;Ba<z.length;Ba++){P=z[Ba];var Ra=mxUtils.bind(this,function(Ya,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=O[fb.to][hb[qb]];if(null==kb&&null!=qa){kb=new mxCell(hb[qb],new mxGeometry(ya,va,0,0),qa);kb.style=J.replacePlaceholders(Za,kb.style,y);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+ea;kb.geometry.height=ib.height+ea;O[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];B.push(J.addCell(kb))}if(null!=
+kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=J.replacePlaceholders(Za,fb.sourcelabel,y)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+J.replacePlaceholders(kb,fb.targetlabel,y));var ub="target"==fb.placeholders==!fb.invert?kb:Ya;ub=null!=fb.style?J.replacePlaceholders(ub,fb.style,y):J.createCurrentEdgeStyle();ib=J.insertEdge(null,null,ib||"",fb.invert?kb:Ya,fb.invert?
+Ya:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=J.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Ya,nb.value,y));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Fa.push(ib);mxUtils.remove(fb.invert?
+Ya:kb,Ea)}}}});Ra(P,P,Pa);if(null!=I[P.id])for(fa=0;fa<I[P.id].length;fa++)Ra(P,I[P.id][fa],Pa)}}if(null!=Ma)for(Ba=0;Ba<z.length;Ba++)for(P=z[Ba],fa=0;fa<Ma.length;fa++)J.setAttributeForCell(P,mxUtils.trim(Ma[fa]),null);if(0<B.length){var Ca=new mxParallelEdgeLayout(J);Ca.spacing=ba;Ca.checkOverlap=!0;var Ja=function(){0<Ca.spacing&&Ca.execute(J.getDefaultParent());for(var Ya=0;Ya<B.length;Ya++){var Za=J.getCellGeometry(B[Ya]);Za.x=Math.round(J.snap(Za.x));Za.y=Math.round(J.snap(Za.y));"auto"==W&&
+(Za.width=Math.round(J.snap(Za.width)));"auto"==ka&&(Za.height=Math.round(J.snap(Za.height)))}};if("["==pa.charAt(0)){var Qa=na;J.view.validate();this.executeLayouts(J.createLayouts(JSON.parse(pa)),function(){Ja();Qa()});na=null}else if("circle"==pa){var $a=new mxCircleLayout(J);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Ya){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){$a.execute(J.getDefaultParent());Ja()},
+!0,na);na=null}else if("horizontaltree"==pa||"verticaltree"==pa||"auto"==pa&&Fa.length==2*B.length-1&&1==Ea.length){J.view.validate();var cb=new mxCompactTreeLayout(J,"horizontaltree"==pa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(J.getDefaultParent(),0<Ea.length?Ea[0]:null)},!0,na);na=null}else if("horizontalflow"==pa||"verticalflow"==pa||"auto"==pa&&1==Ea.length){J.view.validate();var db=new mxHierarchicalLayout(J,"horizontalflow"==pa?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=ba;db.interRankCellSpacing=ca;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(J.getDefaultParent(),Fa);J.moveCells(Fa,ya,va)},!0,na);na=null}else if("orgchart"==pa){J.view.validate();var rb=new mxOrgChartLayout(J,2,ca,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Ya){return mb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){rb.execute(J.getDefaultParent());Ja()},!0,na);na=
+null}else if("organic"==pa||"auto"==pa&&Fa.length>B.length){J.view.validate();var vb=new mxFastOrganicLayout(J);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Ya){return Bb.apply(this,arguments)||0>mxUtils.indexOf(B,Ya)};this.executeLayout(function(){vb.execute(J.getDefaultParent());Ja()},!0,na);na=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=na&&na()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(e){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var k="?",z;for(z in urlParams)0>mxUtils.indexOf(e,z)&&null!=urlParams[z]&&(f+=k+z+"="+urlParams[z],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+z;for(z in urlParams)0>mxUtils.indexOf(k,z)&&(e=0==f?e+"?":e+"&",null!=urlParams[z]&&(e+=z+"="+urlParams[z],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,k,z,t){e=new LinkDialog(this,e,f,k,!0,z,t);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!k);
+this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var G=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(e){var f=G.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var M=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){M.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),z=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(z);this.actions.get("autosave").setEnabled(null!=
+f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(z);this.actions.get("editData").setEnabled(e.isEnabled());this.actions.get("shadowVisible").setEnabled(z);this.actions.get("connectionArrows").setEnabled(z);this.actions.get("connectionPoints").setEnabled(z);this.actions.get("copyStyle").setEnabled(z&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(z&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(z);
+this.actions.get("createRevision").setEnabled(z);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(z&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(z&&null!=
+e&&null!=e.shape&&null!=e.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(e,f,k,z,t,B,I,O){var J=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");
+else if("svg"==k)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(J.getSvg(z,t,B)),"image/svg+xml");else{var y=e.getFileData(!0,null,null,null,null,!0),ia=J.getGraphBounds(),da=Math.floor(ia.width*t/J.view.scale),ja=Math.floor(ia.height*t/J.view.scale);if(y.length<=MAX_REQUEST_SIZE&&da*ja<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!e.isExportToCanvas()){var aa={globalVars:J.getExportVariables()};O&&(aa.grid={size:J.gridSize,steps:J.view.gridSteps,color:J.view.gridColor});e.saveRequest(f,
+k,function(qa,sa){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(sa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<I?"&dpi="+I:"")+"&bg="+(null!=z?z:"none")+"&w="+da+"&h="+ja+"&border="+B+"&xml="+encodeURIComponent(y))})}else"png"==k?e.exportImage(t,null==z||"none"==z,!0,!1,!1,B,!0,!1,null,O,I):e.exportImage(t,!1,!0,!1,!1,B,!0,!1,"jpeg",O);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var z=e;this.currentPage!=this.pages[k]&&(z=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[k]),z.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+z.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},k=document.createElement("div");
+k.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxUtils.htmlEntities(e));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(z);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var O=I[e];if("R"==
+O.substring(0,1)){var J=JSON.parse(decodeURIComponent(O.substring(1)));B[J[0]]={id:J[0],title:J[1],downloadUrl:J[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){t.innerText="";if(0==y.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<y.length;ia++){var da=y[ia];B[da.id]&&(f[da.id]=da);var ja=this.addCheckbox(t,da.title,B[da.id]);(function(aa,qa){mxEvent.addListener(qa,
+"change",function(){this.checked?f[aa.id]=aa:delete f[aa.id]})})(da,ja)}},mxUtils.bind(this,function(y){t.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));t.appendChild(ia)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,
+ia;for(ia in f)null==B[ia]&&(y++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ja){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ja,da))}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[ia]));
+0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(e){var f=e.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):k.callback&&k.callback.apply(this,
+e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,k,z,t){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),O=mxUtils.bind(this,function(){window.clearTimeout(I);B&&z.apply(this,arguments)}),J=mxUtils.bind(this,function(){window.clearTimeout(I);B&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:O,
+error:J});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var k=mxUtils.bind(this,function(y,ia){var da={event:"remoteInvokeResponse",msgMarkers:e.msgMarkers};null!=ia?da.error={errResp:ia}:null!=y&&(da.resp=y);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var z=e.funtionName,t=this.remoteInvokableFns[z];if(null!=t&&
+"function"===typeof this[z]){if(t.allowedDomains){for(var B=!1,I=0;I<t.allowedDomains.length;I++)if(f=="https://"+t.allowedDomains[I]){B=!0;break}if(!B){k(null,"Invalid Call: "+z+" is not allowed.");return}}var O=e.functionArgs;Array.isArray(O)||(O=[]);if(t.isAsync)O.push(function(){k(Array.prototype.slice.apply(arguments))}),O.push(function(y){k(null,y||"Unkown Error")}),this[z].apply(this,O);else{var J=this[z].apply(this,O);k([J])}}else k(null,"Invalid Call: "+z+" is not found.")}catch(y){k(null,
+"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var z=k.open("database",2);z.onupgradeneeded=function(t){try{var B=z.result;1>t.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};z.onsuccess=mxUtils.bind(this,function(t){var B=z.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var O=document.createElement("iframe");O.style.display="none";O.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(O);var J=!0,y=!1,ia,da=0,ja=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){da++;qa()}),qa=mxUtils.bind(this,function(){try{if(da>=ia.length)ja();else{var L=ia[da];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):aa()}),aa)}}catch(V){console.log(V)}}),sa=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],aa,aa,["filesInfo","files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==O.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(T){}"init"==V.event?(O.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||y||(J?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],J=!1,qa()):ja():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?sa(V.resp[0]):aa())}}catch(T){console.log(T)}});window.addEventListener("message",I)}})));e(B);B.onversionchange=function(){B.close()}});z.onerror=f;z.onblocked=function(){}}catch(t){null!=f&&f(t)}else null!=f&&f()}else e(this.database)};
+EditorUi.prototype.setDatabaseItem=function(e,f,k,z,t){this.openDatabase(mxUtils.bind(this,function(B){try{t=t||"objects";Array.isArray(t)||(t=[t],e=[e],f=[f]);var I=B.transaction(t,"readwrite");I.oncomplete=k;I.onerror=z;for(B=0;B<t.length;B++)I.objectStore(t[B]).put(null!=e&&null!=e[B]?{key:e[B],data:f[B]}:f[B])}catch(O){null!=z&&z(O)}}),z)};EditorUi.prototype.removeDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){z=z||"objects";Array.isArray(z)||(z=[z],e=[e]);t=t.transaction(z,
+"readwrite");t.oncomplete=f;t.onerror=k;for(var B=0;B<z.length;B++)t.objectStore(z[B]).delete(e[B])}),k)};EditorUi.prototype.getDatabaseItem=function(e,f,k,z){this.openDatabase(mxUtils.bind(this,function(t){try{z=z||"objects";var B=t.transaction([z],"readonly").objectStore(z).get(e);B.onsuccess=function(){f(B.result)};B.onerror=k}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],
+"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),B=[];t.onsuccess=function(I){null==I.target.result?e(B):(B.push(I.target.result.value),I.target.result.continue())};t.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,k){this.openDatabase(mxUtils.bind(this,function(z){try{k=k||"objects";var t=z.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){e(t.result)};t.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var k=this.getCurrentFile();null!=k?k.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,k){var z=this.getCurrentFile();
+null!=z?z.addComment(e,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=function(e,f){var k=this.getCurrentFile();return null!=k?k.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();
+return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,k,z,t,B,I,O){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,k,z,t,B,I,O)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,k,z,t,B,I,O,J,y,ia,da,ja,aa,qa,sa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,k,z)};EditorUi.prototype.convertImageToDataUri=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=
+function(e,f,k,z){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,k,z)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,f,k,z,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,k,z,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),z=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<z.length){var t="<mxfile "===z.substring(0,8)||"<?xml"===z.substring(0,5)||"\x3c!--[if IE]>"===z.substring(0,12);z="<mxlibrary>"===z.substring(0,11);(t||z)&&e.push(k)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,g,l,D,p){function E(){for(var aa=I.getElementsByTagName("div"),qa=0,sa=0;sa<aa.length;sa++)"none"!=aa[sa].style.display&&aa[sa].parentNode==I&&qa++;O.style.display=0==qa?"block":"none"}function N(aa,qa,sa,L){function V(){qa.removeChild(W);qa.removeChild(ka);Y.style.display="block";T.style.display="block"}z={div:qa,comment:aa,saveCallback:sa,deleteOnCancel:L};var T=qa.querySelector(".geCommentTxt"),Y=qa.querySelector(".geCommentActionsList"),W=document.createElement("textarea");
+W.className="geCommentEditTxtArea";W.style.minHeight=T.offsetHeight+"px";W.value=aa.content;qa.insertBefore(W,T);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(qa.parentNode.removeChild(qa),E()):V();z=null});q.className="geCommentEditBtn";ka.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){T.innerText="";aa.content=W.value;mxUtils.write(T,aa.content);V();sa(aa);z=null});mxEvent.addListener(W,
+"keydown",mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(F.click(),mxEvent.consume(S)):27==S.keyCode&&(q.click(),mxEvent.consume(S)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(F);qa.insertBefore(ka,T);Y.style.display="none";T.style.display="none";W.focus()}function R(aa,qa){qa.innerText="";aa=new Date(aa.modifiedDate);var sa=b.timeSince(aa);null==sa&&(sa=mxResources.get("lessThanAMinute"));
+mxUtils.write(qa,mxResources.get("timeAgo",[sa],"{1} ago"));qa.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString())}function G(aa){var qa=document.createElement("img");qa.className="geCommentBusyImg";qa.src=IMAGE_PATH+"/spin.gif";aa.appendChild(qa);aa.busyImg=qa}function M(aa){aa.style.border="1px solid red";aa.removeChild(aa.busyImg)}function Q(aa){aa.style.border="";aa.removeChild(aa.busyImg)}function e(aa,qa,sa,L,V){function T(U,ca,ea){var na=document.createElement("li");na.className=
+"geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,U);na.appendChild(ra);mxEvent.addListener(ra,"click",function(ya){ca(ya,aa);ya.preventDefault();mxEvent.consume(ya)});ba.appendChild(na);ea&&(na.style.display="none")}function Y(){function U(na){ca.push(ea);if(null!=na.replies)for(var ra=0;ra<na.replies.length;ra++)ea=ea.nextSibling,U(na.replies[ra])}var ca=[],ea=ka;U(aa);return{pdiv:ea,replies:ca}}function W(U,ca,ea,na,ra){function ya(){G(Aa);
+aa.addReply(pa,function(xa){pa.id=xa;aa.replies.push(pa);Q(Aa);ea&&ea()},function(xa){va();M(Aa);b.handleError(xa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,ra)}function va(){N(pa,Aa,function(xa){ya()},!0)}var Da=Y().pdiv,pa=b.newComment(U,b.getCurrentUser());pa.pCommentId=aa.id;null==aa.replies&&(aa.replies=[]);var Aa=e(pa,aa.replies,Da,L+1);ca?va():ya()}if(V||!aa.isResolved){O.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";
+ka.setAttribute("data-commentId",aa.id);ka.style.marginLeft=20*L+5+"px";aa.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=aa.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,
+aa.user.displayName||"");F.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",aa.id);R(aa,S);F.appendChild(S);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,aa.content||"");ka.appendChild(q);aa.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var ba=document.createElement("ul");ba.className="geCommentActionsList";q.appendChild(ba);f||aa.isLocked||0!=
+L&&!k||T(mxResources.get("reply"),function(){W("",!0)},aa.isResolved);F=b.getCurrentUser();null==F||F.id!=aa.user.id||f||aa.isLocked||(T(mxResources.get("edit"),function(){function U(){N(aa,ka,function(){G(ka);aa.editComment(aa.content,function(){Q(ka)},function(ca){M(ka);U();b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},aa.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(ka);aa.deleteComment(function(U){if(!0===
+U){U=ka.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var ca=ka.querySelectorAll(".geCommentAction");for(U=0;U<ca.length;U++)ca[U].parentNode.removeChild(ca[U]);Q(ka);ka.style.opacity="0.5"}else{ca=Y(aa).replies;for(U=0;U<ca.length;U++)I.removeChild(ca[U]);for(U=0;U<qa.length;U++)if(qa[U]==aa){qa.splice(U,1);break}O.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){M(ka);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+aa.isResolved));f||aa.isLocked||0!=L||T(aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function ca(){var ea=U.target;ea.innerText="";aa.isResolved=!aa.isResolved;mxUtils.write(ea,aa.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=aa.isResolved?"none":"",ra=Y(aa).replies,ya=Editor.isDarkMode()?"transparent":aa.isResolved?"ghostWhite":"white",va=0;va<ra.length;va++){ra[va].style.backgroundColor=ya;for(var Da=ra[va].querySelectorAll(".geCommentAction"),
+pa=0;pa<Da.length;pa++)Da[pa]!=ea.parentNode&&(Da[pa].style.display=na);ia||(ra[va].style.display="none")}E()}aa.isResolved?W(mxResources.get("reOpened")+": ",!0,ca,!1,!0):W(mxResources.get("markedAsResolved"),!1,ca,!0)});ka.appendChild(q);null!=sa?I.insertBefore(ka,sa.nextSibling):I.appendChild(ka);for(sa=0;null!=aa.replies&&sa<aa.replies.length;sa++)q=aa.replies[sa],q.isResolved=aa.isResolved,e(q,aa.replies,null,L+1,V);null!=z&&(z.comment.id==aa.id?(V=aa.content,aa.content=z.comment.content,N(aa,
+ka,z.saveCallback,z.deleteOnCancel),aa.content=V):null==z.comment.id&&z.comment.pCommentId==aa.id&&(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return ka}}var f=!b.canComment(),k=b.canReplyToReplies(),z=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";t.appendChild(I);var O=document.createElement("span");O.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(O,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=B;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var y=B.cloneNode();y.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(y,"click",function(aa){function qa(){N(sa,L,function(V){G(L);b.addComment(V,function(T){V.id=T;da.push(V);Q(L)},function(T){M(L);qa();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),L=e(sa,da,null,0);
+qa();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y)}y=B.cloneNode();y.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';y.setAttribute("title",mxResources.get("showResolved"));y.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(y,"click",function(aa){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();aa.preventDefault();mxEvent.consume(aa)});J.appendChild(y);b.commentsRefreshNeeded()&&(y=B.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',y.setAttribute("title",mxResources.get("refresh")),y.className="geAdaptiveAsset",mxEvent.addListener(y,"click",function(aa){ja();aa.preventDefault();mxEvent.consume(aa)}),J.appendChild(y));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(aa){p();aa.preventDefault();
+mxEvent.consume(aa)}),J.appendChild(B));t.appendChild(J);var da=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var aa=z.div.querySelector(".geCommentEditTxtArea"),qa=z.div.querySelector(".geCommentEditBtns");z.comment.content=aa.value;aa.parentNode.removeChild(aa);qa.parentNode.removeChild(qa)}catch(sa){b.handleError(sa)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(sa){function L(V){if(null!=V){V.sort(function(Y,W){return new Date(Y.modifiedDate)-new Date(W.modifiedDate)});for(var T=0;T<V.length;T++)L(V[T].replies)}}sa.sort(function(V,T){return new Date(V.modifiedDate)-new Date(T.modifiedDate)});I.innerText="";I.appendChild(O);O.style.display="block";da=sa;for(sa=0;sa<da.length;sa++)L(da[sa].replies),e(da[sa],da,null,0,ia);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&
+(I.appendChild(z.div),N(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(sa){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;J=mxUtils.bind(this,function(){function aa(T){var Y=sa[T.id];if(null!=Y)for(R(T,Y),Y=0;null!=T.replies&&Y<T.replies.length;Y++)aa(T.replies[Y])}if(this.window.isVisible()){for(var qa=I.querySelectorAll(".geCommentDate"),
+sa={},L=0;L<qa.length;L++){var V=qa[L];sa[V.getAttribute("data-commentId")]=V}for(L=0;L<da.length;L++)aa(da[L])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=new mxWindow(mxResources.get("comments"),t,d,g,l,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,g,l,D,p,E,N,R,G,M){var Q=document.createElement("div");Q.style.textAlign="center";M=null!=M?M:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=M+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=G&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",G),e.appendChild(d),Q.appendChild(e));G=document.createElement("div");
+G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=N&&(p.innerHTML=N+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var k=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=g&&
+g(f.checked)});G.appendChild(k);null!=E?(k.innerHTML=E+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||G.appendChild(p);Q.appendChild(G);R?(G.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),
+e.appendChild(D),Q.appendChild(e),mxEvent.addListener(D,"click",function(z){f.checked=!f.checked;mxEvent.consume(z)})):G.style.marginTop="12px";this.init=function(){k.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,g){this.ui=b;this.page=d;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,d,g){this.ui=b;this.oldIndex=d;this.newIndex=g}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,d,g){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=g&&(d.viewState=g,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,g=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);
+g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();g.view.validate();g.blockMathRender=!0;g.sizeDidChange();g.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,g.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,d,g,l,D){SelectPage.call(this,b,g);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=D}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
-this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
-p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
-Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
-JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){d=g;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var g=0;g<d.length;g++)if(d[g].getId()==b)return d[g];return null};
+EditorUi.prototype.createImageForPageLink=function(b,d,g){var l=b.indexOf(","),D=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(D=this.getImageForPage(l,d,g),D.originalSrc=b));null==D&&(D={originalSrc:b});return D};
+EditorUi.prototype.getImageForPage=function(b,d,g){g=null!=g?g:this.editor.graph;var l=g.getGlobalVariable,D=this.createTemporaryGraph(g.getStylesheet());D.defaultPageBackgroundColor=g.defaultPageBackgroundColor;D.shapeBackgroundColor=g.shapeBackgroundColor;D.shapeForegroundColor=g.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);D.getGlobalVariable=function(N){return"pagenumber"==N?p+1:"page"==N&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(D.container);
+this.updatePageRoot(b);D.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";g=D.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=D.getGraphBounds();document.body.removeChild(D.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(g)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var D=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";D!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var g=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var D=this.currentPage;null!=D&&D!=g&&(null==D.viewState||null==D.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+D.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+D.viewState.scrollTop),g=D);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,
+p){D=p.getProperty("edit").changes;for(p=0;p<D.length;p++)if(D[p]instanceof SelectPage||D[p]instanceof RenamePage||D[p]instanceof MovePage||D[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,d,g){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(g))};
+Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),D=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),N=b.getAttribute("extFonts");if(N)try{N=N.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}})}catch(R){console.log("ExtFonts format error: "+R.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(l)||isNaN(D)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,D),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:N||[]}};
+Graph.prototype.saveViewState=function(b,d,g,l){g||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(d.setAttribute("pageWidth",g.width),d.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
+JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(D){return D.name+"^"+D.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var m=document.getElementById("extFont_"+k[e].name);null!=m&&m.parentNode.removeChild(m)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
+Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var g=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=g)for(d=0;d<g.length;d++){var l=document.getElementById("extFont_"+g[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;m=!0;for(C=0;C<k.length;C++)if(k[C].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};
-EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
-e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var m=this.editor.graph.model.createUndoableEdit();m.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();m.add(C);m.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",m))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
-EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
+Graph.prototype.addExtFont=function(b,d,g){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var D=document.createElement("style");D.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));D.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(D)}if(!g){null==
+this.extFonts&&(this.extFonts=[]);g=this.extFonts;l=!0;for(D=0;D<g.length;D++)if(g[D].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var g=Editor.extractParserError(d);if(g)throw Error(g);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),g=new mxCodec(d.ownerDocument),b.root=g.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(g=Editor.extractParserError(d))throw Error(g);null!=d&&(b.graphModelNode=
+d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,d,g){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var D=new SelectPage(this,b,g);D.execute();l.add(D);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var g=this.pages[d].getName();null!=g&&0<g.length&&(b[g]=g)}d=this.pages.length;do g=mxResources.get("pageWithNumber",[++d]);while(null!=b[g]);return g};
+EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,l=this.pages[g]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(D){this.handleError(D)}return b};
+EditorUi.prototype.duplicatePage=function(b,d){var g=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var D=b.node.cloneNode(!1);D.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);g=new DiagramPage(D);g.root=l.cloneCell(l.model.root,null,p);var N=new mxGraphModel;N.prefix=Editor.guid()+"-";N.setRoot(g.root);l.updateCustomLinks(l.createCellMapping(p,E),[g.root]);g.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(g);
+g.viewState.scale=1;g.viewState.scrollLeft=null;g.viewState.scrollTop=null;g.viewState.currentRoot=null;g.viewState.defaultParent=null;g.setName(d);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return g};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
+EditorUi.prototype.clonePages=function(b){for(var d=[],g=0;g<b.length;g++)d.push(this.clonePage(b[g]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
-g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);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 P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
-this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
-EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
-P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
-m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
-!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
-N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
-(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
-(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
-return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
-N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
-0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
-Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
-ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
-t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
-var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
-t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
-null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
-aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
-(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
-for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
-var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
-null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
-Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
-null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
-13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
-mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
-Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
-X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){ba.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 oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
-!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-F.vertex=!0;var L=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
-F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');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;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');y.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;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var g=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-g)/this.pages.length)+
+1),D=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(G,M){this.pages[G]==this.currentPage?(M.className="geActivePage",M.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):M.className="geInactivePage";M.setAttribute("draggable","true");mxEvent.addListener(M,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),D=G):mxEvent.consume(Q)}));mxEvent.addListener(M,"dragend",mxUtils.bind(this,function(Q){D=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(Q){null!=D&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(Q){null!=D&&G!=D&&this.movePage(D,G);Q.stopPropagation();Q.preventDefault()}));d.appendChild(M)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-g){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var 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 R=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=R+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(G){d.scrollLeft-=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,
+d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(N,"click",mxUtils.bind(this,function(G){d.scrollLeft+=Math.max(20,R-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(N,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(G)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
+this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(g))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(g)})));return d};
+EditorUi.prototype.createControlTab=function(b,d,g){g=this.createTab(null!=g?g:!0);g.style.lineHeight=this.tabContainerHeight+"px";g.style.paddingTop=b+"px";g.style.cursor="pointer";g.style.width="30px";g.innerHTML=d;null!=g.firstChild&&null!=g.firstChild.style&&mxUtils.setOpacity(g.firstChild,40);return g};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var g=b.getElementsByTagName("div")[0];g.style.display="inline-block";g.style.marginTop="5px";g.style.width="21px";g.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+var D=new mxPopupMenu(mxUtils.bind(this,function(N,R){var G=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(k){var z=N.addItem(this.getShortPageName(this.pages[k]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[k])}),R),t=this.pages[k].getId();z.setAttribute("title",this.pages[k].getName()+" ("+(k+1)+"/"+this.pages.length+")"+(null!=t?" ["+t+"]":""));this.pages[k]==this.currentPage&&N.addCheckmark(z,Editor.checkmarkImage)})(f)}),M=mxUtils.bind(this,
+function(){N.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),R)});d||G();if(this.editor.graph.isEnabled()){d||(N.addSeparator(R),M());var Q=this.currentPage;if(null!=Q){N.addSeparator(R);var e=this.getShortPageName(Q);N.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),R);N.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),R);d||N.addSeparator(R);N.addItem(mxResources.get("duplicateIt",
+[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),R)}}d&&(N.addSeparator(R),M(),N.addSeparator(R),G())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);D.popup(p,E,null,l);this.setCurrentMenu(D);mxEvent.consume(l)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){this.insertPage();mxEvent.consume(g)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,d,g,l){g=this.createTab(g);var D=b.getName()||mxResources.get("untitled"),p=b.getId();g.setAttribute("title",D+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(g,D);g.style.maxWidth=d+"px";g.style.width=d+"px";this.addTabListeners(b,g);42<d&&(g.style.textOverflow="ellipsis");return g};
+EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var g=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,D=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;D=b==this.currentPage;g.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(g.isEnabled()&&!g.isMouseDown&&(mxEvent.isTouchEvent(p)&&D||mxEvent.isPopupTrigger(p))){g.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(b));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);this.resetCurrentMenu();E.destroy()});var N=mxEvent.getClientX(p),R=mxEvent.getClientY(p);E.popup(N,R,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,d,g){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=d&&(D+="&"+d.join("&"));return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(g,l){var D=this.editor.graph;g.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);g.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(g.addSeparator(l),g.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,N,R,G,M){p=this.createUrlParameters(p,E,N,R,G,M);N||p.push("hide-pages=1");D.isSelectionEmpty()||(N=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,G=D.view.scale,N.width/=G,N.height/=G,N.x=N.x/G-E.x,N.y=N.y/G-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(N.x),y:Math.round(N.y),width:Math.round(N.width),height:Math.round(N.height),border:100}))));
+R=new EmbedDialog(this,this.getLinkForPage(b,p,R));this.showDialog(R.container,450,240,!0,!0);R.init()}))})));g.addSeparator(l);g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(g.addSeparator(l),g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,g,l){l.ui=d.ui;return g};b.afterDecode=function(d,g,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,g,l){l.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(l.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(D,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?p:void 0})),null!=g.relatedPage.root&&d.encodeCell(g.relatedPage.root,
+l));return l};b.beforeDecode=function(d,g,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(g.getAttribute("relatedPage"));if(null==l.relatedPage){var D=g.ownerDocument.createElement("diagram");D.setAttribute("id",g.getAttribute("relatedPage"));D.setAttribute("name",g.getAttribute("name"));l.relatedPage=new DiagramPage(D);D=g.getAttribute("viewState");null!=D&&(l.relatedPage.viewState=JSON.parse(D),g.removeAttribute("viewState"));g=g.cloneNode(!0);D=g.firstChild;if(null!=D)for(l.relatedPage.root=d.decodeCell(D,
+!1),l=D.nextSibling,D.parentNode.removeChild(D),D=l;null!=D;){l=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var p=D.getAttribute("id");null==d.lookup(p)&&d.decodeCell(D)}D.parentNode.removeChild(D);D=l}}return g};b.afterDecode=function(d,g,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,D,p,E,N){D=null!=D?D:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var R=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(l,p[G]);p=R;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(l,D){this.model.beginUpdate();try{var p=[];this.traverse(D,!0,mxUtils.bind(this,function(N,R){var G=null!=R&&this.isTreeEdge(R);G&&p.push(R);N==D||null!=R&&!G||p.push(N);return(null==R||G)&&(N==D||!this.model.isCollapsed(N))}));this.model.setCollapsed(D,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,D,p,E,N,R){return this.model.filterCells(this.getEdges(l,
+D,p,E,N,R),mxUtils.bind(this,function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,D){return this.getTreeEdges(l,D,!1,!0,!1)};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 l(L){return z.isVertex(L)&&p(L)}function D(L){var V=
+!1;null!=L&&(V="1"==k.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),V="tree"==(null!=V?V.style:k.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=z.getParent(L),V=k.view.getState(L),k.view.getState(L),V=null!=(null!=V?V.style:k.getCellStyle(L)).childLayout);return V}function N(L){L=k.view.getState(L);if(null!=L){var V=k.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=k.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(L,V){V=null!=V?V:!0;k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=k.cloneCells([Y[0],L]);k.model.setTerminal(W[0],k.model.getTerminal(Y[0],
+!0),!0);var ka=N(L),q=T.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=V?L.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=V?L.geometry.height+10:-W[1].geometry.height-10;k.view.currentRoot!=T&&(W[1].geometry.x-=q.x,W[1].geometry.y-=q.y);var F=k.view.getState(L),S=k.view.scale;if(null!=F){var ba=mxRectangle.fromRectangle(F);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ba.x+=(V?L.geometry.width+10:-W[1].geometry.width-10)*S:
+ba.y+=(V?L.geometry.height+10:-W[1].geometry.height-10)*S;var U=k.getOutgoingTreeEdges(k.model.getTerminal(Y[0],!0));if(null!=U){for(var ca=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=Y=0;ea<U.length;ea++){var na=k.model.getTerminal(U[ea],!1);if(ka==N(na)){var ra=k.view.getState(na);na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY())&&mxUtils.intersects(ba,ra)&&(Y=10+Math.max(Y,(Math.min(ba.x+ba.width,ra.x+ra.width)-Math.max(ba.x,
+ra.x))/S),q=10+Math.max(q,(Math.min(ba.y+ba.height,ra.y+ra.height)-Math.max(ba.y,ra.y))/S))}}ca?q=0:Y=0;for(ea=0;ea<U.length;ea++)if(na=k.model.getTerminal(U[ea],!1),ka==N(na)&&(ra=k.view.getState(na),na!=L&&null!=ra&&(ca&&V!=ra.getCenterX()<F.getCenterX()||!ca&&V!=ra.getCenterY()<F.getCenterY()))){var ya=[];k.traverse(ra.cell,!0,function(va,Da){var pa=null!=Da&&k.isTreeEdge(Da);pa&&ya.push(Da);(null==Da||pa)&&ya.push(va);return null==Da||pa});k.moveCells(ya,(V?1:-1)*Y,(V?1:-1)*q)}}}return k.addCells(W,
+T)}finally{k.model.endUpdate()}}function G(L){k.model.beginUpdate();try{var V=N(L),T=k.getIncomingTreeEdges(L),Y=k.cloneCells([T[0],L]);k.model.setTerminal(T[0],Y[1],!1);k.model.setTerminal(Y[0],Y[1],!0);k.model.setTerminal(Y[0],L,!1);var W=k.model.getParent(L),ka=W.geometry,q=[];k.view.currentRoot!=W&&(Y[1].geometry.x-=ka.x,Y[1].geometry.y-=ka.y);k.traverse(L,!0,function(ba,U){var ca=null!=U&&k.isTreeEdge(U);ca&&q.push(U);(null==U||ca)&&q.push(ba);return null==U||ca});var F=L.geometry.width+40,S=
+L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION_NORTH?(F=0,S=-S):V==mxConstants.DIRECTION_WEST?(F=-F,S=0):V==mxConstants.DIRECTION_EAST&&(S=0);k.moveCells(q,F,S);return k.addCells(Y,W)}finally{k.model.endUpdate()}}function M(L,V){k.model.beginUpdate();try{var T=k.model.getParent(L),Y=k.getIncomingTreeEdges(L),W=N(L);0==Y.length&&(Y=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],W=V);var ka=k.cloneCells([Y[0],L]);k.model.setTerminal(ka[0],L,!0);if(null==
+k.model.getTerminal(ka[0],!1)){k.model.setTerminal(ka[0],ka[1],!1);var q=k.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),S;for(S in F)k.setCellStyles(S,F[S],[ka[0]]),"edgeStyle"==S&&"elbowEdgeStyle"==F[S]&&k.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ra){}}Y=k.getOutgoingTreeEdges(L);var ba=T.geometry;V=[];k.view.currentRoot==T&&(ba=new mxRectangle);for(q=0;q<Y.length;q++){var U=k.model.getTerminal(Y[q],
+!1);null!=U&&V.push(U)}var ca=k.view.getBounds(V),ea=k.view.translate,na=k.view.scale;W==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x-ba.x+10,ka[1].geometry.y+=ka[1].geometry.height-ba.y+40):W==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ka[1].geometry.width)/2:(ca.x+ca.width)/na-ea.x+-ba.x+10,ka[1].geometry.y-=ka[1].geometry.height+ba.y+40):(ka[1].geometry.x=W==mxConstants.DIRECTION_WEST?
+ka[1].geometry.x-(ka[1].geometry.width+ba.x+40):ka[1].geometry.x+(ka[1].geometry.width-ba.x+40),ka[1].geometry.y=null==ca?L.geometry.y+(L.geometry.height-ka[1].geometry.height)/2:(ca.y+ca.height)/na-ea.y+-ba.y+10);return k.addCells(ka,T)}finally{k.model.endUpdate()}}function Q(L,V,T){L=k.getOutgoingTreeEdges(L);T=k.view.getState(T);var Y=[];if(null!=T&&null!=L){for(var W=0;W<L.length;W++){var ka=k.view.getState(k.model.getTerminal(L[W],!1));null!=ka&&(!V&&Math.min(ka.x+ka.width,T.x+T.width)>=Math.max(ka.x,
+T.x)||V&&Math.min(ka.y+ka.height,T.y+T.height)>=Math.max(ka.y,T.y))&&Y.push(ka)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var T=N(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==Y&&T!=V?f.actions.get("selectParent").funct():T==V?(V=k.getOutgoingTreeEdges(L),null!=V&&0<V.length&&k.setSelectionCell(k.model.getTerminal(V[0],!1))):(T=k.getIncomingTreeEdges(L),
+null!=T&&0<T.length&&(Y=Q(k.model.getTerminal(T[0],!0),Y,L),L=k.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&k.setSelectionCell(Y[L].cell)))))}var f=this,k=f.editor.graph,z=k.getModel(),t=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,T){t.apply(this,arguments);if(1==k.getSelectionCount()){V=k.getSelectionCell();var Y=k.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(k.getSelectionCell())&&
+this.addMenuItems(L,["selectChildren"],null,T),this.addMenuItems(L,["selectDescendants"],null,T));l(k.getSelectionCell())?(L.addSeparator(),0<k.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,T)):0<k.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,T)}};f.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],
+!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=k.getSelectionCell();L=k.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=k.getOutgoingTreeEdges(k.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],T=0;T<L.length;T++)V.push(k.model.getTerminal(L[T],!1));k.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var L=
+k.getSelectionCell();L=k.getIncomingTreeEdges(L);null!=L&&0<L.length&&k.setSelectionCell(k.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=k.getSelectionCell();if(k.isEnabled()&&k.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))k.setSelectionCells(k.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var T=[];k.traverse(L,!0,function(Y,W){var ka=null!=W&&k.isTreeEdge(W);ka&&T.push(W);null!=
+W&&!ka||null!=V&&mxEvent.isShiftDown(V)||T.push(Y);return null==W||ka})}k.setSelectionCells(T)}},null,null,"Alt+Shift+D");var B=k.removeCells;k.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var T=[],Y=0;Y<L.length;Y++){var W=L[Y];z.isEdge(W)&&p(W)&&(T.push(W),W=z.getTerminal(W,!1));if(l(W)){var ka=[];k.traverse(W,!0,function(q,F){var S=null!=F&&k.isTreeEdge(F);S&&ka.push(F);(null==F||S)&&
+ka.push(q);return null==F||S});0<ka.length&&(T=T.concat(ka),W=k.getIncomingTreeEdges(L[Y]),L=L.concat(W))}else null!=W&&T.push(L[Y])}L=T;return B.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,T){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,T))};var I=k.duplicateCells;k.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var T=L.slice(0),Y=0;Y<T.length;Y++){var W=k.view.getState(T[Y]);if(null!=W&&l(W.cell)){var ka=k.getIncomingTreeEdges(W.cell);
+for(W=0;W<ka.length;W++)mxUtils.remove(ka[W],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=k.getIncomingTreeEdges(q[Y]);ka=k.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<ka.length){var S=this.cloneCell(ka[0]);this.addEdge(S,k.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var O=k.moveCells;k.moveCells=function(L,V,T,Y,W,ka,q){var F=null;this.model.beginUpdate();try{var S=
+W,ba=this.getCurrentCellStyle(W);if(null!=L&&l(W)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||k.model.isEdge(L[U])&&null==k.model.getTerminal(L[U],!0)){W=k.model.getParent(L[U]);break}if(null!=S&&W!=S&&null!=this.view.getState(L[0])){var ca=k.getIncomingTreeEdges(L[0]);if(0<ca.length){var ea=k.view.getState(k.model.getTerminal(ca[0],!0));if(null!=ea){var na=k.view.getState(S);null!=na&&(V=(na.getCenterX()-ea.getCenterX())/k.view.scale,T=(na.getCenterY()-ea.getCenterY())/
+k.view.scale)}}}}F=O.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(S)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],S,!0);else if(l(L[U])&&(ca=k.getIncomingTreeEdges(L[U]),0<ca.length))if(!Y)l(S)&&0>mxUtils.indexOf(L,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],S,!0);else if(0==k.getIncomingTreeEdges(F[U]).length){ba=S;if(null==ba||ba==k.model.getParent(L[U]))ba=k.model.getTerminal(ca[0],
+!0);Y=this.cloneCell(ca[0]);this.addEdge(Y,k.getDefaultParent(),ba,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var J=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,T,Y){var W=k.model,ka=null;W.beginUpdate();try{if(ka=J.apply(this,arguments),l(L))for(var q=0;q<ka.length;q++)if(W.isEdge(ka[q])&&null==W.getTerminal(ka[q],!0)){W.setTerminal(ka[q],L,!0);var F=k.getCellGeometry(ka[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return ka}}var y=
+{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(k.isEnabled()&&!k.isEditing()&&l(k.getSelectionCell())&&1==k.getSelectionCount()){var V=null;0<k.getIncomingTreeEdges(k.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?G(k.getSelectionCell()):M(k.getSelectionCell()):13==L.which&&(V=R(k.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
+V.length&&k.model.isEdge(V[0])?k.setSelectionCell(k.model.getTerminal(V[0],!1)):k.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var T=y[L.keyCode];null!=T&&(T.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var da=k.connectVertex;k.connectVertex=function(L,V,T,Y,W,ka,q){var F=k.getIncomingTreeEdges(L);if(l(L)){var S=N(L),ba=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return S==V||0==F.length?M(L,V):ba==U?G(L):R(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return da.apply(this,arguments)};k.getSubtree=function(L){var V=[L];!D(L)&&!l(L)||E(L)||k.traverse(L,!0,function(T,Y){var W=null!=Y&&k.isTreeEdge(Y);W&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||W)&&0>mxUtils.indexOf(V,T)&&V.push(T);return null==Y||W});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(D(this.state.cell)||l(this.state.cell))&&
+!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){aa.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 qa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){qa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var sa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){sa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
+typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=g.apply(this,arguments),D=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+E.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);p.insert(R);p.insert(E);p.insert(N);return sb.createVertexTemplateFromCells([p],p.geometry.width,
+p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var N=new mxCell("Topic",
+new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);
+var G=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var 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;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);f.insertEdge(k,!1);p.insert(R);p.insert(M);p.insert(e);p.insert(k);p.insert(E);p.insert(N);p.insert(G);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
-"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
-function(T){D.createFormat(T).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=I?I:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
-var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
-I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
-"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
-function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
-D.sidebarElt.style.borderRight="1px solid gray"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var N=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");R.geometry.relative=!0;R.edge=!0;E.insertEdge(R,!0);N.insertEdge(R,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);p.insert(R);p.insert(M);p.insert(E);p.insert(N);p.insert(G);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(p,"treeRoot",
+"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var N=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");N.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");R.geometry.setTerminalPoint(new mxPoint(110,-40),!0);R.geometry.relative=
+!0;R.edge=!0;N.insertEdge(R,!1);return sb.createVertexTemplateFromCells([E,R,p,N],220,60,"Sub Sections")})])}}})();"1"==urlParams["live-ui"]&&"min"==uiTheme&&"1"==urlParams.sketch&&(Editor.currentTheme="sketch",uiTheme="kennedy");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.formatWindow){B="1"==urlParams.sketch?Math.max(10,t.diagramContainer.clientWidth-244):Math.max(10,t.diagramContainer.clientWidth-248);var O="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);t.formatWindow=new WrapperWindow(t,mxResources.get("format"),B,O,240,I,
+function(J){t.createFormat(J).init()});t.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){t.formatWindow.window.fit()}));t.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else t.formatWindow.window.setVisible(null!=B?B:!t.formatWindow.window.isVisible())}else null==t.formatElt&&(t.formatElt=t.createSidebarContainer(),t.createFormat(t.formatElt).init(),t.formatElt.style.border="none",t.formatElt.style.width="240px",t.formatElt.style.borderLeft="1px solid gray",
+t.formatElt.style.right="0px"),I=t.diagramContainer.parentNode,null!=t.formatElt.parentNode?(t.formatElt.parentNode.removeChild(t.formatElt),I.style.right="0px"):(I.parentNode.appendChild(t.formatElt),I.style.right=t.formatElt.style.width)}function d(t,B){function I(ia,da){var ja=t.menus.get(ia);ia=y.addMenu(da,mxUtils.bind(this,function(){ja.funct.apply(this,arguments)}));ia.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+ia.className="geTitle";B.appendChild(ia);return ia}var O=document.createElement("div");O.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";O.className="geTitle";var J=document.createElement("span");J.style.fontSize="18px";J.style.marginRight="5px";J.innerHTML="+";O.appendChild(J);mxUtils.write(O,mxResources.get("moreShapes"));B.appendChild(O);mxEvent.addListener(O,"click",function(){t.actions.get("shapes").funct()});
+var y=new Menubar(t,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?O.style.bottom="0":null!=t.actions.get("newLibrary")?(O=document.createElement("div"),O.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("newLibrary")),O.appendChild(J),
+B.appendChild(O),mxEvent.addListener(O,"click",t.actions.get("newLibrary").funct),O=document.createElement("div"),O.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",O.className="geTitle",J=document.createElement("span"),J.style.cssText="position:relative;top:6px;",mxUtils.write(J,mxResources.get("openLibrary")),O.appendChild(J),B.appendChild(O),mxEvent.addListener(O,
+"click",t.actions.get("openLibrary").funct)):(O=I("newLibrary",mxResources.get("newLibrary")),O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="0",O=I("openLibraryFrom",mxResources.get("openLibraryFrom")),O.style.borderLeft="1px solid lightgray",O.style.boxSizing="border-box",O.style.paddingRight="6px",O.style.paddingLeft="6px",O.style.height="32px",O.style.left="50%");B.appendChild(t.sidebar.container);B.style.overflow="hidden"}
+function g(t,B){if(EditorUi.windowed){var I=t.editor.graph;I.popupMenuHandler.hideMenu();if(null==t.sidebarWindow){B=Math.min(I.container.clientWidth-10,218);var O="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);t.sidebarWindow=new WrapperWindow(t,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-O)/2):56,B-6,O-6,function(J){d(t,J)});t.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){t.sidebarWindow.window.fit()}));t.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);t.sidebarWindow.window.setVisible(!0);isLocalStorage&&t.getLocalData("sidebar",function(J){t.sidebar.showEntries(J,null,!0)});t.restoreLibraries()}else t.sidebarWindow.window.setVisible(null!=B?B:!t.sidebarWindow.window.isVisible())}else null==t.sidebarElt&&(t.sidebarElt=t.createSidebarContainer(),d(t,t.sidebarElt),t.sidebarElt.style.border="none",t.sidebarElt.style.width="210px",
+t.sidebarElt.style.borderRight="1px solid gray"),I=t.diagramContainer.parentNode,null!=t.sidebarElt.parentNode?(t.sidebarElt.parentNode.removeChild(t.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(t.sidebarElt),I.style.left=t.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(t){}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="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.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 F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
-S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
-"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
-H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
-"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
-D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
-b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
-null!=this.formatWindow&&(1E3<=I||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
-I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
-!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
-function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(pa));M.menus.menuCreated(Fa,
-Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
-"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
-Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
-for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
-la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
-null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
-W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);var T=document.createElement("div");T.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";T.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&
-!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
-var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
-Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
-this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
-"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
-la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
-"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
-urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
-"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
-ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
-"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
-2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
-(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
-aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
-fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
-(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
-""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
-"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
-"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
-"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
-ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
-Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
-null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
-"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
-Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
-"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
-E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-ha.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";N.appendChild(ia);N.appendChild(ha);X.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
-"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
-"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
-null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
-function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});T=document.createElement("div");T.style.position="absolute";T.style.width="10px";T.style.height="10px";T.style.borderRadius="5px";T.style.border="1px solid gray";T.style.background="#ffffff";T.style.cursor="row-resize";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
-function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
-Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
-M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var D=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");D.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 E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(t,B){null!=B.shortcut&&900>l&&!mxClient.IS_IOS?t.firstChild.nextSibling.setAttribute("title",B.shortcut):E.apply(this,arguments)};var N=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){N.apply(this,arguments);if(null!=this.userElement){var t=this.userElement;t.style.cssText="position:relative;cursor:pointer;display:"+t.style.display;t.className="geToolbarButton";
+t.innerText="";t.style.backgroundImage="url("+Editor.userImage+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="24px 24px";t.style.height="24px";t.style.width="24px";var B=mxResources.get("changeUser");if("none"!=t.style.display){t.style.display="inline-block";var I=this.getCurrentFile();if(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()){var O=document.createElement("img");O.setAttribute("border","0");O.style.position="absolute";
+O.style.left="18px";O.style.top="2px";O.style.width="12px";O.style.height="12px";var J=I.getRealtimeError();I=I.getRealtimeState();B+=" ("+mxResources.get("realtimeCollaboration")+": ";1==I?(O.src=Editor.syncImage,B+=mxResources.get("online")):(O.src=Editor.syncProblemImage,B=null!=J&&null!=J.message?B+J.message:B+mxResources.get("disconnected"));t.style.marginRight="6px";t.appendChild(O);B+=")"}}t.setAttribute("title",B)}};var R=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){R.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var t=document.createElement("div");t.style.display="inline-block";t.style.position="relative";t.style.marginTop="6px";t.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,I);B.setAttribute("title",I);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));t.appendChild(B)}}else 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()})),t.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()})),t.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,
+I),B.setAttribute("title",I),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),t.appendChild(B));this.buttonContainer.appendChild(t);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var G=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(t,B,I){var O=this.editorUi.editor.graph;t.smartSeparators=!0;G.apply(this,arguments);
+"1"==urlParams.sketch?O.isEnabled()&&(t.addSeparator(),1==O.getSelectionCount()&&this.addMenuItems(t,["-","lockUnlock"],null,I)):1==O.getSelectionCount()?(O.isCellFoldable(O.getSelectionCell())&&this.addMenuItems(t,O.isCellCollapsed(B)?["expand"]:["collapse"],null,I),this.addMenuItems(t,["collapsible","-","lockUnlock","enterGroup"],null,I),t.addSeparator(),this.addSubmenu("layout",t)):O.isSelectionEmpty()&&O.isEnabled()?(t.addSeparator(),this.addMenuItems(t,["editData"],null,I),t.addSeparator(),this.addSubmenu("layout",
+t),this.addSubmenu("insert",t),this.addMenuItems(t,["-","exitGroup"],null,I)):O.isEnabled()&&this.addMenuItems(t,["-","lockUnlock"],null,I)};var M=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(t,B,I){M.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(t,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(t){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=t?t:!this.formatWindow.window.isVisible()):
+b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();Q.apply(this,arguments)};var e=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(t){e.apply(this,arguments);if(t){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var f=Menus.prototype.init;Menus.prototype.init=function(){f.apply(this,arguments);var t=this.editorUi,B=t.actions.put("togglePagesVisible",
+new Action(mxResources.get("pages"),function(da){t.setPagesVisible(!Editor.pagesVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.pagesVisible});t.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){g(t)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!t.isOffline()&&t.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var da=new ParseDialog(t,mxResources.get("plantUml")+"...","plantUml");t.showDialog(da.container,
+620,420,!0,!1);da.init()}));t.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var da=new ParseDialog(t,mxResources.get("mermaid")+"...","mermaid");t.showDialog(da.container,620,420,!0,!1);da.init()}));var I=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(da,ja){var aa=this.editorUi.editor.graph,qa=aa.getSelectionCell();I.call(this,da,qa,null,ja);this.addMenuItems(da,["editTooltip"],ja);aa.model.isVertex(qa)&&this.addMenuItems(da,
+["editGeometry"],ja);this.addMenuItems(da,["-","edit"],ja)})));this.addPopupMenuCellEditItems=function(da,ja,aa,qa){da.addSeparator();this.addSubmenu("editCell",da,qa,mxResources.get("edit"))};var O=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(da,ja){O.funct(da,ja);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.menus.addMenuItems(da,["publishLink"],ja);t.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(da.addSeparator(ja),t.menus.addSubmenu("embed",da,ja))})));var J=
+this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(da,ja){J.funct(da,ja);this.addMenuItems(da,["-","ruler","-","pageScale"],ja)})));var y="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),ia=function(da,ja,aa,qa){da.addItem(aa,null,mxUtils.bind(this,function(){var sa=new CreateGraphDialog(t,aa,qa);t.showDialog(sa.container,620,420,!0,!1);sa.init()}),ja)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(da,ja){for(var aa=
+0;aa<y.length;aa++)"-"==y[aa]?da.addSeparator(ja):ia(da,ja,mxResources.get(y[aa])+"...",y[aa])})))};EditorUi.prototype.installFormatToolbar=function(t){var B=this.editor.graph,I=document.createElement("div");I.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(O,J){0<B.getSelectionCount()?
+(t.appendChild(I),I.innerHTML="Selected: "+B.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var k=!1;EditorUi.prototype.initFormatWindow=function(){if(!k&&null!=this.formatWindow){k=!0;var t=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){t.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-
+140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function t(oa,ta,Ea){var Fa=y.menus.get(oa),Pa=aa.addMenu(mxResources.get(oa),
+mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ja);Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.top="6px";Pa.style.marginRight="6px";Pa.style.height="30px";Pa.style.paddingTop="6px";Pa.style.paddingBottom="6px";Pa.style.cursor="pointer";Pa.setAttribute("title",mxResources.get(oa));y.menus.menuCreated(Fa,Pa,"geMenuItem");null!=Ea?(Pa.style.backgroundImage="url("+Ea+")",Pa.style.backgroundPosition=
+"center center",Pa.style.backgroundRepeat="no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px",Pa.innerText=""):ta||(Pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Pa.style.backgroundPosition="right 6px center",Pa.style.backgroundRepeat="no-repeat",Pa.style.paddingRight="22px");return Pa}function B(oa,ta,Ea,Fa,Pa,Ra){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing=
+"border-box";Ca.style.height="30px";Ca.style.padding="6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=y.statusContainer?da.insertBefore(Ca,y.statusContainer):da.appendChild(Ca);null!=Ra?(Ca.style.backgroundImage="url("+Ra+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",
+Ca.style.width="34px"):mxUtils.write(Ca,oa);mxEvent.addListener(Ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ja){Ja.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ja){"disabled"!=Ca.getAttribute("disabled")&&ta(Ja);mxEvent.consume(Ja)});null==Ea&&(Ca.style.marginRight="4px");null!=Fa&&Ca.setAttribute("title",Fa);null!=Pa&&(oa=function(){Pa.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor=
+"default")},Pa.addListener("stateChanged",oa),ia.addListener("enabledChanged",oa),oa());return Ca}function I(oa,ta,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");for(var Fa=0;Fa<oa.length;Fa++)null!=oa[Fa]&&("1"==urlParams.sketch&&(oa[Fa].style.padding=
+"10px 8px",oa[Fa].style.width="30px"),oa[Fa].style.margin="0px",oa[Fa].style.boxShadow="none",Ea.appendChild(oa[Fa]));null!=ta&&mxUtils.setOpacity(Ea,ta);null!=y.statusContainer&&"1"!=urlParams.sketch?da.insertBefore(Ea,y.statusContainer):da.appendChild(Ea);return Ea}function O(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ka.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var oa=da.firstChild;null!=oa;){var ta=oa.nextSibling;"geMenuItem"!=oa.className&&"geItem"!=oa.className||
+oa.parentNode.removeChild(oa);oa=ta}ja=da.firstChild;l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;oa=1E3>l||"1"==urlParams.sketch;var Ea=null;oa||(Ea=t("diagram"));ta=oa?t("diagram",null,Editor.menuImage):null;null!=ta&&(Ea=ta);I([Ea,B(mxResources.get("shapes"),y.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),y.actions.get("image"),oa?Editor.shapesImage:null),B(mxResources.get("format"),y.actions.get("format").funct,null,mxResources.get("format")+
+" ("+y.actions.get("format").shortcut+")",y.actions.get("image"),oa?Editor.formatImage:null)],oa?60:null);ta=t("insert",!0,oa?T:null);I([ta,B(mxResources.get("delete"),y.actions.get("delete").funct,null,mxResources.get("delete"),y.actions.get("delete"),oa?Editor.trashImage:null)],oa?60:null);411<=l&&(I([Oa,Na],60),520<=l&&I([P,640<=l?B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=l?B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+
+" -)",pa,Editor.zoomOutImage):null],60))}null!=Ea&&(mxEvent.disableContextMenu(Ea),mxEvent.addGestureListeners(Ea,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&y.appIconClicked(Fa)}),null,null));ta=y.menus.get("language");null!=ta&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Z&&(ta=aa.addMenu("",ta.funct),ta.setAttribute("title",
+"language"),ta.className="geToolbarButton",ta.style.backgroundImage="url("+Editor.globeImage+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat="no-repeat",ta.style.backgroundSize="22px 22px",ta.style.position="absolute",ta.style.height="24px",ta.style.width="24px",ta.style.zIndex="1",ta.style.right="8px",ta.style.cursor="pointer",ta.style.top="12px",da.appendChild(ta),Z=ta),y.buttonContainer.style.paddingRight="34px"):(y.buttonContainer.style.paddingRight="4px",null!=Z&&(Z.parentNode.removeChild(Z),
+Z=null))}z.apply(this,arguments);var J=document.createElement("div");J.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";J.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(J);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),
+this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var y=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==y.embedViewport)mxUtils.fit(this.div);else{var oa=parseInt(this.div.offsetLeft),
+ta=parseInt(this.div.offsetWidth),Ea=y.embedViewport.x+y.embedViewport.width,Fa=parseInt(this.div.offsetTop),Pa=parseInt(this.div.offsetHeight),Ra=y.embedViewport.y+y.embedViewport.height;this.div.style.left=Math.max(y.embedViewport.x,Math.min(oa,Ea-ta))+"px";this.div.style.top=Math.max(y.embedViewport.y,Math.min(Fa,Ra-Pa))+"px";this.div.style.height=Math.min(y.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(y.embedViewport.width,parseInt(this.div.style.width))+
+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),J=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>l||708>J)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));y=this;var ia=y.editor.graph;y.toolbar=this.createToolbar(y.createDiv("geToolbar"));y.defaultLibraryName=
+mxResources.get("untitledLibrary");var da=document.createElement("div");da.className="geMenubarContainer";var ja=null,aa=new Menubar(y,da);y.statusContainer=y.createStatusContainer();y.statusContainer.style.position="relative";y.statusContainer.style.maxWidth="";y.statusContainer.style.marginTop="7px";y.statusContainer.style.marginLeft="6px";y.statusContainer.style.color="gray";y.statusContainer.style.cursor="default";var qa=y.hideCurrentMenu;y.hideCurrentMenu=function(){qa.apply(this,arguments);
+this.editor.graph.popupMenuHandler.hideMenu()};var sa=y.descriptorChanged;y.descriptorChanged=function(){sa.apply(this,arguments);var oa=y.getCurrentFile();if(null!=oa&&null!=oa.getTitle()){var ta=oa.getMode();"google"==ta?ta="googleDrive":"github"==ta?ta="gitHub":"gitlab"==ta?ta="gitLab":"onedrive"==ta&&(ta="oneDrive");ta=mxResources.get(ta);da.setAttribute("title",oa.getTitle()+(null!=ta?" ("+ta+")":""))}else da.removeAttribute("title")};y.setStatusText(y.editor.getStatus());da.appendChild(y.statusContainer);
+y.buttonContainer=document.createElement("div");y.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";da.appendChild(y.buttonContainer);y.menubarContainer=y.buttonContainer;y.tabContainer=document.createElement("div");y.tabContainer.className="geTabContainer";y.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+J=y.diagramContainer.parentNode;var L=document.createElement("div");L.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";y.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){L.style.top="20px";y.titlebar=document.createElement("div");y.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var V=document.createElement("div");
+V.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";y.titlebar.appendChild(V);J.appendChild(y.titlebar)}var T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Y="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ka="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ka.style.left=
+"10px",ka.style.top="10px",W.style.left="10px",W.style.top="60px",Y.style.top="10px",Y.style.right="12px",Y.style.left="",y.diagramContainer.setAttribute("data-bounds",y.diagramContainer.style.top+" "+y.diagramContainer.style.left+" "+y.diagramContainer.style.width+" "+y.diagramContainer.style.height),y.diagramContainer.style.top="0px",y.diagramContainer.style.left="0px",y.diagramContainer.style.bottom="0px",y.diagramContainer.style.right="0px",y.diagramContainer.style.width="",y.diagramContainer.style.height=
+"";else{var oa=y.diagramContainer.getAttribute("data-bounds");if(null!=oa){y.diagramContainer.style.background="transparent";y.diagramContainer.removeAttribute("data-bounds");var ta=ia.getGraphBounds();oa=oa.split(" ");y.diagramContainer.style.top=oa[0];y.diagramContainer.style.left=oa[1];y.diagramContainer.style.width=ta.width+50+"px";y.diagramContainer.style.height=ta.height+46+"px";y.diagramContainer.style.bottom="";y.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:y.diagramContainer.getBoundingClientRect()}),"*");y.refresh()}ka.style.left=y.diagramContainer.offsetLeft+"px";ka.style.top=y.diagramContainer.offsetTop-ka.offsetHeight-4+"px";W.style.display="";W.style.left=y.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=y.diagramContainer.offsetTop+"px";Y.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-Y.offsetWidth+"px";Y.style.top=ka.style.top;Y.style.right="";y.bottomResizer.style.left=y.diagramContainer.offsetLeft+
+(y.diagramContainer.offsetWidth-y.bottomResizer.offsetWidth)/2+"px";y.bottomResizer.style.top=y.diagramContainer.offsetTop+y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight/2-1+"px";y.rightResizer.style.left=y.diagramContainer.offsetLeft+y.diagramContainer.offsetWidth-y.rightResizer.offsetWidth/2-1+"px";y.rightResizer.style.top=y.diagramContainer.offsetTop+(y.diagramContainer.offsetHeight-y.bottomResizer.offsetHeight)/2+"px"}y.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
+"";y.rightResizer.style.visibility=y.bottomResizer.style.visibility;da.style.display="none";ka.style.visibility="";Y.style.visibility=""});V=y.actions.get("fullscreen");var F=B("",V.funct,null,mxResources.get(""),V,Editor.fullscreenImage),S=mxUtils.bind(this,function(){F.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+q()});V=mxUtils.bind(this,function(){b(y,!0);y.initFormatWindow();var oa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(oa.x+oa.width+4,oa.y);S()});y.addListener("inlineFullscreenChanged",S);y.addListener("editInlineStart",V);"1"==urlParams.embedInline&&y.addListener("darkModeChanged",V);y.addListener("editInlineStop",mxUtils.bind(this,function(oa){y.diagramContainer.style.width="10px";y.diagramContainer.style.height="10px";y.diagramContainer.style.border="";y.bottomResizer.style.visibility=
+"hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}));if(null!=y.hoverIcons){var ba=y.hoverIcons.update;y.hoverIcons.update=function(){ia.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=ia.freehand){var U=ia.freehand.createStyle;ia.freehand.createStyle=function(oa){return U.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";Y.className="geToolbarContainer";ka.className=
+"geToolbarContainer";da.className="geToolbarContainer";y.picker=W;y.sketchPickerMenuElt=W;var ca=!1;"1"!=urlParams.embed&&"atlassian"!=y.getServiceName()&&(mxEvent.addListener(da,"mouseenter",function(){y.statusContainer.style.display="inline-block"}),mxEvent.addListener(da,"mouseleave",function(){ca||(y.statusContainer.style.display="none")}));var ea=mxUtils.bind(this,function(oa){null!=y.notificationBtn&&(null!=oa?y.notificationBtn.setAttribute("title",oa):y.notificationBtn.removeAttribute("title"))});
+da.style.visibility=20>da.clientWidth?"hidden":"";y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=y.getServiceName())if(y.statusContainer.style.display="inline-block",ca=!0,1==y.statusContainer.children.length&&""==y.editor.getStatus())da.style.visibility="hidden";else{if(0==y.statusContainer.children.length||1==y.statusContainer.children.length&&"function"===typeof y.statusContainer.firstChild.getAttribute&&
+null==y.statusContainer.firstChild.getAttribute("class")){var oa=null!=y.statusContainer.firstChild&&"function"===typeof y.statusContainer.firstChild.getAttribute?y.statusContainer.firstChild.getAttribute("title"):y.editor.getStatus();ea(oa);var ta=y.getCurrentFile();ta=null!=ta?ta.savingStatusKey:DrawioFile.prototype.savingStatusKey;oa==mxResources.get(ta)+"..."?(y.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ta))+'..."src="'+Editor.tailSpin+'">',y.statusContainer.style.display=
+"inline-block",ca=!0):6<y.buttonContainer.clientWidth&&(y.statusContainer.style.display="none",ca=!1)}else y.statusContainer.style.display="inline-block",ea(null),ca=!0;da.style.visibility=20>da.clientWidth&&!ca?"hidden":""}}));H=t("diagram",null,Editor.menuImage);H.style.boxShadow="none";H.style.padding="6px";H.style.margin="0px";ka.appendChild(H);mxEvent.disableContextMenu(H);mxEvent.addGestureListeners(H,mxUtils.bind(this,function(oa){(mxEvent.isShiftDown(oa)||mxEvent.isAltDown(oa)||mxEvent.isMetaDown(oa)||
+mxEvent.isControlDown(oa)||mxEvent.isPopupTrigger(oa))&&this.appIconClicked(oa)}),null,null);y.statusContainer.style.position="";y.statusContainer.style.display="none";y.statusContainer.style.margin="0px";y.statusContainer.style.padding="6px 0px";y.statusContainer.style.maxWidth=Math.min(l-240,280)+"px";y.statusContainer.style.display="inline-block";y.statusContainer.style.textOverflow="ellipsis";y.buttonContainer.style.display="inline-block";y.buttonContainer.style.position="relative";y.buttonContainer.style.paddingRight=
+"0px";y.buttonContainer.style.top="0px";var na=document.createElement("a");na.style.padding="0px";na.style.boxShadow="none";na.className="geMenuItem";na.style.display="inline-block";na.style.width="40px";na.style.height="12px";na.style.marginBottom="-2px";na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";na.style.backgroundPosition="top center";na.style.backgroundRepeat="no-repeat";na.setAttribute("title","Minimize");var ra=!1,ya=mxUtils.bind(this,function(){W.innerText="";if(!ra){var oa=
+function(ta,Ea,Fa,Pa){null!=Ea&&ta.setAttribute("title",Ea);ta.style.cursor=null!=Fa?Fa:"default";ta.style.margin="2px 0px";W.appendChild(ta);mxUtils.br(W);null!=Pa&&(ta.style.position="relative",ta.style.overflow="visible",Ea=document.createElement("div"),Ea.style.position="absolute",Ea.style.left="34px",Ea.style.top="28px",Ea.style.fontSize="8px",mxUtils.write(Ea,Pa),ta.appendChild(Ea));return ta};oa(y.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");oa(y.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");oa(y.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");oa(y.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ta=new mxCell("",new mxGeometry(0,0,ia.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ta.geometry.setTerminalPoint(new mxPoint(0,0),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+0),!1);ta.geometry.points=[];ta.geometry.relative=!0;ta.edge=!0;oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,ta.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ta=ta.clone();ta.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ta.geometry.width=ia.defaultEdgeLength+20;ta.geometry.setTerminalPoint(new mxPoint(0,20),!0);ta.geometry.setTerminalPoint(new mxPoint(ta.geometry.width,
+20),!1);oa(y.sidebar.createEdgeTemplateFromCells([ta],ta.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ta,Ea,Fa,Pa){ta=B("",ta.funct,null,Ea,ta,Fa);ta.style.width="40px";ta.style.height="34px";ta.style.opacity="0.7";return oa(ta,null,"pointer",Pa)})(y.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");H=t("insert",null,Editor.plusImage);H.style.boxShadow="none";H.style.opacity="0.7";H.style.padding="6px";H.style.margin=
+"0px";H.style.height="34px";H.style.width="37px";oa(H,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(na)});mxEvent.addListener(na,"click",mxUtils.bind(this,function(){ra?(mxUtils.setPrefixedStyle(W.style,"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",na.style.width="40px",na.style.height="12px",na.setAttribute("title","Minimize"),ra=!1,ya()):(W.innerText=
+"",W.appendChild(na),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",na.style.height="24px",na.style.backgroundImage="url("+Editor.plusImage+")",na.setAttribute("title",mxResources.get("insert")),na.style.width="24px",ra=!0)}));ya();y.addListener("darkModeChanged",ya);y.addListener("sketchModeChanged",ya)}else y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus())}));
+V=y.menus.get("viewZoom");if(null!=V){var va=function(oa){if(mxEvent.isAltDown(oa))y.hideCurrentMenu(),y.actions.get("customZoom").funct(),mxEvent.consume(oa);else if("geItem"!=mxEvent.getSource(oa).className||mxEvent.isShiftDown(oa))y.hideCurrentMenu(),y.actions.get("smartFit").funct(),mxEvent.consume(oa)},Da=y.actions.get("zoomIn"),pa=y.actions.get("zoomOut"),Aa=y.actions.get("resetView"),xa=y.actions.get("undo"),Ma=y.actions.get("redo"),Oa=B("",xa.funct,null,mxResources.get("undo")+" ("+xa.shortcut+
+")",xa,Editor.undoImage),Na=B("",Ma.funct,null,mxResources.get("redo")+" ("+Ma.shortcut+")",Ma,Editor.redoImage);if(null!=Y){Aa=function(){x.style.display=null!=y.pages&&("0"!=urlParams.pages||1<y.pages.length||Editor.pagesVisible)?"inline-block":"none"};var La=function(){x.innerText="";if(null!=y.currentPage){mxUtils.write(x,y.currentPage.getName());var oa=null!=y.pages?y.pages.length:1,ta=y.getPageIndex(y.currentPage);ta=null!=ta?ta+1:1;var Ea=y.currentPage.getId();x.setAttribute("title",y.currentPage.getName()+
+" ("+ta+"/"+oa+")"+(null!=Ea?" ["+Ea+"]":""))}},Ba=y.actions.get("delete"),ab=B("",Ba.funct,null,mxResources.get("delete"),Ba,Editor.trashImage);ab.style.opacity="0.3";ka.appendChild(ab);Ba.addListener("stateChanged",function(){ab.style.opacity=Ba.enabled?"":"0.3"});var Xa=function(){Oa.style.display=0<y.editor.undoManager.history.length||ia.isEditing()?"inline-block":"none";Na.style.display=Oa.style.display;Oa.style.opacity=xa.enabled?"":"0.3";Na.style.opacity=Ma.enabled?"":"0.3"};ka.appendChild(Oa);
+ka.appendChild(Na);xa.addListener("stateChanged",Xa);Ma.addListener("stateChanged",Xa);Xa();var x=this.createPageMenuTab(!1,!0);x.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";Y.appendChild(x);y.editor.addListener("pagesPatched",La);y.editor.addListener("pageSelected",La);y.editor.addListener("pageRenamed",La);y.editor.addListener("fileLoaded",La);La();y.addListener("fileDescriptorChanged",Aa);y.addListener("pagesVisibleChanged",
+Aa);y.editor.addListener("pagesPatched",Aa);Aa();Aa=B("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);Y.appendChild(Aa);var H=aa.addMenu("100%",V.funct);H.setAttribute("title",mxResources.get("zoom"));H.innerHTML="100%";H.style.display="inline-block";H.style.color="inherit";H.style.cursor="pointer";H.style.textAlign="center";H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.verticalAlign="top";H.style.padding=
+"6px 0";H.style.fontSize="14px";H.style.width="40px";Y.appendChild(H);V=B("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);Y.appendChild(V);"1"==urlParams.embedInline?(Y.appendChild(F),V=y.actions.get("exit"),Y.appendChild(B("",V.funct,null,mxResources.get("exit"),V,Editor.closeImage))):F.parentNode.removeChild(F);y.tabContainer.style.visibility="hidden";da.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+ka.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";L.appendChild(ka);L.appendChild(Y);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");L.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(L)}else{var P=B("",va,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Aa,Editor.zoomFitImage);da.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";H=aa.addMenu("100%",
+V.funct);H.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");H.style.whiteSpace="nowrap";H.style.paddingRight="10px";H.style.textDecoration="none";H.style.textDecoration="none";H.style.overflow="hidden";H.style.visibility="hidden";H.style.textAlign="center";H.style.cursor="pointer";H.style.height=parseInt(y.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(y.tabContainerHeight)+1+"px";H.style.position="absolute";H.style.display="block";H.style.fontSize="12px";H.style.width="59px";
+H.style.right="0px";H.style.bottom="0px";H.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";H.style.backgroundPosition="right 6px center";H.style.backgroundRepeat="no-repeat";L.appendChild(H)}(function(oa){mxEvent.addListener(oa,"click",va);var ta=mxUtils.bind(this,function(){oa.innerText="";mxUtils.write(oa,Math.round(100*y.editor.graph.view.scale)+"%")});y.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ta);y.editor.addListener("resetGraphView",ta);y.editor.addListener("pageSelected",
+ta)})(H);var X=y.setGraphEnabled;y.setGraphEnabled=function(){X.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Y?this.tabContainerHeight+"px":"0px")}}L.appendChild(da);L.appendChild(y.diagramContainer);J.appendChild(L);y.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==Y&&L.appendChild(y.tabContainer);
+var Z=null;O();mxEvent.addListener(window,"resize",function(){O();null!=y.sidebarWindow&&y.sidebarWindow.window.fit();null!=y.formatWindow&&y.formatWindow.window.fit();null!=y.actions.outlineWindow&&y.actions.outlineWindow.window.fit();null!=y.actions.layersWindow&&y.actions.layersWindow.window.fit();null!=y.menus.tagsWindow&&y.menus.tagsWindow.window.fit();null!=y.menus.findWindow&&y.menus.findWindow.window.fit();null!=y.menus.findReplaceWindow&&y.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
+"text";W.style.transform="";mxEvent.addGestureListeners(y.diagramContainer.parentNode,function(oa){mxEvent.getSource(oa)==y.diagramContainer.parentNode&&(y.embedExitPoint=new mxPoint(mxEvent.getClientX(oa),mxEvent.getClientY(oa)),y.sendEmbeddedSvgExport())});J=document.createElement("div");J.style.position="absolute";J.style.width="10px";J.style.height="10px";J.style.borderRadius="5px";J.style.border="1px solid gray";J.style.background="#ffffff";J.style.cursor="row-resize";y.diagramContainer.parentNode.appendChild(J);
+y.bottomResizer=J;var fa=null,la=null,za=null,ua=null;mxEvent.addGestureListeners(J,function(oa){ua=parseInt(y.diagramContainer.style.height);la=mxEvent.getClientY(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});J=J.cloneNode(!1);J.style.cursor="col-resize";y.diagramContainer.parentNode.appendChild(J);y.rightResizer=J;mxEvent.addGestureListeners(J,function(oa){za=parseInt(y.diagramContainer.style.width);fa=mxEvent.getClientX(oa);ia.popupMenuHandler.hideMenu();mxEvent.consume(oa)});mxEvent.addGestureListeners(document.body,
+null,function(oa){var ta=!1;null!=fa&&(y.diagramContainer.style.width=Math.max(20,za+mxEvent.getClientX(oa)-fa)+"px",ta=!0);null!=la&&(y.diagramContainer.style.height=Math.max(20,ua+mxEvent.getClientY(oa)-la)+"px",ta=!0);ta&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:y.diagramContainer.getBoundingClientRect()}),"*"),q(),y.refresh())},function(oa){null==fa&&null==la||mxEvent.consume(oa);la=fa=null});this.diagramContainer.style.borderRadius=
+"4px";document.body.style.backgroundColor="transparent";y.bottomResizer.style.visibility="hidden";y.rightResizer.style.visibility="hidden";ka.style.visibility="hidden";Y.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&y.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,g,l,D,p,E){this.file=b;this.id=d;this.content=g;this.modifiedDate=l;this.createdDate=D;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,g,l,D){d()};DrawioComment.prototype.editComment=function(b,d,g){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,g,l,D){this.id=b;this.email=d;this.displayName=g;this.pictureUrl=l;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,g){this.init(b,d,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
-GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,d,g){this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
-this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
-" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
-I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
+this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var z=this.view.graphBounds,t=this.view.translate;E.setAttribute("viewBox",z.x+t.x-this.panDx+" "+(z.y+t.y-this.panDy)+
+" "+(z.width+1)+" "+(z.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",z))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(z){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var N=this;this.graph.getImageFromBundles=function(z){return N.getImageUrl(z)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var R=this.xmlNode.getElementsByTagName("diagram");if(0<
+R.length){if(null!=this.pageId)for(var G=0;G<R.length;G++)if(this.pageId==R[G].getAttribute("id")){this.currentPage=G;break}var M=this.graph.getGlobalVariable;N=this;this.graph.getGlobalVariable=function(z){var t=R[N.currentPage];return"page"==z?t.getAttribute("name")||"Page-"+(N.currentPage+1):"pagenumber"==z?N.currentPage+1:"pagecount"==z?R.length:M.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(z){this.handlingResize||(this.currentPage=mxUtils.mod(z,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(z){z=this.getIndexById(z);var t=0<=z;t&&this.selectPage(z);return t};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(z){if(null!=z&&Graph.isPageLink(z.src)){var t=z.src,
+B=t.indexOf(",");0<B&&(B=N.getIndexById(t.substring(B+1)),0<=B&&(z=N.getImageForGraphModel(Editor.parseDiagramNode(N.diagrams[B])),z.originalSrc=t))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(z){var t=f.apply(this,arguments);z=this.backgroundImage;if(null!=z){var B=this.view.translate,I=this.view.scale;t=mxRectangle.fromRectangle(t);t.add(new mxRectangle((B.x+z.x)*I,(B.y+z.y)*I,z.width*I,z.height*I))}return t};this.addListener("xmlNodeChanged",G);G();
+urlParams.page=N.currentPage;G=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,G=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(z){return!mxEvent.isPopupTrigger(z.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=G&&this.setLayersVisible(G);this.graph.customLinkClicked=function(z){if(Graph.isPageLink(z)){var t=z.indexOf(",");N.selectPageById(z.substring(t+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(z);return!0};var k=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return k.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof g){var D=this.getObservableParent(b),p=new g(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(D,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var g=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
-null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
-L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
-ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
-if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(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"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
-na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
-1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
-D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.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;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
-ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
-g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&la()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
-function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(m)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
-this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
-"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
-mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
-this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var g=[],l=this.graph.getModel();l.beginUpdate();try{for(var D=0;D<l.getChildCount(l.root);D++){var p=l.getChildAt(l.root,D);d=d&&l.isVisible(p);g.push(l.isVisible(p));l.setVisible(p,null!=b?b[D]:!0)}}finally{l.endUpdate()}}return d?null:g};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!g){g=!0;var N=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?N.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){N=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
+R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};N={left:N.left-R.left,top:N.top-R.top,bottom:N.bottom-R.top,right:N.right-R.left};this.toolbar.style.left=N.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=N.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=N.top+1+"px"):this.toolbar.style.top=N.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),D=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(N){var R=b.offsetWidth;R==D||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=N?N:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},D=R,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=D=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(N){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==N&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>G)?(N=null,null!=G&&d.height+2*this.graph.border>G-2&&(N=(G-2*this.graph.border-2)/d.height),this.fitGraph(N)):this.widthIsEmpty||
+null!=N||0!=this.graphConfig.resize||""==b.style.height?(N=null!=N?N:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+N.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+N.y),D=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(N){d=this.graph.getGraphBounds();D=null;E(N)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),g=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+g):g,null!=d.y?Math.floor(b.view.translate.y-d.y/l+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
+GraphViewer.prototype.showLayers=function(b,d){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var l=this.graphConfig.layerIds,D=null!=l&&0<l.length,p=!1;if(0<g.length||D||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(D)for(var N=0;N<l.length;N++){var R=b.getCell(l[N]);null!=R&&(d=!0,p[R.id]=!0)}else for(N=0;N<g.length;N++)R=b.getChildAt(b.root,parseInt(g[N])),null!=R&&(d=!0,p[R.id]=!0);for(N=0;d&&
+N<E;N++)R=b.getChildAt(b.root,N),b.setVisible(R,p[R.id]||!1)}else for(N=0;N<E;N++)b.setVisible(b.getChildAt(b.root,N),d.isVisible(d.getChildAt(d.root,N)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){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 d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
+d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var g=null,l=null,D=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);g=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
+l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),D())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,N=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
+aa){},mouseUp:function(ja,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<N&&Math.abs(this.scrollTop-E.container.scrollTop)<N&&Math.abs(this.startX-aa.getGraphX())<N&&Math.abs(this.startY-aa.getGraphY())<N&&(0<parseFloat(d.style.opacity||0)?D():p(30))}})}for(var R=this.toolbarItems,G=0,M=mxUtils.bind(this,function(ja,aa,qa,sa){ja=this.createToolbarButton(ja,aa,qa,sa);d.appendChild(ja);G++;return ja}),Q=null,e=null,f=null,k=null,z=0;z<R.length;z++){var t=R[z];
+if("pages"==t){k=b.ownerDocument.createElement("div");k.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(k,70);var B=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";d.appendChild(k);var I=M(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";t=mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=k.style.display;I.style.display=k.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(M(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),M(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),M(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"==t){if(this.layersEnabled){var O=this.graph.getModel(),J=M(mxUtils.bind(this,function(ja){if(null!=
+Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var qa=this.graph.getGraphBounds(),sa=this.graph.view;0>qa.x||0>qa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale}):null!=this.graph.originalViewState&&0<qa.x/sa.scale+this.graph.originalViewState.translate.x-sa.translate.x&&0<qa.y/sa.scale+this.graph.originalViewState.translate.y-
+sa.translate.y&&(sa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=J.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
+Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var aa=mxUtils.getDocumentScrollOrigin(document);Q.style.left=aa.x+ja.left-1+"px";Q.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");O.addListener(mxEvent.CHANGE,function(){J.style.display=1<O.getChildCount(O.root)?"inline-block":"none"});J.style.display=
+1<O.getChildCount(O.root)?"inline-block":"none"}}else if("tags"==t){if(this.tagsEnabled){var y=M(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
+e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=y.getBoundingClientRect();var aa=mxUtils.getDocumentScrollOrigin(document);f.style.left=aa.x+ja.left-1+"px";f.style.top=aa.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");O.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));y.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&M(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],null!=t&&(t.elem=M(null==
+t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(R=b.ownerDocument.createElement("div"),R.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;",R.setAttribute("title",this.graphConfig.title),mxUtils.write(R,this.graphConfig.title),mxUtils.setOpacity(R,70),
+d.appendChild(R),this.filename=R);this.minToolbarWidth=34*G;var ia=b.style.border,da=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),aa=mxUtils.getScrollOrigin(document.body);aa="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-aa.x,top:-aa.y};ja={left:ja.left-
+aa.left,top:ja.top-aa.top,bottom:ja.bottom-aa.top,right:ja.right-aa.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var qa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(sa){for(sa=mxEvent.getSource(sa);null!=sa;){if(sa==b||sa==d||sa==Q)return;sa=sa.parentNode}qa()});mxEvent.addListener(document.body,"mouseleave",function(sa){qa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+d.parentNode&&da()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,d,g,l){var D=document.createElement("div");D.style.borderRight="1px solid #d0d0d0";D.style.padding="3px 6px 3px 6px";mxEvent.addListener(D,"click",b);null!=g&&D.setAttribute("title",g);D.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(D,"mouseenter",function(){D.style.backgroundColor="#ddd"}),mxEvent.addListener(D,"mouseleave",
+function(){D.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),D.style.cursor="pointer"):mxUtils.setOpacity(D,30);D.appendChild(b);return D};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,l){if(null==l)for(var D=mxEvent.getSource(g);D!=b.container&&null!=D&&null==l;)"a"==D.nodeName.toLowerCase()&&(l=D.getAttribute("href")),D=D.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(g):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(g)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,d,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
+mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var g=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=g;
+l.refresh=function(){};var D=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var N=l.editor.graph,R=N.container;R.style.overflow="hidden";this.lightboxChrome?(R.style.border="1px solid #c0c0c0",R.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",D)):(b.style.display="none",d.style.display="none");var G=this;N.getImageFromBundles=function(Q){return G.getImageUrl(Q)};var M=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=M.apply(this,arguments);Q.getImageFromBundles=function(e){return G.getImageUrl(e)};return Q};this.graphConfig.move&&(N.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(R.style,"border-radius","4px");R.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(R.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(R.style,"transition","all .25s ease-in-out"));this.addClickHandler(N,l);window.setTimeout(mxUtils.bind(this,function(){R.style.outline="none";R.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(R);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(R.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});l.lightboxFit();l.chromelessResize();this.showLayers(N,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
-GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var m=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){C(p)}):C(m.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
-new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.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>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
-ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
-else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(g){d.innerText=g.message,null!=window.console&&console.error(g)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var g=0;g<d.length;g++)b.push(d[g]);return b}var l=document.getElementsByTagName("*");d=[];for(g=0;g<l.length;g++){var D=l[g].className;null!=D&&0<D.length&&(D=D.split(" "),0<=mxUtils.indexOf(D,b)&&d.push(l[g]))}return d};
+GraphViewer.createViewerForElement=function(b,d){var g=b.getAttribute("data-mxgraph");if(null!=g){var l=JSON.parse(g),D=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){D(p)}):D(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,g){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=g;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},d=function(g,l){function D(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
+new D,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],k=f.childNodes[0],z=Q.resizeSensor.childNodes[1],t=function(){k.style.width="100000px";k.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;z.scrollLeft=1E5;z.scrollTop=1E5};t();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var O,J,y,ia;e=function(){if((y=Q.offsetWidth)!=O||(ia=Q.offsetHeight)!=J)B=!0,O=y,J=ia;t()};var da=function(ja,
+aa,qa){ja.attachEvent?ja.attachEvent("on"+aa,qa):ja.addEventListener(aa,qa)};da(f,"scroll",e);da(z,"scroll",e)}var N=function(){GraphViewer.resizeSensorEnabled&&l()},R=Object.prototype.toString.call(g),G="[object Array]"===R||"[object NodeList]"===R||"[object HTMLCollection]"===R||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(G){R=0;for(var M=g.length;R<M;R++)E(g[R],N)}else E(g,N);this.detach=function(){if(G)for(var Q=0,e=g.length;Q<e;Q++)d.detach(g[Q]);
+else d.detach(g)}};d.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=d})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index a6ec0af0..d87fee5b 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"20.3.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index 0a93988b..b249a87f 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -113,7 +113,7 @@ diagramSvgDesc=Image vectorielle éditable
didYouMeanToExportToPdf=Vouliez vous exporter en PDF ?
draftFound=Un brouillon pour '{1}' a été trouvé. Pour poursuivre, souhaitez-vous l'afficher dans l'éditeur ou l'ignorer ?
draftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.
-selectDraft=Select a draft to continue editing:
+selectDraft=Sélectionner un brouillon pour poursuivre l'édition :
dragAndDropNotSupported=Le glisser-déposer n'est pas supporté pour les images. Voulez-vous importer à la place?
dropboxCharsNotAllowed=Les caractères suivants ne sont pas autorisés : \ / : ? * " |
check=Vérifier
@@ -551,7 +551,7 @@ openRecent=Ouvrir récent
openSupported=Les formats supportés sont les fichiers sauvegardés depuis ce logiciel (.xml), .vsdx et .gliffy
options=Options
organic=Organique
-orgChart=Org Chart
+orgChart=Organigramme
orthogonal=Orthogonale
otherViewer=autre lecteur
otherViewers=autres lecteurs
@@ -822,8 +822,8 @@ recentlyUsed=Recently used
listView=Vue liste
gridView=Vue table
resultsFor=Résultats pour '{1}'
-oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / \ { | }
-oneDriveInvalidDeviceName=The specified device name is invalid
+oneDriveCharsNotAllowed=Les caractères suivants ne sont pas autorisés : ~ " # % * : < > ? / \ { | }
+oneDriveInvalidDeviceName=Le nom de l'appareil spécifié n'est pas valide
officeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.
officeSelectSingleDiag=Please select a single draw.io diagram only without other contents.
officeSelectDiag=Choisir un diagramme draw.io
@@ -976,13 +976,13 @@ working=Working
confAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates
confANoCustLib=No Custom Libraries
delFailed=Delete failed!
-showID=Show ID
+showID=Afficher l'ID
confAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.
uploading=Uploading
confALibExist=This library already exists
confAUploadSucc=Uploaded successfully
confAUploadFailErr=Upload Failed (Unexpected Error)
-hiResPreview=High Res Preview
+hiResPreview=Aperçu en haute résolution
officeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.
officePopupInfo=Please complete the process in the pop-up window.
pickODFile=Pick OneDrive File
@@ -998,7 +998,7 @@ inches=Pouces
millimeters=Millimètres
confEditDraftDelOrExt=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.
confDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session's modifications.
-macroNotFound=Macro Not Found
+macroNotFound=Macro non trouvée
confAInvalidPageIdsFormat=Incorrect Page IDs file format
confACollectingCurPages=Collecting current pages
confABuildingPagesMap=Building pages mapping
@@ -1070,19 +1070,19 @@ pageLayers=Page and Layers
customize=Personnaliser
firstPage=First Page (All Layers)
curEditorState=Current Editor State
-noAnchorsFound=No anchors found
-attachment=Attachment
+noAnchorsFound=Aucun ancrage trouvé
+attachment=Pièce jointe
curDiagram=Current Diagram
recentDiags=Recent Diagrams
csvImport=CSV Import
chooseFile=Choisir un fichier...
choose=Choisir
-gdriveFname=Google Drive filename
+gdriveFname=Nom de fichier Google Drive
widthOfViewer=Width of the viewer (px)
heightOfViewer=Height of the viewer (px)
autoSetViewerSize=Automatically set the size of the viewer
thumbnail=Miniature
-prevInDraw=Preview in draw.io
+prevInDraw=Aperçu dans draw.io
onedriveFname=OneDrive filename
diagFname=Diagram filename
diagUrl=Diagram URL
@@ -1113,14 +1113,14 @@ plsSelectFile=Veuillez sélectionner un fichier
mustBgtZ={1} must be greater than zero
cantLoadPrev=Cannot load file preview.
errAccessFile=Error: Access Denied. You do not have permission to access "{1}".
-noPrevAvail=No preview is available.
-personalAccNotSup=Personal accounts are not supported.
+noPrevAvail=Aucun aperçu n'est disponible.
+personalAccNotSup=Les comptes personnels ne sont pas supportés.
errSavingTryLater=Error occurred during saving, please try again later.
plsEnterFld=Please enter {1}
invalidDiagUrl=Invalid Diagram URL
unsupportedVsdx=Unsupported vsdx file
-unsupportedImg=Unsupported image file
-unsupportedFormat=Unsupported file format
+unsupportedImg=Fichier image non supporté
+unsupportedFormat=Format de fichier non supporté
plsSelectSingleFile=Please select a single file only
attCorrupt=Attachment file "{1}" is corrupted
loadAttFailed=Failed to load attachment "{1}"
@@ -1158,9 +1158,9 @@ draftErrDataLoss=An error occurred while reading the draft file. The diagram can
ibm=IBM
linkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.
linkToDiagram=Link to Diagram
-changedBy=Changed By
+changedBy=Modifié par
lastModifiedOn=Last modified on
-searchResults=Search Results
+searchResults=Résultats de la recherche
showAllTemps=Afficher tous les modèles
notionToken=Notion Token
selectDB=Sélectionner une base de données
@@ -1173,7 +1173,7 @@ repository=Repository
branch=Branch
meters=Mètres
teamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)
-contactOwner=Contact Owner
+contactOwner=Contacter le propriétaire
viewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.
website=Site web
check4Updates=Rechercher les mises à jour
@@ -1197,7 +1197,7 @@ confAFileCleanFailed=Cleaning diagram draft "{1}" failed
confACleanOnly=Clean Diagram Drafts Only
brush=Brush
openDevTools=Open Developer Tools
-autoBkp=Automatic Backup
+autoBkp=Sauvegarde automatique
confAIgnoreCollectErr=Ignore collecting current pages errors
drafts=Brouillons
draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index de0c1f7f..cfbc2ca3 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,c,a)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(c.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=a(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"cad0dba3fac4015470adfd8a7b7bc073"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"ce45ae8650f5c256034bb1cb01a8278b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4cf52a1356b27d0709033f454e875f74"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c52b2f8c9375bee16f723d685c8ab594"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"2295073c89ee8d856cc6ba12c4b9f4ca"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"51177342e9df51e133f05e61575131ee"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"15188e7f36099d5e2ad0fafe4f783f44"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"9835a94d469af27db7dbfecf6d434ebc"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"1a42bea88b2eb89ae8261a0d11106e78"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"63ca63773f881838319bad29ad26511d"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"63878a1a95d77c4f767b7e2c78b86746"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"a3dcf8caa10e3ad0af9f1bac2830896b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4cf52a1356b27d0709033f454e875f74"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"807bd74721e4d24fcd713f8760a66fa5"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"b4d98db6c4f0a10c4362c51813ad0ff7"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"51177342e9df51e133f05e61575131ee"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"15188e7f36099d5e2ad0fafe4f783f44"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"9835a94d469af27db7dbfecf6d434ebc"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"1a42bea88b2eb89ae8261a0d11106e78"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"2ec4404b564bddab5382d4a8ce86b600"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index bdc6649e..6e283dd3 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/be9b51b408f0b83e06adad63bbefb661/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"cad0dba3fac4015470adfd8a7b7bc073\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"ce45ae8650f5c256034bb1cb01a8278b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4cf52a1356b27d0709033f454e875f74\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"c52b2f8c9375bee16f723d685c8ab594\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"2295073c89ee8d856cc6ba12c4b9f4ca\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"51177342e9df51e133f05e61575131ee\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"15188e7f36099d5e2ad0fafe4f783f44\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"9835a94d469af27db7dbfecf6d434ebc\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1a42bea88b2eb89ae8261a0d11106e78\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"63ca63773f881838319bad29ad26511d\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/f4abba42591b799d18215f785f9b7242/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"63878a1a95d77c4f767b7e2c78b86746\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"a3dcf8caa10e3ad0af9f1bac2830896b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4cf52a1356b27d0709033f454e875f74\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"807bd74721e4d24fcd713f8760a66fa5\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"b4d98db6c4f0a10c4362c51813ad0ff7\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"51177342e9df51e133f05e61575131ee\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"15188e7f36099d5e2ad0fafe4f783f44\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"9835a94d469af27db7dbfecf6d434ebc\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1a42bea88b2eb89ae8261a0d11106e78\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"2ec4404b564bddab5382d4a8ce86b600\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
diff --git a/src/main/webapp/shortcuts.svg b/src/main/webapp/shortcuts.svg
index 56cb7fd0..3297e403 100644
--- a/src/main/webapp/shortcuts.svg
+++ b/src/main/webapp/shortcuts.svg
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file with editors other than diagrams.net -->
<!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" version="1.1" width="1428px" height="1070px" viewBox="-0.5 -0.5 1428 1070" content="&lt;mxfile modified=&quot;2022-07-14T04:33:37.920Z&quot; host=&quot;test.draw.io&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36&quot; etag=&quot;thj8Y3ckz6RlZYrYHKMN&quot; version=&quot;@DRAWIO-VERSION@&quot; type=&quot;device&quot;&gt;&lt;diagram name=&quot;Page-1&quot; id=&quot;150dc974-5404-6732-309c-fd6db42db779&quot;&gt;7Z1bd6LM0oB/Tdaa92KygAaES4+JMx4SNckkN99CJEiC4kaMh1+/uzkpdBvz7qGbfNpZM4kiglY9FF3V1VVXoD7b3PjGYtr1JpZ7JQmTzRVoXEmSqAIA/6At23iLKCvRFtt3JtE2Yb9h6OyseMdk68qZWMt4W7Qp8Dw3cBbZjaY3n1tmkNlm+L63zu726rmTzIaFYVuZj4E2DE3DtbDdnpxJME2+mCLvX7i1HHuanFpU9eiVsWG+2763mscnvJJAM/yJXp4ZycHiEy+nxsRbH2wCzStQ9z0viB7NNnXLRdLNyq115NX0g/vWPPjKG9SnsdJ73FmrRmAO37Xuz20D/ARy/Ok+DHdlJV8k/LjBNpER/OQL9NCZhcKsfVh+4EARdoyx5d55SydwvDl8fewFgTeDO7johVoqn7rnen54KPAa/hwco+o6Nnpv4C3gVmO5iJT86mws+Llr4SmryVYh2QIfT4zAuALV6KnUWn7YV1JtM4PfuH5325NetjV5/LRZmTvBMW4HgtnwPjpgAiZbBXS3yoc5Mz+6b9V1t67vJjPTad9Og/GNsuvPp0vjSfHvhr+8ye1g3Xe0D/gu0Jmbu85M375stU1/9K50QLRf26kB42kgGA3B6Y5e1la9bRs3j4sXaSrcDdub3rwmw30k4+kR3M90GW5btxtVu/t2j/7D87645ry3GEuy3n5rrrrDNvwed7e16eTGtk0w2I6lwIXveuu+uU5v9ryFR5sZT5tlbts7/MS97uhh1Rs92L2hLPYe1pvusLqZvHVX3cak0dvK655TFTpvD1K7cW/D50oXPm83mltzh/Z5QNuEXr0K2g1z1R/1pM6oDbf/ekN/+437oPN2L3dGD0HXkZVeXRDhY7hfawefb3oOfP52v2s3HgJ4fqX7+Lzp3qzR+eB+96te41EdjZpK5+0d7tPcPG+FVXdkBt2hvOsPhVVv10bHhdoRNp23521n1IXndJedURO+t23D/YTurAu/HzzWDp63YaNt8LtAqaHXHfjZJXvbeaturXdh091WN+g7Tt6i75CcB54T7Qvg54fHadpduE94jrdWfK579JmE3k0Xfl8TfqcHIdw+eofnfA/C8zhV+BmrO2sm7DpvtoLk02v8WoafMXztHn6/6Ljd0XP42XtDAX62h/Azd53ofUZdCD9vJIt7eHwzlDH6TqE8hvIaHm+LtllO++Pubf1hgpf5nY0uJ/SvhpuB2DKgK8zaHGyKzcKN5c2swN/CXeJXZU24Vir6/ic6QGLSBSk28uu9gZTkay3eOj2wjgebjdgw2+np9rYJPojNE9lUgdM2KTQsyESERmE9dQJruDBM9Ooa3qrgtmkAjQFoiPDhq+O6B0aoFf7A7cvA996t5JW5N0fW7dWbBwc7Rz/FCFoUhIxoZRmXbGqRD+UKhL8XqnIhQlUE9VrXMZpPilj8exGrFyJiuaKw47ZyIUJVEgGyEKp2KUKtSOyEql+IUFWgsrOp4hcclPOQqiCzQ1UUL0Wq6lfv/0VIVboQqVYEkaFUL8UdqACG7oAoX4pU1a8OVou4W12Kl1XRNYasXopjpQGGPoB4KZ6VpjJ0AsRLca00HZQVZ5EuxScQBeWrrlYB6EqX4hSIgsTQ10qkePZi1fWvegVF2IBL8Qp0haEHK12KV6AncWUmUj1Xr0BWS5zQOtvplrxUS5zROtvZF0zGLGdfznb6BZMqy+mXs51/yUuV6fwLOFdfC5Mqy/kXcK4+ATYiYJkqAM7VJ8BYZTmrBc7VJ8hLlemsFrgUn4DprBa4FJ+A6awWuBQvgOmsFrgUL4DprBa4FC+A6azWV5aJnIdU9a96AQXYVflcJ1zyUmUabZUvxbcSCQsz6En1UnwrUWHoscqX4luJGksLcCm+lSQyjAPIl+JbSYqQnW9hOSS4FFcLiAwzW+RLcbUkjWEQW74UVwvIDMMCyrm6WlgWFsvhq3KurhYmVZbDV+VcXS1MqiyHr8q5ulp5qTIdvirn6mphUi1x+Kqcq+eFCZnlQEs5V88rL1WmToFyrq4WJlWmw9dzdbU0qczh67m6WphUWQ5f1XN1tTCpshy+qufqauWlynT4msz2nr9U88PXL8q4gNGreq6OFyZjlqNX9Vwdr7xUmY5e1XP1tDCpshy9qmfraYlamWI9W1cLEytTG3CuvhYmVrY3rHN1tnCxKuK1cPDDcP125Vx9L1zILN2Eyrk6X5hYmfq0yTrGCxArywBM5VwdLlysLKOFlUvxuEj1BioCLaleisdFWrNJT6rn6nHlpaoI+P2KnlTP1eHCpAr0zAhW+qKMixjBnqv3hcmYUMWBHrnn6nzlpaqqWlm+l3auvldexkxXdGvn6nphUmW5ols7VxcBk6qqZOzBV2VchD24FH+B6fpu7VL8Babru7VL8ReYru/WLsVfKLFqsXYp/gLT1d7apfgLTKvr6pfiITCtrqtfiofAtsC2Ll2MWFmWg9fP1SvAJmdKDMXo5+okYEJmGovRz9VLwMXKMhijn6ubgIv1y/X1ihDruXoGuFj1SmmW9lwdBUzIOtNOksK5ugq4XNn2PT1XZwGXK9MenckU8fnLVfy6fS1EsPhMzY/h1HkNrqTaP815YPmYnOE3g5+gZriOPYdbXOsVPUVf2TENtxpvDjwk8SVUgDO3O+E+DXm/ZRB/D7TJg+99db01fDp1JhMLvr3me4ERGOPwnEidC8+ZB+EXVWrwH/zqdeFauVLgB6rD5+L+OfyHdvehxuZQm4YT6sYylsHaWgafaBNtH8ZfUyxEtXJWs4p6aom/KAmZO22inUO1Jx1U/k7tuJsYK1tAB5GEkTE+pnjyJXJwPcWbOCD/FhAtmxYj4hFZdoDgLm4WkBZugDkfdPmQpJM1Qtjxgfvq9cCHu9QiTOrSVTUmJbmdIJNysBkBFD9sLk0OE2uYFHCNe8tph4PMQENO9vw7ZPA4RIxMLSWhzTlgzYGmZIyKhkem2BkVPKQSE/LAuWDMBRAr3+dmg0eBYi6uU8uBJMsZYcxIUvayDChEPIQlMiHgOynX2YW6FfYYjtBnbPyUiwlPpFNdn44aREJ0QixEx3g4rWet4QbXgfqCO87hr1fPnxlBYE3QdmNsuUtuCD4xBEIRWCRvSUMbuKsqkRYbFHPl48HATsTD2LeM92wMIxlYzifo68bIcEzKwUTDY8YSvRsEHtocBoaPILAmTgBVkJAA/3qvCAXLtczIkJjhwTgfTPlIn7MxI3gMdIh0coAH1z9V/QPxS6OLJA5aPAF4kHPk2bYb3ko8d5LePZwA6tJEZmKeNRMhERwTxmYiH7JgaTTwuGeKDJp+9OORKQflG4ACRKZo4PHN4Wph+UvTdxZBakuGq3G6hVPyHSghRDHS8j/FU4LHOPcT7nzWlX4QS67kZl2l7BJOAc8X0nMhLZEWG3ics+omU2ecC8ZcEGIaIrWbh4RHMxOr0PAN7oow1z4hVMHKDKSfPm8GOAklkEAKSlC0A3hsM57q2o8SqpwB1gwQAxPM7AEeyIyZSJBop95Fk7PBmg0NHzBStA940DJiIZdsNQydSg4DYxhIEYc0ZlQ8DHj8Mhoo1F3HfOfKZ618UjoEaW68GOXjkcjkohfmYRwpNgkL3/pwvBWf7qQdWFJyyRLp9XnIg0JIsCyGB0L4MeEh/locAMYAKJVToSWKPOCBxnSmIvDSuLODYtCcC7Zc5BZ6sOUCDzImaREHRCTDycSCOCirf8l5KYUXYl5EkgVVOCCAEIpMMDDcvasRapOjwBgFBVzLJ9KyqQ05kyXSJDIi1VnLFA9rYlt8zMmcD1I0QqblgAI8WpmOMQ5vJksoZ24rWLPwlSUcMq1hBiBkXya2IkquFMYW0gGngjEVpCgFoGYh8HhlFKJ6mloWz7ClHqJKmvilvVfkE5VURZUaCnjAikNQBgSKoGfGkISQNaA2hCREqeIpCw5DKTDI0oleLBRhwENUUcWexIcI9fHTjGYzePpDKXxUwIlka1GlxsexfLjc9DcHowQwVEE5NZSgZjhkPEQVgTGwlmhJbGI/ulAXHAzWYACNtIoH0FrnJxOiUrFhuIWH4/pnrf+knS0bU4CHoJrzCVc6Y6VXCK2PKCodDy5lq5PxC78MBoByok4wRSKO5cWlg8RbzgNrHtTKtVIWD3hqXMzDL84BYw40gRRxpqb5o5UJE0vACWBOACgvyCQfKzsIT4gKD/7orWYLY/IPh4I1FLpaWhhaPlZpUPjJkSgPCV1iGkU6WlZQ4JpnbQzUUy0e6XGg4NHEujH/MFAu087zZldR1bCWt+Ip1LSzFVSQn7AmhBIlWkkrCh5MSklIdIX0b/oeLw/GnAU0b01aUUHNLhDWXSY0TD3f2cHvy3kokYck9suGBjzCdGeg5EYzZoJrn632K4R0RnpjBEI8ybfCrNYkV8GahbONwjJKYeA4MMVBJS6ioYYDHmRq23PPR/q3fbgbVz9j9ZMnnekBgEeV+JxTGXonTTbT0zoeNhpYr761nHLFM1Y8ccKZnuLxUNHAWlrhwifH4osYmGv/9FQzNRZUPFzUcoLw7PMJX9DCngU0zcxS/3i+WaT/hWHzAQBr7RMnl+npHg8QRroP1l5MAI8EMEcgWYbKBgFCVHC1DMJpgmi2gKufrfpPTx3RgwEPCr7sZ4w4CGxBOJ1QQA8EPD4Yg8BnDdmTQMwjoKd7QsZZtGQtKrRkevN5XD4FZaYLphtWThF+xNkGBzuH/XHj1+GJ4YFB2NwtSV0jHfefcFchWgS1P0hy0vQYyen2O8YfBc9z8T3UywJ9PxHHj0ztQTc66TPN43QXoH8lKbuY6F8lNJpKcn4O9Z9s+zv941EhTKLLqbFAD50ZchKgTJcLpB3QeHU2SNC1+IXGBF6LV6AaPZVaC9SGqO481vqDtfD7xvaq8Kc3fJg2H2z0UEO/Xqp2F/6pj3rK5hVtqD/Wuo/NP+HERP4feke9r3fvlmjP6p/BcOR2q/f98fMLOmJr8GvQbD1YLeVx+9b8bTeq94Pezd1gWAVatab+aj4tH95tO9CnnZvGeOJOldGiMlAad7tatflbVvtt6cG8n078m5ffULWteVUENf1emf5n3XTeIH7G+6MDt29bje6v1ltHe3QfJmuo3pp9uxk/wb/PS9sNP1rt1+BBafrvv2zbRlJE/46CVQBFsqbA+8f+DpK0wk2qdgkKKeREMCpFdEtW8YhT5uIPrTayIrqALnhkptHVbL6vnaWVtwj73aneiGbwloKOTLzNfNVCUDAHoiDhc4VSsro0ozqhANVVCPlEyPSCKtxYXb4nXdCF6AFauRi+1PcdGw4bs69Glj9+K/zVntGPMnxfPSp4oEdSCHa9GD3igZ5cJnmHj+w+GdkVkSeoJQVk0pqq8smaRtSKb1fw6E8OiD4HgjUQuRqrhJkAejwcLczf5Ryw5oDQsEVj1KChcnLx4R3ngTEPcAhwKipIzy4cXXyY8MDtA3MevlA4lR4QR9ck/uYgsAaBUCE12VS84vE0sZbIVc5Y5UARTiw/1ahd+Z9U4e8YW8tfXvHEEUazBLqcC+iR+nNUqJGAB/RSEvqrIO4bzVEoB4WcFykRIr3UyNDweGFzEmaVwGMZ4YQA54ExD5p2MsxEjwc87phaipbnz4wo2WzOq6Uy5yI9BBsQ8HhjbBjibyAJmeNyEhiSgFqCnujhQw8MPPCYWoiRYfMxZXlYaEpp5XI1Qq39MU8/Yg8BqcWCTqv8qXasCei+YXScCBDloEjCqx8mprnO2Df4nYN5NEKWlRPRCInaMmYND0RmYYkXM6Po5D8H+WZhFx/jEJqEJg4PW3gq6olpDUmmBs/x3g2ck2/GCaqVcmhkCGV0KFoZQnU1Dsg3A0QWM/4LHvCiyMeRvg7xzSc1KkkKM0eDLRoVOWM7WKKh47HQhrMM5SsJvrVwo/YwcSJ9mlgfmpWJD1UpCYHh21aAfOB0UOOEtTnQJnPlR62wI6B4iUfavpEo6NjwF+NJFmlNwOp4LLU9X1p+QIAomO77VlroJSewZhyjb4pRMrXOBiM8EjtIjdExbtYO/GDJy2ETq4NXOS9seckPiAleN7VwrU7IE91bHbQ8YzWPzVBIyNKZIGS81yxWqKMyB4c5OHCgfJg4RnCk6IGDR3TTMmNJNC8O2GR5Qh5WtLIMigMpgXPDnBtCfUIgULtBHU053YeBhxyCTyCg4UmpFSGbdIoRoVMzHcfaHtReOAaMMagIUiZoi49c6WGAh+KigH9iFaqcBtY0ALk0GvDA263nokFCCAUHgS0IOqmeOVH5lb9XviTgobXcqpQbjgBjBPKNkfDsMlq2QErOhePAF6sxx0A9FXGnhwEe2YoxeOYYsMZAV080TKSHwdGlzMnNgbsNrHEgVbGiBwAheTCNLg3TR430UWsfe+JksCZDxU2DKFJDA48t/eEqZ61yHZwobkjPNBxbvRxf/5E24ikuDgZjMERBIiw9oBVolgQ8rvgjQ0M4XkC5o82lyWFgDoNCWHEgkCqdFQGDiIcUhkbYBOmHseRJEfTXHeDTDScartNKDobDDwyFh/nE4wwwZqAigFP1sOgxQIglRPPSTpT36/vemtfHZ47E6WYp9JDA4wppBsPUmE/cMJ0OVRv2r5JUqZm3WvJEF+aU6NqplSUCaQ1bARWUIX8YJel6Vt5OrwQY8vMShEIp9EwGHm6483kKUwkQ5GYlJJYQ4DGHgYWGk8KPp3BlO3cv2POApidYMoCHGhIGOs58tUEHMMz+kJPAmgRifw16HBBymCZwTCCMkJqlVs9Dle1bA+hnGPNw0NBquq6zQIPIViesq8X5YMsHYX5CojY/IX5SWa3lW9Y0WujT9SacBOYk6NkyOSzHEBIenYTiCTUOabDmK04DYxqIcxWp91c8AIQUJ2NuorppgjVxAgc114mnLYw4SMWJYEwEacKCnknAw1FRcRyu9qNqL2KeShRzq2N0Ur00kU29fkkihJsMtHQ8GihMw5RoTgRjIoBG8i6ZMUGIOjlzc8pBYA5CBXce2GGAx50i03CwDtcM38OxYIuFSEqLZscFHovqemGmQ0RDPIq8M9A8p2nMPww+z0l9yS0QvjCooDeW/KS0f2QtolnvOEluNR5b/jgcYXAuGHMBCOFKnVaGnISHo154X/gy1E4aSEi0zAH4LNo049GmEgAgDxnoEUAIN638JfzeXPOsB4uk1i4So7EikDAO0pKGnIdyeFDUk/08mOFxdKkdp6MkOvLdXkqE42QrUQ5JOZDATaeyaJlBcqzkP2ekZEZyTWHKZORYpX/ORklsEPqOsqPhaDWwtEM1mgp/WHAuWHMBRC3LABETWlwQKvUTuGh4a54awZ4MWT/ptFCLbgM8ijk0fe9griM7//FjEfA8XPoRrvx6X1KcQ6a13FfGQ5w5CNBiHYiBgAYY8KvyesUlIKHgBQXTNtTFI4HHPAfW0tlhliFCIpoX42yUxYZGCG0kDeSKZwOPg2JsRKv7BLSV3z6Y85AeI2MraE2MyoTAp+vNCf1cOAeMOUBxC5YDCTzKmQ4u+Z2hFAJI0Ql6+ict8bU+HG+15ASURAAQCYn4tPp8STIenuxFqRJc+6Von9CymF5wQT4ZjhxwBD5BgEq4Sa0QEBCoIXA08tjkqmet+gopT4qe6vHQYu7qb3AEmCOQ60pBKiNICwgFjyvmkx44EMyBUNXygCBkUmaBeORAMAcCtSs5mKckBAzoAYGHEuuuZaCQ8sR6NVZu2oqVc/EJF1SyrInjRmoz1goeRGxOHK7+0tRPHDvSUz8hcmgF0VG5LSgfBkDMu6cFA6HppbfYcvWXpn6VMPdMT/14DPEOCsHi+i9N/8SOdhQJIMQRHwbD/uAqXZBdvWnCP7+bz7z77eceQ/wcTc/Dp+hjFuJEVECGEFICQoVUVrgQPAgrtPv9DiehBBI0US4RBEIyY7PTrI/a/R6HgT0McnJllgGDikcbO9Vak5uFMkjQS7QKKiHKWO09VjkIZYCQHSfIIiGoRI8EPLz42G4+cQ7KuDXIZYKARxc77dqgOnhOPYp6v9eDIwfORvljSMZsEEKPo+dOk98uynEsc7MQSUITGxbwyGOjX3/oNnvcMHwDw8AYBjwK9dvajj3Dn1yhfphQZuYqoF0PcAZVjI78/5YNIcuGVCmGDUkTMmyIpDKzkCAcDkVM9vwrPCr4fSOXzPCb24xPbUYBBuILyc4arTVyFfxmkRaKHE6NRdgCbx12NYIPfgzfrcCc8tVQtGcvdBmcZEIsCIqHpeX3x2/R2kfXGFtu9Nb+wkIlQh30a+IYtm/MltdzK7i+vo7O4Trz92jXaRAs4AmroRfSMhaL68M3hFvBQ7STpKDdFLRJIe0KNy6Tu9L18sPen2pk+LYVf83/G7vGPO7nvWdZPZBpDPoBo76HWjlOYihyCJLJPRgNSLj2W4JWEZSc9mUy8UUMKyVBvk7u52kVQZUwmgDSNSAMKMR/3w4RPj3A45gNOZkx/zS1LF6WmvaNRM7BIVcIM94KrfnOCiFpPq41LezCGrOhKWl5K76IkvbtQwVfIEGi5XNUCDn0h62WY4FyCGiPIbAEmEyOLMt65Bo+r5WtCnfHcaB8d8i7GQgH+dMcep0aDfjkVnsOhxloABoXpQ4rchhhJ8WwbYE1QSsv4+EpR4Wu5Ujf8kklH4laPr2GT3g1vBUU6E/Tdcz3Y9o/a60Ws2giX58pt6rqC6VlaQ0ZNDxdUmRymX8nXceeprCncoQ+Y+NnUfMSuXlsYjUmwlUtFqLhY05iPHWZDASa88Dyw1CC0LNQzClqkhvvVV0s3G0SlBgar4bvYJjs/XyxGD9/ryUcsqOR7iL0JSXrmFJvPylpdWiIFUKNpKTt7N+pDPfojl6UPiqedPSaQZeFsQq8ZSzkf2muDy6Dr15AhdhLXbsGBz85XRCWE5CSiZMr6u9UcXRZ8p/02uDrUE/N7nnokwZIgZXCGMnN+svKqULc1Hws/ejCVL4g9RuQUTm5ZJkeGfiIOibjhpNROhmKQFyYQo+Goz0+kjHYA6eifCqSCpVsmDiaB9DZj70zAbsOZ6R8RiqEyT96jBBWtMZVkUKfLeGkwckonQxVUE51DZIZhXZ0PLRTM8x3pC3k14eB3oblWgFfE/sNuAFaZlKgTG6+GDDi7HwXdkgtTZnRcrRk34CjUToaFUH6NrcjwnLbpK5nXACe41I2LqC0KBpIpjUJhoTj8U3wQIksLJE4Gli9hUfjQJQPhK6fvr3QguNobLWJ+kZwNkpmQwNieWycjLRyA/I9ICFl0dPD4uSiK246vgUVuno6GEKLkaPB1oSRVhoJqXFWSmdFl7SypneBgEdYY1ZanIzyyVCZuq941DTXfj01G7wawDeAQyc3N6OGx8meys+citKpEAWJ4eIcIBxLLszPtPiGzen4BnQo2a7sEkNWREJ4FC3oTHJQwxLXHJGjiBSyPCdfhkwm3EJorfMFIh7wiitbc7WzVfvpjFJ6EOCRrRvfWy04BIwhOJI8Sk/xeOzqYW5z1ZehelKGKD3F4wGpjodWY7Ye5m74IB4CxB1vwuIwHAnGSFTkUyNDeoDgUajGauFChfGxAXMQVFJ1B3qqx4NOSVaesIQPzMCawIcmfBsv+8EcBUAqKkgRBjzEdH19vXbgmSECaR2YZXrDCGs6cC6Yc0FK10xWaRdPBR5jGq38eQrBAAkY2QtduKpLV0iigonGFWtnyW8frNkg9s1LGpUUzkayavqAjS6ShRGu8l/4HhJRZDI4B2w5ILXMo3bnSD/vwUoRHwoebgo8+OvVh183tRhDCyVJRK+MjeN1YTgclODQJUJCBKlWcTFw4GFH+KVdY4FuD2hcgcwFWoXGKWBKgZYkTLMxEYQOu5uFEVoCzkBpDACWgQYJD0E2N2HMicchS9E+KXmSnvbxOGSy/JirvxT16yrT+IKExxlbDroBtAbWwg0XFXMC2A4ESRlu9PRPWBdsIQsQxhh9vkirFEeRvCSLHgSEPDbXMtBdYG1skwLT2RmpwPPcwOE3CObmQSeMDyoqLTLwQGM1qTzINc9W8+Q8RmpGARBy01zvoHrocG0srvaparGwOBbMsVBIuUq0LAIgLN+dobGCA8ViGeiR94qACHNeUX58fxF3KsjtEWbSC69hyZqZYfaHaKqiKnCAIoAq4Q8GULY4q3ZVSFKskmuxCMRrQpFymR5UeDgSwyDbcGg9dQJrGFY9Ao21byClToMZarYk5rhAvYXCn6MQHblyCxCsKOZ60mmJWT2QKyDlFyf7/Z1c8QDfucpVlU4UuSBLWSxCyngILbtKaF9VmC8u/Dzjvwgy8o3mc0vWCTdLWs0XAMDDa1kyHvduFSeDORmqnGnhQ3C56ZFBWGUarvYQIt8qpmIChc7BoDyiFtMaAp/NwJCq0ReDAh6Ci5eAcBbKYCHbJSI0EuxomL1Wd9tfSvCnCfoPfW1x0xyOf5IQwUhYov6y8KEzM2zrQLcdlBB45y2d0AsDjbEXBN4M7hBmCqLioXY4BDyQ7mv4c5QPY7kI+1c2Xp0NGjjWwlNWk61CsgU+DpkF1eip1Ao7kNY2M+QZ3t32pJdtTR4/bVbmTnCM24FgNryPDpiAyVYB3a3yYc7Mj+5bdd2t67vJzHTat9NgfKPs+vPp0nhS/LvhL29yO1j3He0Dvgt05uauM9O3L1tt0x+9Kx0Q7dd2asB4GghGQ3C6by9rq962jZvHxYs0Fe6G7U3/tibDfaSXP792xpO+Qts6b014vpfFy59JfQxsvf1Wtbv16rbnVDf9eht1WbutTSc3tv0CjzoeVjftxrM9qlc3vXpVajfXdnd0b3eHtW670ZbajffkNfhutK0pwP/bcD/43q5TU+En2E1uf30Y0oPednqzl9mz0755WYxv1vB5d9t/aksvb22ns5O1DoDS28lIX4UMqOUKKvq0r8+hZftz6BVCew6CN/g/NEXFLgH1aaz0HnfWqhGYw3et+3PbAD+BjMcdriTVTWxD5lpQ/7Pykhd+Rl1SUAccKKLN/kX4yEZ/04a5ucOZ6fWwfwd4RU1qK4eb/tfThu15oxNCgUTnjF45ujl3wU+M5TT127xV4DpzK+4MGW88cNxyht/NGQU/UuFRo5E24slbhH0v+tj8zDZQmovp9doau57tLa8nvrF2PIA7j2JVqVVTGx4HNBTc1mf3O1gcjN+nirgBCFnHUtKvCewDQpcg8O9byMOnvoewSF+7QcLrehPUNrr5Xw==&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(238, 238, 238);"><defs><clipPath id="mx-clip-25-144-112-26-0"><rect x="25" y="144" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-176-112-26-0"><rect x="25" y="176" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-208-112-26-0"><rect x="25" y="208" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-241-227-35-0"><rect x="25" y="241" width="227" height="35"/></clipPath><clipPath id="mx-clip-25-273-112-26-0"><rect x="25" y="273" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-305-112-26-0"><rect x="25" y="305" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-337-112-26-0"><rect x="25" y="337" width="112" height="26"/></clipPath><clipPath id="mx-clip-202-237-10-20-0"><rect x="202" y="237" width="10" height="20"/></clipPath><clipPath id="mx-clip-132-144-192-26-0"><rect x="132" y="144" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-176-195-26-0"><rect x="132" y="176" width="195" height="26"/></clipPath><clipPath id="mx-clip-132-208-192-26-0"><rect x="132" y="208" width="192" height="26"/></clipPath><clipPath id="mx-clip-226-241-109-26-0"><rect x="226" y="241" width="109" height="26"/></clipPath><clipPath id="mx-clip-132-273-192-26-0"><rect x="132" y="273" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-305-192-26-0"><rect x="132" y="305" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-337-211-26-0"><rect x="132" y="337" width="211" height="26"/></clipPath><clipPath id="mx-clip-385-112-82-26-0"><rect x="385" y="112" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-144-92-26-0"><rect x="385" y="144" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-176-82-26-0"><rect x="385" y="176" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-208-92-26-0"><rect x="385" y="208" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-241-82-26-0"><rect x="385" y="241" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-273-92-26-0"><rect x="385" y="273" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-305-108-26-0"><rect x="385" y="305" width="108" height="26"/></clipPath><clipPath id="mx-clip-385-337-102-26-0"><rect x="385" y="337" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-112-147-26-0"><rect x="506" y="112" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-144-147-26-0"><rect x="506" y="144" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-176-147-26-0"><rect x="506" y="176" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-208-204-26-0"><rect x="506" y="208" width="204" height="26"/></clipPath><clipPath id="mx-clip-506-240-102-26-0"><rect x="506" y="240" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-273-138-26-0"><rect x="506" y="273" width="138" height="26"/></clipPath><clipPath id="mx-clip-506-305-137-26-0"><rect x="506" y="305" width="137" height="26"/></clipPath><clipPath id="mx-clip-506-337-128-26-0"><rect x="506" y="337" width="128" height="26"/></clipPath><clipPath id="mx-clip-378-432-158-26-0"><rect x="378" y="432" width="158" height="26"/></clipPath><clipPath id="mx-clip-378-496-122-26-0"><rect x="378" y="496" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-529-122-26-0"><rect x="378" y="529" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-561-152-26-0"><rect x="378" y="561" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-593-122-26-0"><rect x="378" y="593" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-626-125-26-0"><rect x="378" y="626" width="125" height="26"/></clipPath><clipPath id="mx-clip-378-658-122-26-0"><rect x="378" y="658" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-690-122-26-0"><rect x="378" y="690" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-722-122-26-0"><rect x="378" y="722" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-755-122-26-0"><rect x="378" y="755" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-787-122-26-0"><rect x="378" y="787" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-819-122-26-0"><rect x="378" y="819" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-883-122-26-0"><rect x="378" y="883" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-916-122-26-0"><rect x="378" y="916" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-851-122-26-0"><rect x="378" y="851" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-432-117-26-0"><rect x="548" y="432" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-497-142-26-0"><rect x="548" y="497" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-529-142-26-0"><rect x="548" y="529" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-561-122-26-0"><rect x="548" y="561" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-593-142-26-0"><rect x="548" y="593" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-626-142-26-0"><rect x="548" y="626" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-658-142-26-0"><rect x="548" y="658" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-690-142-26-0"><rect x="548" y="690" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-722-142-26-0"><rect x="548" y="722" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-755-142-26-0"><rect x="548" y="755" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-787-142-26-0"><rect x="548" y="787" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-819-142-26-0"><rect x="548" y="819" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-851-142-26-0"><rect x="548" y="851" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-883-142-26-0"><rect x="548" y="883" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-916-142-26-0"><rect x="548" y="916" width="142" height="26"/></clipPath><clipPath id="mx-clip-425-1006-239-20-0"><rect x="425" y="1006" width="239" height="20"/></clipPath><clipPath id="mx-clip-425-1037-258-20-0"><rect x="425" y="1037" width="258" height="20"/></clipPath><clipPath id="mx-clip-745-112-92-26-0"><rect x="745" y="112" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-144-92-26-0"><rect x="745" y="144" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-176-72-26-0"><rect x="745" y="176" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-208-92-26-0"><rect x="745" y="208" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-240-92-26-0"><rect x="745" y="240" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-273-78-26-0"><rect x="745" y="273" width="78" height="26"/></clipPath><clipPath id="mx-clip-745-337-72-26-0"><rect x="745" y="337" width="72" height="26"/></clipPath><clipPath id="mx-clip-854-112-162-26-0"><rect x="854" y="112" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-144-162-26-0"><rect x="854" y="144" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-176-162-26-0"><rect x="854" y="176" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-208-162-26-0"><rect x="854" y="208" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-241-162-26-0"><rect x="854" y="241" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-273-152-26-0"><rect x="854" y="273" width="152" height="26"/></clipPath><clipPath id="mx-clip-854-337-85-26-0"><rect x="854" y="337" width="85" height="26"/></clipPath><clipPath id="mx-clip-745-432-222-26-0"><rect x="745" y="432" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-464-232-26-0"><rect x="745" y="464" width="232" height="26"/></clipPath><clipPath id="mx-clip-745-496-222-26-0"><rect x="745" y="496" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-529-222-26-0"><rect x="745" y="529" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-561-222-26-0"><rect x="745" y="561" width="222" height="26"/></clipPath><clipPath id="mx-clip-1005-432-408-26-0"><rect x="1005" y="432" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-464-408-26-0"><rect x="1005" y="464" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-496-262-26-0"><rect x="1005" y="496" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-528-262-26-0"><rect x="1005" y="528" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-561-298-26-0"><rect x="1005" y="561" width="298" height="26"/></clipPath><clipPath id="mx-clip-745-657-82-26-0"><rect x="745" y="657" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-690-82-26-0"><rect x="745" y="690" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-722-82-26-0"><rect x="745" y="722" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-787-82-27-0"><rect x="745" y="787" width="82" height="27"/></clipPath><clipPath id="mx-clip-745-819-82-26-0"><rect x="745" y="819" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-851-82-26-0"><rect x="745" y="851" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-884-82-26-0"><rect x="745" y="884" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-916-82-26-0"><rect x="745" y="916" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-948-102-26-0"><rect x="745" y="948" width="102" height="26"/></clipPath><clipPath id="mx-clip-745-980-82-26-0"><rect x="745" y="980" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1013-98-26-0"><rect x="745" y="1013" width="98" height="26"/></clipPath><clipPath id="mx-clip-745-1045-101-26-0"><rect x="745" y="1045" width="101" height="26"/></clipPath><clipPath id="mx-clip-855-658-132-26-0"><rect x="855" y="658" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-690-132-26-0"><rect x="855" y="690" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-722-132-26-0"><rect x="855" y="722" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-786-195-28-0"><rect x="855" y="786" width="195" height="28"/></clipPath><clipPath id="mx-clip-855-819-132-26-0"><rect x="855" y="819" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-851-132-26-0"><rect x="855" y="851" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-884-132-26-0"><rect x="855" y="884" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-916-132-26-0"><rect x="855" y="916" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-948-202-26-0"><rect x="855" y="948" width="202" height="26"/></clipPath><clipPath id="mx-clip-855-981-132-26-0"><rect x="855" y="981" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-1013-206-26-0"><rect x="855" y="1013" width="206" height="26"/></clipPath><clipPath id="mx-clip-855-1045-132-26-0"><rect x="855" y="1045" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-893-102-26-0"><rect x="1105" y="893" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-926-102-26-0"><rect x="1105" y="926" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-958-102-26-0"><rect x="1105" y="958" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-990-102-26-0"><rect x="1105" y="990" width="102" height="26"/></clipPath><clipPath id="mx-clip-1215-893-132-26-0"><rect x="1215" y="893" width="132" height="26"/></clipPath><clipPath id="mx-clip-1215-926-188-26-0"><rect x="1215" y="926" width="188" height="26"/></clipPath><clipPath id="mx-clip-1215-958-112-26-0"><rect x="1215" y="958" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-990-112-26-0"><rect x="1215" y="990" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-112-112-26-0"><rect x="1105" y="112" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-144-112-26-0"><rect x="1105" y="144" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-176-112-26-0"><rect x="1105" y="176" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-208-112-26-0"><rect x="1105" y="208" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-241-112-26-0"><rect x="1105" y="241" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-273-112-26-0"><rect x="1105" y="273" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-305-112-26-0"><rect x="1105" y="305" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-337-132-26-0"><rect x="1105" y="337" width="132" height="26"/></clipPath><clipPath id="mx-clip-1245-112-141-26-0"><rect x="1245" y="112" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-144-170-26-0"><rect x="1245" y="144" width="170" height="26"/></clipPath><clipPath id="mx-clip-1245-176-177-26-0"><rect x="1245" y="176" width="177" height="26"/></clipPath><clipPath id="mx-clip-1245-208-168-26-0"><rect x="1245" y="208" width="168" height="26"/></clipPath><clipPath id="mx-clip-1245-241-141-26-0"><rect x="1245" y="241" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-273-141-26-0"><rect x="1245" y="273" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-305-122-26-0"><rect x="1245" y="305" width="122" height="26"/></clipPath><clipPath id="mx-clip-1245-337-132-26-0"><rect x="1245" y="337" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-657-92-26-0"><rect x="1105" y="657" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-690-92-26-0"><rect x="1105" y="690" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-722-92-26-0"><rect x="1105" y="722" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-754-92-26-0"><rect x="1105" y="754" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-787-92-26-0"><rect x="1105" y="787" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-657-112-26-0"><rect x="1215" y="657" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-690-112-26-0"><rect x="1215" y="690" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-722-112-26-0"><rect x="1215" y="722" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-754-112-26-0"><rect x="1215" y="754" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-787-112-26-0"><rect x="1215" y="787" width="112" height="26"/></clipPath><clipPath id="mx-clip-1084-76-165-26-0"><rect x="1084" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-76-165-26-0"><rect x="725" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-369-76-165-26-0"><rect x="369" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-5-76-165-26-0"><rect x="5" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-4-397-165-26-0"><rect x="4" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-365-397-165-26-0"><rect x="365" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-397-165-26-0"><rect x="725" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-1085-621-165-26-0"><rect x="1085" y="621" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-621-165-26-0"><rect x="725" y="621" width="165" height="26"/></clipPath><clipPath id="mx-clip-191-1-273-52-0"><rect x="191" y="1" width="273" height="52"/></clipPath><clipPath id="mx-clip-745-305-80-26-0"><rect x="745" y="305" width="80" height="26"/></clipPath><clipPath id="mx-clip-854-305-180-26-0"><rect x="854" y="305" width="180" height="26"/></clipPath><clipPath id="mx-clip-378-464-142-26-0"><rect x="378" y="464" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-464-115-26-0"><rect x="548" y="464" width="115" height="26"/></clipPath><clipPath id="mx-clip-855-755-132-26-0"><rect x="855" y="755" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-754-82-26-0"><rect x="745" y="754" width="82" height="26"/></clipPath><clipPath id="mx-clip-132-112-192-26-0"><rect x="132" y="112" width="192" height="26"/></clipPath><clipPath id="mx-clip-25-112-112-26-0"><rect x="25" y="112" width="112" height="26"/></clipPath><clipPath id="mx-clip-100-140-10-20-0"><rect x="100" y="140" width="10" height="20"/></clipPath><clipPath id="mx-clip-25-432-132-26-0"><rect x="25" y="432" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-464-132-26-0"><rect x="25" y="464" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-497-132-26-0"><rect x="25" y="497" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-529-132-26-0"><rect x="25" y="529" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-561-132-26-0"><rect x="25" y="561" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-593-132-26-0"><rect x="25" y="593" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-625-132-26-0"><rect x="25" y="625" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-658-132-26-0"><rect x="25" y="658" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-690-132-26-0"><rect x="25" y="690" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-722-132-26-0"><rect x="25" y="722" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-755-132-26-0"><rect x="25" y="755" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-787-132-26-0"><rect x="25" y="787" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-819-132-26-0"><rect x="25" y="819" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-851-132-26-0"><rect x="25" y="851" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-883-132-26-0"><rect x="25" y="883" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-916-132-26-0"><rect x="25" y="916" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-948-132-26-0"><rect x="25" y="948" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-981-132-26-0"><rect x="25" y="981" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1013-132-26-0"><rect x="25" y="1013" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1045-132-26-0"><rect x="25" y="1045" width="132" height="26"/></clipPath><clipPath id="mx-clip-165-432-142-26-0"><rect x="165" y="432" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-464-142-26-0"><rect x="165" y="464" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-497-142-26-0"><rect x="165" y="497" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-529-142-26-0"><rect x="165" y="529" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-561-142-26-0"><rect x="165" y="561" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-593-142-26-0"><rect x="165" y="593" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-626-142-26-0"><rect x="165" y="626" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-658-179-26-0"><rect x="165" y="658" width="179" height="26"/></clipPath><clipPath id="mx-clip-165-690-151-26-0"><rect x="165" y="690" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-722-142-26-0"><rect x="165" y="722" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-916-173-26-0"><rect x="165" y="916" width="173" height="26"/></clipPath><clipPath id="mx-clip-165-787-142-26-0"><rect x="165" y="787" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-819-142-26-0"><rect x="165" y="819" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-851-142-26-0"><rect x="165" y="851" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-884-142-26-0"><rect x="165" y="884" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-948-142-26-0"><rect x="165" y="948" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-755-142-26-0"><rect x="165" y="755" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-981-168-26-0"><rect x="165" y="981" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1013-142-26-0"><rect x="165" y="1013" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1045-148-26-0"><rect x="165" y="1045" width="148" height="26"/></clipPath><clipPath id="mx-clip-485-18-448-26-0"><rect x="485" y="18" width="448" height="26"/></clipPath><clipPath id="mx-clip-1105-819-92-26-0"><rect x="1105" y="819" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-852-92-26-0"><rect x="1105" y="852" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-819-112-26-0"><rect x="1215" y="819" width="112" height="26"/></clipPath><clipPath id="mx-clip-1216-852-112-26-0"><rect x="1216" y="852" width="112" height="26"/></clipPath></defs><g><image x="387.08" y="1004.5" width="24.83" height="24.83" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSI+PHBhdGggc3Ryb2tlPSIjMjliNmYyIiBmaWxsPSIjMjliNmYyIiBkPSJNMTUuNTUgNS41NUwxMSAxdjMuMDdDNy4wNiA0LjU2IDQgNy45MiA0IDEyczMuMDUgNy40NCA3IDcuOTN2LTIuMDJjLTIuODQtLjQ4LTUtMi45NC01LTUuOTFzMi4xNi01LjQzIDUtNS45MVYxMGw0LjU1LTQuNDV6TTE5LjkzIDExYy0uMTctMS4zOS0uNzItMi43My0xLjYyLTMuODlsLTEuNDIgMS40MmMuNTQuNzUuODggMS42IDEuMDIgMi40N2gyLjAyek0xMyAxNy45djIuMDJjMS4zOS0uMTcgMi43NC0uNzEgMy45LTEuNjFsLTEuNDQtMS40NGMtLjc1LjU0LTEuNTkuODktMi40NiAxLjAzem0zLjg5LTIuNDJsMS40MiAxLjQxYy45LTEuMTYgMS40NS0yLjUgMS42Mi0zLjg5aC0yLjAyYy0uMTQuODctLjQ4IDEuNzItMS4wMiAyLjQ4eiIvPjwvc3ZnPg==" preserveAspectRatio="none"/><rect x="7" y="425" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="489" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="457" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="522" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="554" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="618" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="651" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1038" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1006" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="973" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="941" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="425" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="489" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="522" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="554" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="618" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="457" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="651" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="425" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="457" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="489" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="521" width="700" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="554" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="973" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="941" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1006" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1038" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="747" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="779" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="886" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="918" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="951" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="983" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="21" y="139" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-144-112-26-0)" font-size="12px"><text x="26.5" y="156.5">(Shift+)Enter</text></g><rect x="21" y="171" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-176-112-26-0)" font-size="12px"><text x="26.5" y="188.5">Enter / Tab</text></g><rect x="21" y="203" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-208-112-26-0)" font-size="12px"><text x="26.5" y="220.5">Enter / F2</text></g><rect x="21" y="235.5" width="235" height="34.5" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-241-227-35-0)" font-size="12px"><text x="26.5" y="253">Ctrl+Enter / Shift+Tab / F2 / Esc</text></g><rect x="21" y="268" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-273-112-26-0)" font-size="12px"><text x="26.5" y="285.5">Ctrl+B / I</text></g><rect x="21" y="300" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-305-112-26-0)" font-size="12px"><text x="26.5" y="317.5">Ctrl+U</text></g><rect x="21" y="332" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-337-112-26-0)" font-size="12px"><text x="26.5" y="349.5">Ctrl+. / ,</text></g><rect x="202" y="235.5" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-202-237-10-20-0)" font-size="10px"><text x="203.5" y="247">1</text></g><rect x="128" y="139" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-144-192-26-0)" font-size="12px"><text x="133.5" y="156.5">New line in formatted labels</text></g><rect x="128" y="171" width="203" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-176-195-26-0)" font-size="12px"><text x="133.5" y="188.5">Line break / Tab / Indent in labels</text></g><rect x="128" y="203" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-208-192-26-0)" font-size="12px"><text x="133.5" y="220.5">Start editing label of selected cell</text></g><rect x="222" y="235.5" width="117" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-226-241-109-26-0)" font-size="12px"><text x="227.5" y="253">Stop editing</text></g><rect x="128" y="268" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-273-192-26-0)" font-size="12px"><text x="133.5" y="285.5">Toggle bold / italic on selected text</text></g><rect x="128" y="300" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-305-192-26-0)" font-size="12px"><text x="133.5" y="317.5">Toggle underline on selected text</text></g><rect x="128" y="332" width="219" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-337-211-26-0)" font-size="12px"><text x="133.5" y="349.5">Superscript / Subscript on selected text</text></g><rect x="381" y="107" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-112-82-26-0)" font-size="12px"><text x="386.5" y="124.5">(Shift+)Tab</text></g><rect x="381" y="139" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-144-92-26-0)" font-size="12px"><text x="386.5" y="156.5">Alt+Tab</text></g><rect x="381" y="171" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-176-82-26-0)" font-size="12px"><text x="386.5" y="188.5">Shift+Drag</text></g><rect x="381" y="203" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-208-92-26-0)" font-size="12px"><text x="386.5" y="220.5">Alt+Drag</text></g><rect x="381" y="235.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-241-82-26-0)" font-size="12px"><text x="386.5" y="253">Ctrl+(Shift+)A</text></g><rect x="381" y="268" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-273-92-26-0)" font-size="12px"><text x="386.5" y="285.5">Ctrl+Shift+I / E</text></g><rect x="381" y="300" width="116" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-305-108-26-0)" font-size="12px"><text x="386.5" y="317.5">Ctrl / Shift+Select</text></g><rect x="381" y="332" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-337-102-26-0)" font-size="12px"><text x="386.5" y="349.5">Alt+Click</text></g><rect x="502" y="107" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-112-147-26-0)" font-size="12px"><text x="507.5" y="124.5">Select next / previous</text></g><rect x="502" y="139" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-144-147-26-0)" font-size="12px"><text x="507.5" y="156.5">Select parent</text></g><rect x="502" y="171" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-176-147-26-0)" font-size="12px"><text x="507.5" y="188.5">Toggle to selection</text></g><rect x="502" y="203" width="212" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-208-204-26-0)" font-size="12px"><text x="507.5" y="220.5">Start selection / Select intersection</text></g><rect x="502" y="235.5" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-240-102-26-0)" font-size="12px"><text x="507.5" y="253">Select all / none</text></g><rect x="502" y="268" width="146" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-273-138-26-0)" font-size="12px"><text x="507.5" y="285.5">Select vertices / edges</text></g><rect x="502" y="300" width="145" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-305-137-26-0)" font-size="12px"><text x="507.5" y="317.5">Toggle selection state</text></g><rect x="502" y="332" width="136" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-337-128-26-0)" font-size="12px"><text x="507.5" y="349.5">Select cell below</text></g><rect x="374" y="427" width="166" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-432-158-26-0)" font-size="12px"><text x="379.5" y="444.5">Alt+Wheel</text></g><rect x="374" y="491.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-496-122-26-0)" font-size="12px"><text x="379.5" y="509">Wheel</text></g><rect x="374" y="524" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-529-122-26-0)" font-size="12px"><text x="379.5" y="541.5">Shift+Wheel</text></g><rect x="374" y="556" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-561-152-26-0)" font-size="12px"><text x="379.5" y="573.5">Space / Right-click+Drag</text></g><rect x="374" y="588" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-593-122-26-0)" font-size="12px"><text x="379.5" y="605.5">Alt+Ctrl+Shift+Drag</text></g><rect x="374" y="620.5" width="133" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-626-125-26-0)" font-size="12px"><text x="379.5" y="638">Alt+Resize / Move</text></g><rect x="374" y="653" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-658-122-26-0)" font-size="12px"><text x="379.5" y="670.5">Shift+Home</text></g><rect x="374" y="685" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-690-122-26-0)" font-size="12px"><text x="379.5" y="702.5">End</text></g><rect x="374" y="717" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-722-122-26-0)" font-size="12px"><text x="379.5" y="734.5">Enter / Home</text></g><rect x="374" y="749.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-755-122-26-0)" font-size="12px"><text x="379.5" y="767">Ctrl+Shift+H</text></g><rect x="374" y="782" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-787-122-26-0)" font-size="12px"><text x="379.5" y="799.5">Ctrl+J</text></g><rect x="374" y="814" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-819-122-26-0)" font-size="12px"><text x="379.5" y="831.5">Ctrl+Shift+J</text></g><rect x="374" y="878.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-883-122-26-0)" font-size="12px"><text x="379.5" y="896">Ctrl + (Numpad)</text></g><rect x="374" y="911" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-916-122-26-0)" font-size="12px"><text x="379.5" y="928.5">Ctrl - (Numpad)</text></g><rect x="374" y="846" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-851-122-26-0)" font-size="12px"><text x="379.5" y="863.5">Ctrl+0</text></g><rect x="544" y="427" width="125" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-432-117-26-0)" font-size="12px"><text x="549.5" y="444.5">Canvas zoom in/out</text></g><rect x="544" y="491.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-497-142-26-0)" font-size="12px"><text x="549.5" y="509">Canvas vertical scroll</text></g><rect x="544" y="524" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-529-142-26-0)" font-size="12px"><text x="549.5" y="541.5">Canvas horizontal scroll</text></g><rect x="544" y="556" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-561-122-26-0)" font-size="12px"><text x="549.5" y="573.5">Pan canvas</text></g><rect x="544" y="588" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-593-142-26-0)" font-size="12px"><text x="549.5" y="605.5">Create / Remove space</text></g><rect x="544" y="620.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-626-142-26-0)" font-size="12px"><text x="549.5" y="638">Ignore grid</text></g><rect x="544" y="653" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-658-142-26-0)" font-size="12px"><text x="549.5" y="670.5">Home</text></g><rect x="544" y="685" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-690-142-26-0)" font-size="12px"><text x="549.5" y="702.5">Refresh</text></g><rect x="544" y="717" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-722-142-26-0)" font-size="12px"><text x="549.5" y="734.5">Reset view</text></g><rect x="544" y="749.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-755-142-26-0)" font-size="12px"><text x="549.5" y="767">Fit window</text></g><rect x="544" y="782" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-787-142-26-0)" font-size="12px"><text x="549.5" y="799.5">Fit page</text></g><rect x="544" y="814" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-819-142-26-0)" font-size="12px"><text x="549.5" y="831.5">Fit two pages</text></g><rect x="544" y="846" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-851-142-26-0)" font-size="12px"><text x="549.5" y="863.5">Custom zoom</text></g><rect x="544" y="878.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-883-142-26-0)" font-size="12px"><text x="549.5" y="896">Zoom in</text></g><rect x="544" y="911" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-916-142-26-0)" font-size="12px"><text x="549.5" y="928.5">Zoom out</text></g><rect x="425" y="951" width="248" height="48" rx="7.2" ry="7.2" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="426.5" y="965.5">Click to connect and clone (Ctrl+Click to clone,</text><text x="426.5" y="979.5">Shift+Click to connect), Drag to connect</text><text x="426.5" y="993.5">(Ctrl+Drag to clone)</text></g><image x="391.99" y="1034.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg=="/><rect x="425" y="1006" width="239" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-425-1006-239-20-0)" font-size="12px"><text x="426.5" y="1020.5">Click to rotate 90° clockwise, Drag to rotate</text></g><rect x="425" y="1037" width="258" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-425-1037-258-20-0)" font-size="12px"><text x="426.5" y="1051.5">Ctrl: Ask   Alt: Origin   Shift: As Image</text></g><rect x="741" y="107" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-112-92-26-0)" font-size="12px"><text x="746.5" y="124.5">Ctrl+Shift+L</text></g><rect x="741" y="139" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-144-92-26-0)" font-size="12px"><text x="746.5" y="156.5">Ctrl+Shift+O</text></g><rect x="741" y="171" width="80" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-176-72-26-0)" font-size="12px"><text x="746.5" y="188.5">Ctrl+M</text></g><rect x="741" y="203" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-208-92-26-0)" font-size="12px"><text x="746.5" y="220.5">Ctrl+Shift+P</text></g><rect x="741" y="235.5" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-240-92-26-0)" font-size="12px"><text x="746.5" y="253">Ctrl+Shift+M</text></g><rect x="741" y="268" width="86" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-273-78-26-0)" font-size="12px"><text x="746.5" y="285.5">Ctrl+K</text></g><rect x="741" y="332" width="80" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-337-72-26-0)" font-size="12px"><text x="746.5" y="349.5">F1</text></g><rect x="850" y="107" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-112-162-26-0)" font-size="12px"><text x="855.5" y="124.5">Toggle Layers window</text></g><rect x="850" y="139" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-144-162-26-0)" font-size="12px"><text x="855.5" y="156.5">Toggle Outline window</text></g><rect x="850" y="171" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-176-162-26-0)" font-size="12px"><text x="855.5" y="188.5">Edit metadata</text></g><rect x="850" y="203" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-208-162-26-0)" font-size="12px"><text x="855.5" y="220.5">Toggle Format panel</text></g><rect x="850" y="235.5" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-241-162-26-0)" font-size="12px"><text x="855.5" y="253">Edit vertex geometry</text></g><rect x="850" y="268" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-273-152-26-0)" font-size="12px"><text x="855.5" y="285.5">Toggle Tags window</text></g><rect x="850" y="332" width="93" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-337-85-26-0)" font-size="12px"><text x="855.5" y="349.5">About</text></g><rect x="741" y="427" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-432-222-26-0)" font-size="12px"><text x="746.5" y="444.5">Alt+(Shift+)Drag shape from library</text></g><rect x="741" y="459" width="240" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-464-232-26-0)" font-size="12px"><text x="746.5" y="476.5">Alt+(Shift / Ctrl)+Click on a library shape</text></g><rect x="741" y="491" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-496-222-26-0)" font-size="12px"><text x="746.5" y="508.5">Shift+Click on a library shape</text></g><rect x="741" y="523.5" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-529-222-26-0)" font-size="12px"><text x="746.5" y="541">Click on a library shape</text></g><rect x="741" y="556" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-561-222-26-0)" font-size="12px"><text x="746.5" y="573.5">Alt / Shift+Connect</text></g><rect x="1001" y="427" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-432-408-26-0)" font-size="12px"><text x="1006.5" y="444.5">Disable replace and connect on drop targets (Shift ignores current style)</text></g><rect x="1001" y="459" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-464-408-26-0)" font-size="12px"><text x="1006.5" y="476.5">Insert and connect the selected item (Shift ignores current style)</text></g><rect x="1001" y="491" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-496-262-26-0)" font-size="12px"><text x="1006.5" y="508.5">Replace the selected item with the clicked item</text></g><rect x="1001" y="523.5" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-528-262-26-0)" font-size="12px"><text x="1006.5" y="541">Connect to unconnected side of selected edge</text></g><rect x="1001" y="556" width="306" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-561-298-26-0)" font-size="12px"><text x="1006.5" y="573.5">Ignore shape / Connect to a fixed point</text></g><rect x="741" y="652.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-657-82-26-0)" font-size="12px"><text x="746.5" y="670">Ctrl+(Shift+)S</text></g><rect x="741" y="685" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-690-82-26-0)" font-size="12px"><text x="746.5" y="702.5">Ctrl+Z</text></g><rect x="741" y="717" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-722-82-26-0)" font-size="12px"><text x="746.5" y="734.5">Alt+Shift+A</text></g><rect x="741" y="781.5" width="90" height="27" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-787-82-27-0)" font-size="12px"><text x="746.5" y="799">Hold Alt</text></g><rect x="741" y="814" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-819-82-26-0)" font-size="12px"><text x="746.5" y="831.5">Ctrl+Shift+G</text></g><rect x="741" y="846" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-851-82-26-0)" font-size="12px"><text x="746.5" y="863.5">Ctrl+P</text></g><rect x="741" y="878.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-884-82-26-0)" font-size="12px"><text x="746.5" y="896">Ctrl+Y</text></g><rect x="741" y="911" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-916-82-26-0)" font-size="12px"><text x="746.5" y="928.5">Ctrl+Shift+Z</text></g><rect x="741" y="943" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-948-102-26-0)" font-size="12px"><text x="746.5" y="960.5">A / S / D / F / C</text></g><rect x="741" y="975.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-980-82-26-0)" font-size="12px"><text x="746.5" y="993">X</text></g><rect x="741" y="1008" width="106" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1013-98-26-0)" font-size="12px"><text x="746.5" y="1025.5">Ctrl / Right click</text></g><rect x="741" y="1040" width="109" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1045-101-26-0)" font-size="12px"><text x="746.5" y="1057.5">(Ctrl / Shift)+Esc</text></g><rect x="851" y="652.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-658-132-26-0)" font-size="12px"><text x="856.5" y="670">Save (as)</text></g><rect x="851" y="685" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-690-132-26-0)" font-size="12px"><text x="856.5" y="702.5">Undo</text></g><rect x="851" y="717" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-722-132-26-0)" font-size="12px"><text x="856.5" y="734.5">Connection arrows</text></g><rect x="851" y="781" width="203" height="28" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-786-195-28-0)" font-size="12px"><text x="856.5" y="798.5">Ignore handles under the mouse</text></g><rect x="851" y="814" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-819-132-26-0)" font-size="12px"><text x="856.5" y="831.5">Toggle grid</text></g><rect x="851" y="846" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-851-132-26-0)" font-size="12px"><text x="856.5" y="863.5">Print</text></g><rect x="851" y="878.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-884-132-26-0)" font-size="12px"><text x="856.5" y="896">Redo (Windows)</text></g><rect x="851" y="911" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-916-132-26-0)" font-size="12px"><text x="856.5" y="928.5">Redo (Linux/macOS)</text></g><rect x="851" y="943" width="210" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-948-202-26-0)" font-size="12px"><text x="856.5" y="960.5">Add Text/Note/Rectangle/Ellipse/Line</text></g><rect x="851" y="975.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-981-132-26-0)" font-size="12px"><text x="856.5" y="993">Toggle Freehand Mode</text></g><rect x="851" y="1008" width="214" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-1013-206-26-0)" font-size="12px"><text x="856.5" y="1025.5">Context Menu</text></g><rect x="851" y="1040" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-1045-132-26-0)" font-size="12px"><text x="856.5" y="1057.5">Cancel editing / action</text></g><rect x="1101" y="888" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-893-102-26-0)" font-size="12px"><text x="1106.5" y="905.5">Drag</text></g><rect x="1101" y="920.5" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-926-102-26-0)" font-size="12px"><text x="1106.5" y="938">Tap and hold</text></g><rect x="1101" y="953" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-958-102-26-0)" font-size="12px"><text x="1106.5" y="970.5">Pinch</text></g><rect x="1101" y="985" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-990-102-26-0)" font-size="12px"><text x="1106.5" y="1002.5">Tap selected cell</text></g><rect x="1211" y="888" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-893-132-26-0)" font-size="12px"><text x="1216.5" y="905.5">Move cell / Pan canvas</text></g><rect x="1211" y="921" width="196" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-926-188-26-0)" font-size="12px"><text x="1216.5" y="938.5">Toggle selection / Rubberband</text></g><rect x="1211" y="953" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-958-112-26-0)" font-size="12px"><text x="1216.5" y="970.5">Zoom</text></g><rect x="1211" y="985" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-990-112-26-0)" font-size="12px"><text x="1216.5" y="1002.5">Context menu</text></g><rect x="1101" y="107" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-112-112-26-0)" font-size="12px"><text x="1106.5" y="124.5">Cursor</text></g><rect x="1101" y="139" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-144-112-26-0)" font-size="12px"><text x="1106.5" y="156.5">Shift+Cursor</text></g><rect x="1101" y="171" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-176-112-26-0)" font-size="12px"><text x="1106.5" y="188.5">Ctrl+Cursor</text></g><rect x="1101" y="203" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-208-112-26-0)" font-size="12px"><text x="1106.5" y="220.5">Ctrl+Shift+Cursor</text></g><rect x="1101" y="235.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-241-112-26-0)" font-size="12px"><text x="1106.5" y="253">Alt+Shift+Cursor</text></g><rect x="1101" y="268" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-273-112-26-0)" font-size="12px"><text x="1106.5" y="285.5">Alt+Cursor</text></g><rect x="1101" y="300" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-305-112-26-0)" font-size="12px"><text x="1106.5" y="317.5">Ctrl+Shift+Pg Up</text></g><rect x="1101" y="332" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-337-132-26-0)" font-size="12px"><text x="1106.5" y="349.5">Ctrl+Shift+Pg Down</text></g><rect x="1241" y="107" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-112-141-26-0)" font-size="12px"><text x="1246.5" y="124.5">Scroll / Move cell (pt)</text></g><rect x="1241" y="139" width="178" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-144-170-26-0)" font-size="12px"><text x="1246.5" y="156.5">Move cell (grid) or page</text></g><rect x="1241" y="171" width="185" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-176-177-26-0)" font-size="12px"><text x="1246.5" y="188.5">Resize cell (pt) or select page</text></g><rect x="1241" y="203" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-208-168-26-0)" font-size="12px"><text x="1246.5" y="220.5">Resize cell (grid size)</text></g><rect x="1241" y="235.5" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-241-141-26-0)" font-size="12px"><text x="1246.5" y="253">Clone and connect</text></g><rect x="1241" y="268" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-273-141-26-0)" font-size="12px"><text x="1246.5" y="285.5">Scroll page</text></g><rect x="1241" y="300" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-305-122-26-0)" font-size="12px"><text x="1246.5" y="317.5">Previous page</text></g><rect x="1241" y="332" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-337-132-26-0)" font-size="12px"><text x="1246.5" y="349.5">Next page</text></g><rect x="1101" y="652" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-657-92-26-0)" font-size="12px"><text x="1106.5" y="669.5">Ctrl+Shift+R</text></g><rect x="1101" y="685" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-690-92-26-0)" font-size="12px"><text x="1106.5" y="702.5">Ctrl+E</text></g><rect x="1101" y="717" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-722-92-26-0)" font-size="12px"><text x="1106.5" y="734.5">Ctrl+Shift+D</text></g><rect x="1101" y="749" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-754-92-26-0)" font-size="12px"><text x="1106.5" y="766.5">Ctrl+Shift+C</text></g><rect x="1101" y="781.5" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-787-92-26-0)" font-size="12px"><text x="1106.5" y="799">Ctrl+Shift+V</text></g><rect x="1211" y="652" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-657-112-26-0)" font-size="12px"><text x="1216.5" y="669.5">Clear default style</text></g><rect x="1211" y="685" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-690-112-26-0)" font-size="12px"><text x="1216.5" y="702.5">Edit style</text></g><rect x="1211" y="717" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-722-112-26-0)" font-size="12px"><text x="1216.5" y="734.5">Set as default style</text></g><rect x="1211" y="749" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-754-112-26-0)" font-size="12px"><text x="1216.5" y="766.5">Copy style</text></g><rect x="1211" y="781.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-787-112-26-0)" font-size="12px"><text x="1216.5" y="799">Paste style</text></g><rect x="1080" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1084-76-165-26-0)" font-size="14px"><text x="1085.5" y="90.5">CURSOR / PAGE KEYS</text></g><rect x="721" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-76-165-26-0)" font-size="14px"><text x="726.5" y="90.5">TOOLS</text></g><rect x="365" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-369-76-165-26-0)" font-size="14px"><text x="370.5" y="90.5">SELECTION</text></g><rect x="1" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-5-76-165-26-0)" font-size="14px"><text x="6.5" y="90.5">LABELS</text></g><rect x="0" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-4-397-165-26-0)" font-size="14px"><text x="5.5" y="411.5">CANVAS</text></g><rect x="361" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-365-397-165-26-0)" font-size="14px"><text x="366.5" y="411.5">VIEW</text></g><rect x="721" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-397-165-26-0)" font-size="14px"><text x="726.5" y="411.5">LIBRARY / CONNECT</text></g><rect x="1081" y="616" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1085-621-165-26-0)" font-size="14px"><text x="1086.5" y="635.5">STYLES</text></g><rect x="721" y="616" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-621-165-26-0)" font-size="14px"><text x="726.5" y="635.5">DOCUMENT</text></g><rect x="187" y="0.5" width="281" height="51.5" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-191-1-273-52-0)" font-size="27px"><text x="192.5" y="38.25">Keyboard Shortcuts</text></g><rect x="741" y="300" width="88" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-305-80-26-0)" font-size="12px"><text x="746.5" y="317.5">Ctrl+Shift+K</text></g><rect x="850" y="300" width="188" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-305-180-26-0)" font-size="12px"><text x="855.5" y="317.5">Toggle Shapes window (Sketch)</text></g><a xlink:href="https://app.diagrams.net/#Uhttps%3A%2F%2Fapp.diagrams.net%2Fshortcuts.svg" target="_blank"><rect x="1111.67" y="1046" width="132.33" height="18" fill="none" stroke="none" pointer-events="all"/><g fill="#F08705" font-family="Helvetica" text-decoration="underline" font-size="12px"><text x="1113.17" y="1059.5">Open in diagrams.net...</text></g></a><rect x="374" y="459" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-464-142-26-0)" font-size="12px"><text x="379.5" y="476.5">Ctrl+Shift+Wheel</text></g><rect x="544" y="459" width="123" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-464-115-26-0)" font-size="12px"><text x="549.5" y="476.5">Canvas zoom in/out</text></g><rect x="851" y="749.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-755-132-26-0)" font-size="12px"><text x="856.5" y="767">Connection points</text></g><rect x="741" y="749.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-754-82-26-0)" font-size="12px"><text x="746.5" y="767">Alt+Shift+P</text></g><rect x="128" y="107" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-112-192-26-0)" font-size="12px"><text x="133.5" y="124.5">Insert text or add an edge label</text></g><rect x="21" y="107" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-112-112-26-0)" font-size="12px"><text x="26.5" y="124.5">Double-click</text></g><rect x="100" y="139" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-100-140-10-20-0)" font-size="10px"><text x="101.5" y="150.5">1</text></g><rect x="1112" y="1023" width="255" height="19" rx="2.85" ry="2.85" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1037">Ctrl / Shift+Enter: New Line / Apply in Safari</text></g><rect x="1105.33" y="1017" width="20" height="10" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1028.5">1</text></g><rect x="21" y="427" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-432-132-26-0)" font-size="12px"><text x="26.5" y="444.5">Ctrl+X / C</text></g><rect x="21" y="459" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-464-132-26-0)" font-size="12px"><text x="26.5" y="476.5">Ctrl+V</text></g><rect x="21" y="491.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-497-132-26-0)" font-size="12px"><text x="26.5" y="509">Ctrl+G</text></g><rect x="21" y="524" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-529-132-26-0)" font-size="12px"><text x="26.5" y="541.5">Ctrl+Shift+U</text></g><rect x="21" y="556" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-561-132-26-0)" font-size="12px"><text x="26.5" y="573.5">Ctrl+L / Alt+Shift+L</text></g><rect x="21" y="588" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-593-132-26-0)" font-size="12px"><text x="26.5" y="605.5">Ctrl+Enter / D</text></g><rect x="21" y="620.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-625-132-26-0)" font-size="12px"><text x="26.5" y="638">Backspace or Delete</text></g><rect x="21" y="653" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-658-132-26-0)" font-size="12px"><text x="26.5" y="670.5">Ctrl / Shift+Delete</text></g><rect x="21" y="685" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-690-132-26-0)" font-size="12px"><text x="26.5" y="702.5">Ctrl+R</text></g><rect x="21" y="717" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-722-132-26-0)" font-size="12px"><text x="26.5" y="734.5">Shift+Resize</text></g><rect x="21" y="749.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-755-132-26-0)" font-size="12px"><text x="26.5" y="767">Ctrl+Resize</text></g><rect x="21" y="782" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-787-132-26-0)" font-size="12px"><text x="26.5" y="799.5">Ctrl+Home</text></g><rect x="21" y="814" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-819-132-26-0)" font-size="12px"><text x="26.5" y="831.5">Ctrl+End</text></g><rect x="21" y="846" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-851-132-26-0)" font-size="12px"><text x="26.5" y="863.5">Ctrl+Shift+Home</text></g><rect x="21" y="878.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-883-132-26-0)" font-size="12px"><text x="26.5" y="896">Ctrl+Shift+End</text></g><rect x="21" y="911" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-916-132-26-0)" font-size="12px"><text x="26.5" y="928.5">Ctrl+Shift+F / B</text></g><rect x="21" y="943" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-948-132-26-0)" font-size="12px"><text x="26.5" y="960.5">Ctrl+F</text></g><rect x="21" y="975.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-981-132-26-0)" font-size="12px"><text x="26.5" y="993">Alt+Shift+C / T</text></g><rect x="21" y="1008" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1013-132-26-0)" font-size="12px"><text x="26.5" y="1025.5">Ctrl+Shift+Y</text></g><rect x="21" y="1040" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1045-132-26-0)" font-size="12px"><text x="26.5" y="1057.5">Ctrl / Shift+Drag</text></g><rect x="161" y="427" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-432-142-26-0)" font-size="12px"><text x="166.5" y="444.5">Cut / Copy</text></g><rect x="161" y="459" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-464-142-26-0)" font-size="12px"><text x="166.5" y="476.5">Paste</text></g><rect x="161" y="491.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-497-142-26-0)" font-size="12px"><text x="166.5" y="509">Group</text></g><rect x="161" y="524" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-529-142-26-0)" font-size="12px"><text x="166.5" y="541.5">Ungroup</text></g><rect x="161" y="556" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-561-142-26-0)" font-size="12px"><text x="166.5" y="573.5">Lock/Unlock / Edit link</text></g><rect x="161" y="588" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-593-142-26-0)" font-size="12px"><text x="166.5" y="605.5">Duplicate</text></g><rect x="161" y="620.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-626-142-26-0)" font-size="12px"><text x="166.5" y="638">Delete selected cells</text></g><rect x="161" y="653" width="187" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-658-179-26-0)" font-size="12px"><text x="166.5" y="670.5">...with connections / labels</text></g><rect x="161" y="685" width="159" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-690-151-26-0)" font-size="12px"><text x="166.5" y="702.5">Turn / Rotate 90° clockwise</text></g><rect x="161" y="717" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-722-142-26-0)" font-size="12px"><text x="166.5" y="734.5">Maintain proportions</text></g><rect x="161" y="911" width="181" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-916-173-26-0)" font-size="12px"><text x="166.5" y="928.5">Bring to front / Send to back</text></g><rect x="161" y="782" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-787-142-26-0)" font-size="12px"><text x="166.5" y="799.5">Collapse container</text></g><rect x="161" y="814" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-819-142-26-0)" font-size="12px"><text x="166.5" y="831.5">Expand container</text></g><rect x="161" y="846" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-851-142-26-0)" font-size="12px"><text x="166.5" y="863.5">Exit group</text></g><rect x="161" y="878.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-884-142-26-0)" font-size="12px"><text x="166.5" y="896">Enter group</text></g><rect x="161" y="943" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-948-142-26-0)" font-size="12px"><text x="166.5" y="960.5">Find/Replace</text></g><rect x="161" y="749.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-755-142-26-0)" font-size="12px"><text x="166.5" y="767">Centered resize</text></g><rect x="161" y="976" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-981-168-26-0)" font-size="12px"><text x="166.5" y="993.5">Clear waypoints / Edit tooltip</text></g><rect x="161" y="1008" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1013-142-26-0)" font-size="12px"><text x="166.5" y="1025.5">Autosize</text></g><rect x="161" y="1040" width="156" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1045-148-26-0)" font-size="12px"><text x="166.5" y="1057.5">Clone / Swap / Constrain</text></g><rect x="481" y="13.25" width="456" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#777777" font-family="Helvetica" clip-path="url(#mx-clip-485-18-448-26-0)" font-size="18px"><text x="486.5" y="36.75">Cmd instead of Ctrl, Option instead of Alt for macOS </text></g><rect x="1087" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="844" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1101" y="814" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-819-92-26-0)" font-size="12px"><text x="1106.5" y="831.5">Alt+Shift+X / B</text></g><rect x="1101" y="846.5" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-852-92-26-0)" font-size="12px"><text x="1106.5" y="864">Alt+Shift+V / E</text></g><rect x="1211" y="814" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-819-112-26-0)" font-size="12px"><text x="1216.5" y="831.5">Copy size / data</text></g><rect x="1212" y="846.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1216-852-112-26-0)" font-size="12px"><text x="1217.5" y="864">Paste size / data</text></g><image x="386.49" y="956.5" width="26" height="18" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjZweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNiAxOCI+PHBhdGggZD0ibSAxIDYgTCAxNCA2IEwgMTQgMSBMIDI2IDkgTCAxNCAxOCBMIDE0IDEyIEwgMSAxMiB6IiBzdHJva2U9IiNmZmYiIGZpbGw9IiMyOWI2ZjIiLz48L3N2Zz4=" preserveAspectRatio="none"/><path d="M 42 45.62 C 42 46.18 41.4 46.69 40.97 46.69 L 7.93 46.69 C 7.47 46.69 7 46.18 7 45.76 L 7 12.9 C 7 12.28 7.33 11.75 8.02 11.75 L 41.17 11.78 C 41.67 11.78 41.99 12.23 42 12.82 Z" fill="#f08707" stroke="none" pointer-events="all"/><path d="M 19.94 46.69 L 14.54 38.6 L 27.06 19.97 L 28.5 19.71 L 42 33.48 L 42 45.66 C 42 46.1 41.44 46.75 41 46.69 Z" fill="#db6112" stroke="none" pointer-events="all"/><path d="M 15.13 38.69 C 14.28 38.69 13.88 37.99 13.88 37.42 L 13.88 32.83 C 13.88 32.28 14.3 31.6 14.89 31.6 L 18.5 31.6 L 21.72 26.27 L 21.29 26.27 C 21.04 26.27 20.27 25.77 20.27 25.24 L 20.27 20.34 C 20.27 19.79 20.96 19.09 21.48 19.09 L 27.31 19.09 C 27.84 19.09 28.7 19.39 28.7 20.39 L 28.7 25.1 C 28.7 25.65 28.21 26.27 27.7 26.27 L 27.28 26.27 L 30.51 31.6 L 33.95 31.6 C 34.76 31.6 35.16 32.05 35.16 32.71 L 35.16 37.42 C 35.16 38.14 34.54 38.69 33.93 38.69 L 28.14 38.69 C 27.4 38.69 26.76 38.21 26.76 37.48 L 26.76 32.53 C 26.84 32.03 27.31 31.6 27.87 31.6 L 28.96 31.6 L 25.86 26.27 L 23.19 26.27 L 20.1 31.6 L 21.29 31.6 C 21.81 31.6 22.26 32.1 22.26 32.69 L 22.26 37.71 C 22.26 38.12 21.78 38.69 21.23 38.69 Z" fill="#ffffff" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 29px; margin-left: 48px;"><div data-drawio-colors="color: #1A5BA3; " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(26, 91, 163); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: nowrap;"><font style="font-size: 20px">diagrams.<font style="font-size: 20px" color="#f08707">net</font></font></div></div></div></foreignObject><text x="48" y="34" fill="#1A5BA3" font-family="Helvetica" font-size="15px" font-weight="bold">diagr...</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1428px" height="1070px" viewBox="-0.5 -0.5 1428 1070" content="&lt;mxfile modified=&quot;2022-09-19T01:45:32.339Z&quot; host=&quot;test.draw.io&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36&quot; etag=&quot;h6qnxqsBA1Q-py0Q6vIb&quot; version=&quot;@DRAWIO-VERSION@&quot; type=&quot;device&quot;&gt;&lt;diagram name=&quot;Page-1&quot; id=&quot;150dc974-5404-6732-309c-fd6db42db779&quot;&gt;7Z1bd6LM0oB/Tdaa92KygAaES4+JMx4SNckkN99CJEiC4kaMh1+/uzkpdBvz7qGbfNpZM4m2KFr1WHRVV1ddgfpsc+Mbi2nXm1julSRMNlegcSVJWkWBv9HANhqo6EI0YPvOJBo6GBg6OysaFJPRlTOxlvFYNBR4nhs4i+yg6c3nlhlkxgzf99bZw149d5IZWBi2lXkbaGBoGq6FHfbkTIJpPKoq8v6BW8uxp8mpRVWPHhkb5rvte6t5fMIrCTTDn+jhmZG8WHzi5dSYeOuDIdC8AnXf84Lo1mxTt1wk26zcWkceTd+4b82DrzxBfRorvcedtWoE5vBd6/7cNsBPIMfv7sNwV1byQcK3G2wTGcF3vkA3nVkozNqH5QcOFGHHGFvunbd0Asebw8fHXhB4M3iAix6opfKpe67nhy8FXsOfg9eouo6Nnht4CzhqLBeRkl+djQXfdy08ZTUZFZIReHtiBMYVqEZ3pdbyw76SapsZ/MT1u9ue9LKtyeOnzcrcCY5xOxDMhvfRARMw2Sqgu1U+zJn50X2rrrt1fTeZmU77dhqMb5Rdfz5dGk+Kfzf85U1uB+u+o33AZ4HO3Nx1Zvr2Zatt+qN3pQOi49pODRhPA8FoCE539LK26m3buHlcvEhT4W7Y3vTmNRkeIxlPj+B+pstwbN1uVO3u2z36D8/74prz3mIsyXr7rbnqDtvwc9zd1qaTG9s2wWA7lgIXPuut++Y6vdnzFr7azHjaLHNj7/Ad97qjh1Vv9GD3hrLYe1hvusPqZvLWXXUbk0ZvK697TlXovD1I7ca9De8rXXi/3WhuzR065gGNCb16FbQb5qo/6kmdURuO/3pDf/uN+6Dzdi93Rg9B15GVXl0Q4W14XGsH7296Drz/dr9rNx4CeH6l+/i86d6s0fngcferXuNRHY2aSuftHR7T3DxvhVV3ZAbdobzrD4VVb9dGrwu1I2w6b8/bzqgLz+kuO6MmfG7bhscJ3VkXfj74Wjt43oaNxuBngVJDjzvwvUv2tvNW3Vrvwqa7rW7QZ5y8RZ8hOQ88JzoWwPcPX6dpd+Ex4TneWvG57tF7Eno3Xfh5TfiZHoRwfPQOz/kehOdxqvA9VnfWTNh13mwFyafX+LUM32P42D38fNHrdkfP4XvvDQX43h7C99x1oucZdSF8v5Es7uHrm6GM0WcK5TGU1/D1tmjMctofd2/rDxO8zO9s9HVC/2q4GYgtA/qGWZuDodgs3FjezAr8LTwkflTWhGulou9/ohfYJpZaAtHAem8gJflai0enB9bxYNiIDbOdnm5vm+CN2DyRTRU4bZNCw4JMRGgU1lMnsIYLw0SPruGFCo5NA2gMQEOEN18d1z0wQq3wB44vA997t5JH5t4cWbdXbx4cHBz9FCNoURAyopVlXLKpRT6UKxD+XqjKhQhVEdRrXcdoPili8e9FrF6IiOVk1seC28qFCFVJBMhCqNqlCLUisROqfiFCVYHKzqaKX3BQzkOqgswOVVG8FKmqX73+FyFV6UKkWhFEhlK9FHegAhi6A6J8KVJVvzpZLeJqdSleVkXXGLJ6KY6VBhj6AOKleFaaytAJEC/FtdJ0UFacRboUn0AUlK+6WgWgK12KUyAKEkNfK5Hi2YtV17/qFRRhAy7FK9AVhh6sdClegZ7ElZlI9Vy9AlktcUHrbJdb8lItcUXrbFdfMBmzXH052+UXTKosl1/Odv0lL1Wm6y/gXH0tTKos11/AufoE2IyAZaoAOFefAGOV5aoWOFefIC9Vpqta4FJ8AqarWuBSfAKmq1rgUrwApqta4FK8AKarWuBSvACmq1pf2SZyHlLVv+oFFGBX5XNdcMlLlWm0Vb4U30okbMygJ9VL8a1EhaHHKl+KbyVqLC3ApfhWksgwDiBfim8lKUJ2vYXllOBSXC0gMsxskS/F1ZI0hkFs+VJcLSAzDAso5+pqYVlYLKevyrm6WphUWU5flXN1tTCpspy+KufqauWlynT6qpyrq4VJtcTpq3KunhcmZJYTLeVcPa+8VJk6Bcq5ulqYVJlOX8/V1dKkMqev5+pqYVJlOX1Vz9XVwqTKcvqqnqurlZcq0+lrstp7/lLNT1+/KOMCZq/quTpemIxZzl7Vc3W88lJlOntVz9XTwqTKcvaqnq2nJWplivVsXS1MrExtwLn6WphY2V6wztXZwsWqiNfCwQ/D/duVc/W9cCGzdBMq5+p8YWJl6tMm+xgvQKwsAzCVc3W4cLGyjBZWLsXjItUbqAi0pHopHhdpzyY9qZ6rx5WXqiLg1yt6Uj1XhwuTKtAzM1jpizIuYgZ7rt4XJmNCFQd65J6r85WXqqpqZfle2rn6XnkZM93RrZ2r64VJleWObu1cXQRMqqqSsQdflXER9uBS/AWm+7u1S/EXmO7v1i7FX2C6v1u7FH+hxKrF2qX4C0x3e2uX4i8wra6rX4qHwLS6rn4pHgLbAtu6dDFiZVkOXj9XrwBbnCkxFKOfq5OACZlpLEY/Vy8BFyvLYIx+rm4CLtYv19crQqzn6hngYtUrpVnac3UUMCHrTDtJCufqKuByZdv39FydBVyuTHt0JkvE5y9X8ev2tRDB4is1P4ZT5zW4kmr/NOeB5WNyhp8MvoOa4Tr2HI641iu6iz6yYxpuNR4OPCTxJVSAM7c74TENeT8yiD8HGvLgc19dbw3vTp3JxIJPr/leYATGODwnUufCc+ZB+EGVGvwHP3pduFauFPiG6vC+uL8P/6HDfaixOdSm4YS6sYxlsLaWwSfaROPD+GOKhahWzmpWUU9t8RclIXOlTbRzqPakg8rfqR13E2NlC+hFJGFkjI8pnvwVOfg+xUMckH8LiJZNixHxiCw7QHAXNwtICzfAnA+6fEjSyRoh7PjAffV64MNDahEmdemqGpOSXE6QSTkYRgDFN5tLk8PEGiYFXOPectrhIDPRkJMj/w4ZPA4RI1NLSWhzDlhzoCkZo6LhkSl2RgUPqcSEPHAuGHMBxMr3udjgUaCYi+vUciDJckYYM5KUvSwDChEPYYlMCPhOynV2oW6FPYYj9B4bP+ViwhPpUtenswaREJ0QC9ExHk7rWWs44DpQX/DAOfz16vkzIwisCRo3xpa75IbgE0MgFIFF8pQ0tIG7qhJps0Ex33w8GNiJeBj7lvGejWEkE8v5BH3cGBmOSTmYaHjMWKJ3gcBDm8PA8BEE1sQJoAoSEuBf7xWhYLmWGRkSM3wxzgdTPtL7bMwIHgMdIp0c4MH1T1X/QPzS7CKJgxZPAB7kHHm27YaXEs+dpFcPJ4C6NJGZmGfNREgEx4SxmciHLFgaDTzumSKDlh/9eGbKQfkGoACRKRp4fHO4Wlj+0vSdRZDakuFqnI5wSr4DJYQoRlr+p3hK8BjnfsGdr7rSD2LJldyqq5Tdwing+UJ6LqQl0mIDj3NW3WTpjHPBmAtCTEOkdvGQ8GhmYhUavsFdEebaJ4QqWJmB9N3nzQAnoQQSSEEJinYAj23GS137WUKVM8CaAWJggpk9wAOZMRMJEu3Uu2hyNlizoeETRor2AQ9aRizkkq2GoVPJYWAMAynikMaMiocBj19GE4W665jvXPmslU9KhyCtjRejfDwSmXzphXkYR4pNwsK3PhxvxZc7aQeWlFyyRPr9PORBISRYFsMDIfyY8BB/LA4AYwCUyqnQEkUe8EBjulIReGnc2UExaM4FWy5yGz3YcoEHGZO0iAMikulkYkEclNW/5LyUwgsxLyLJgiocEEAIRSYYGO7e1Qi1yVFgjIICruUTadnUppzJFmkSGZHqrGWKhzWxLT7nZM4HKRoh03JAAR6tTOcYhxeTJZQztxWsWfjKFg6Z1jQDELIvE1sRJVcKYwvpgFPBmApSlAJQsxB4vDIKUT1NLYtn2FIPUSVN/NLeK/KJSqqiSg0FPGDFISgDAkXQM3NIQsgaUJtCEqJU8ZIFh6EUGGTpRC8WijDgIaqoYk/iQ4T6+GlGqxk8/aEUPirgRLK1qFLj41g+XG75m4NRAhiqoJyaSlAzHDIeoorAGFhLtCU2sR9dqAsOBmswgEbaxQNo7fOTCVGp2DDcwpfj+met/6SdLRtTgIegmvMJVzpjpVcIrY8oKh0PLmWrk/EvfhkMAOVEnWCKRBzLi0snibecB9Y8qJVrpSwe8NS4mIdfnAPGHGgCKeJMTfNHKxMmloATwJwAUF6QST5WdhCeEBUe/NFbzRbG5B8OBWsodLW0MLR8rNKg8JMjUR4SusQ0inS0rKDANc/aGKinWjzS40DBo4l1Y/5hoFymnefNrqKqYS1vxVOoaWcrqCC/YE0IJUq0klYUPJiUkpDoCunf9D1eHow5C2jdmrSjgppdIOy7TGiYer6zg5+X81AiD0nslw0NeITpzkDJjWbMBNc+W+1XCOmM9OYIhHiSb4VZrUmugjULVxuFZZTCwHFgioNK3ERDDQc8yNS2556P9G/78DCufsbqJy860wMAjyrxNacy9E5abKandTxsNLBefWs55YpnrHjigjM9xeOhooG1tMKNT47FNzEw1/7ppWZqLKh4uKjlBOHZ5xO+oYU9C2iZmaX+8XyzSP8Lw+YTANbaJy4u09M9HiCMdB+svZgAHglgjkCyDZUNAoSo4GoZhMsE0WoBVz9b9Z9eOqIHAx4UfNmvGHEQ2IJwOqGAHgh4fDAGga8asieBmEdAT/eEjLNoy1pUaMn05vO4fArKTBdMN6ycIvyIsw0ODg7748aPwxPDFwZhc7ckdY30uv+EhwrRJqj9iyQnTV8jOd3+wPit4Hkuvod6WaDPJ+L4kak96EYnfaZ5nO4C9K8kZRcT/auERlNJzs+h/pOxv9M/HhXCJLqcGgt005khJwHKdLlA2gGNV2eDBF2LH2hM4HfxClSju1JrgdoQ1Z3HWn+wFn7f2F4V/vSGD9Pmg41uaujXS9Xuwj/1UU/ZvKKB+mOt+9j8Ey5M5P+hZ9T7evduiY6s/hkMR263et8fP7+gV2wNfg2arQerpTxu35q/7Ub1ftC7uRsMq0Cr1tRfzaflw7ttB/q0c9MYT9ypMlpUBkrjblerNn/Lar8tPZj304l/8/IbqrY1r4qgpt8r0/+sm84bxM94f3Tg+LbV6P5qvXW0R/dhsobqrdm3m/ET/Pu8tN3wrdV+DR6Upv/+y7ZtJEX07yhYBVAkawq8fuyvIEkr3KRql6CQQk4Eo1JEt2QVjzhlvvyh1UZWRBfQFx6ZafRtNt/XztLKW4T94VQvRDN4SUGvTLzMfNVCUDAHoiDha4VSsrs0ozqhANVVCPlEyPSCKhysLt+TLuhCdAPtXAwf6vuODaeN2Ucjyx8/Ff5qz+hHGb6vHhU80CMpBLtejB7xQE8uk7zDZ3afzOyKyBPUkgIyaU1V+WRNI2rFtyt49CcHRJ8DwRqIXI1VwkoAPR6OFubvcg4Yc0CqvK4xatBQObn58I7zwNouEBr4ULQER7cbJgRwi8CaALaNOSpHtx3+5ppnrfnTRXITNornAE8Ma4mcANazAUU4seFUo2YIPqm73zG2ls8XiGkvB+hyLnJHasRRoQYAHrlLAeivgqhBNCeALQE5L1EiRHKpAaHh8cDmJMwaga9lhAF/zgNbHoh9uugBgAcSU4vQ8vyZwVeImRsETTsZR6THAx5HjA1C/IEkIfO6HAx2YEiacqreKT0u8HhiaidGhs0njsxhQH1fTzRqolb9ViOUzh/zbKISJguEjgk6rWqm2rGenvv+z/G6fpRSIgmvfphn5jpj3+AXDOahBllWToQaJGq7kjU86JiFJd6bjCKR/xykj4VNeYxDaBKaODxs4amoJ3KXJZkaPMdbMXBOvhknqPTJoZEhVMWhaGUIxdI4IN8MEFnMzFTx+BZFPo60aYgvPqlRSTKSORps0ajIGdvBEg0dD302nGUoX0nwrYUbdXuJ8+LTPPnQrEx8qEpJCAzftgKU+phOapyw1AYaMld+1Nk6AopXbKTtG4mCjk1/MZ5kkdbqqo5HUtvzpeUHBIiC6b4NpYUecgJrxjH6phgl6+ZsMMIDsIPUGB3jZu3AN5Y8HPakOniU88KWl/yEmOB1UwvT6oS0z73VQbstVvPYDIWELJ0JQsZ7zWKFGiRzcJiDAyfKh7lBBEeKHjh4RDetGpZE8+KATZYn5GFFG8WgOJASODfMuSGUGwQCtQvU0XzSfRh4yCH4BAIanpRaEbJ5hRgROjXTcayLQe2FY8AYg4ogZYK2+MyVHgZ4KC4K+CdWocppYE0DkEujAQ+83XoumiSEUHAQ2IKgk8qTE5Vf+XvlSwIeWsttObnhCDBGIN/nCN+MSMsWSMm5cBz43jPmGKinIu70MMAjWzEGzxwD1hjo6on+h/QwOLozObk4cLeBNQ6kolT0ACAkD6bRpWF6q5Heau1jT5wM1mSouGkQRWpo4LGlP1zlrFWugxO1CumZhmM7lePvf6SNeImLg8EYDFGQCEnmtALNkoDHFX9kaAjnCyh3tLk0OQzMYVAI+08EUuGyImAQ8ZDC0Ah7Gv0wljwpgv6+A3y54UT/dFrJwXD6gaHwMJ94nAHGDFQEcKq8FT0GCLGEaF3aifJ+fd9b801pzJE43fuEHhJ4XCHNYJga84kbptOh4sH+VZIqNfNWS57owpwSXTu1s0Qg7WEroCAy5A+jJN3HyrvjlQBDfl2CUA6FnsnAww13Pk9hKgGC3KqExBICPOYwsNB0UvjxFHbN4u4Fex7Q8gRLBvBQQ8JAx5mvNugFDLM/5CSwJoHYLoMeB4QcpgmcEwgjpGap1fNQofrWAPoZxjycNLSaruss0CSy1eHVs0rgg7A+IVFbnxA/qZ/W8i1rGm306XoTTgJzEvRsQRSWcwgJj05C8YQahzRY8xWngTENxLWK1PsrHgBCipMxNy10kDVxAgf1yomXLYw4SMWJYEwEacGCnknAw1FRcRyu9qNqL2KdShRzu2N0UmUskU35fUkihJsMtHU8mihMw5RoTgRjIoBG8i6ZMUGIOjlzc8pBYA5CBXce2GGAx50i03CwD9cMn8OxYIuFSEqLZscFHovqemGmQ0RDPIu8M9A6p2nMPwy+zkl9yy0QvjCpoDeX/KRuf2QtolXvOEluNR5b/jicYXAuGHMBCOFKnVaGnISHo154m/cy1E6aSEi0zAH4LNo049GmEgAgTxnoEUAIN638JfzcXPOsJ4ukBi4So7kikDAO0pKGnIdyeFDUk90bmOFxdKsdp6MkOvK9PUqE42RnUA5JOZDAoVNZtMwgOVbynzNSMiO59h9lMnKs0j9noyQ2SN1lmdFwtBpY2nAaLYU/LDgXrLkAopZlgIgJLS4IlfoJXDS8NU+NYE+GrJ90WqhFtwEexRyavnew1pFd//ixCHgeLv0IV36/LynOIdPa7ivjIc4cBGizDsRAQBMM+FF5veISkFDwgoJpj+nikcBjngNr6ewwyxAhEa2LcTbKYkMjhDaSBnLFs4HHQTE2ot19Ahrllw/mPKSvkbEVtBZGZULg00Wqw1pxcA4Yc4DiFiwnEniUM51c8itDKQSQohP09E/a4mt9ON5qyQkoiQBih3tafb4kGQ9P9qJUCa79UrRPaFlML7ggnwxHDjgCnyBAJdykVggICNQQOBp5bHLVs1Z9hZQnRU/1eGgx9+1vcASYI5DrSkEqI0gLCAWPK+aTHjgQzIFQ1fKAIGRSZoF45EAwBwK1KzlYpyQEDOgBgYcS665loJDyxHo1Vm7aipVz8QkXVLKsifNGaivWCh5EbE4crv7S1E+cO9JTPyFyaAXRq3JbUD4MgJh3TwsGQtNLb7Hl6i9N/Sph7Zme+vEY4h0UgsX1X5r+iR3tKBJAiCM+DIb9wVW6Ibt604R/fjefeffbzz2G+D5anod30dssxImogAwhpASECqmscCF4EHZo9/sdTkIJJGiiXCIIhGTGZqdZH7X7PQ4Dexjk5JtZBgwqHm3sVGtNbhbKIEEv0SqohChjtfdY5SCUAUJ2niCLhKASPRLw8OJju/nEOSjj0iCXCQIeXey0a4Pq4Dn1KOr9Xg/OHDgb5c8hGbNBCD2OnjtNfrkox7HMrUIkCU1sWMAjj41+/aHb7HHD8A0MA2MY8CjUb2s79gx/coX6YUKZmauAdj3AGVQxeuX/t2wIWTakSjFsSJqQYUMklZmFBOFwKGJy5F/hUcGvG7lkht/cZnxqMwowENjGF+FExReN1o65Cn7pSMtGDqfGwuKFQ2mvW+gyyNFA2AZVEAAPS8vvj9+iXY+uMbbc6Kn9hYWKgzro18QxbN+YLa/nVnB9fR2dw3Xm79Gh0yBYwBNWQ/+jZSwW14dPCEfBQ3SQpKDDFDSkkA6Fg8vkenS9/LD3pxoZvm3FH/P/xq4xjzt577lVD2QaQ33AqO+hJo6TGIocgmRyD+YBEq79lqBVBCWnfZlMfBETSkmQr5MreVo/UCXMI4B0DQhTCfHfN0KEdw/wOGYvTubKP00tixekpn0JkXNwyBXCWrdCa6WzQkiXj6tMC7uwumxoSlreim+fpH35UMEXSJBoeRsVQvb8YZPlWKAcAtpzCCz1JZMdy7ISuYavaGXrwd1xHChfHfIOBsJB/jR7XqdGA76s1Z7DaQaagMblqMNaHEbYQzFsWGBN0J7LeHrKUaFrOdKnfFLDR6KWSa/hS10NbwUF+tN0HfP9mPbPWqvFbJfIV2bK7af6QlFZWlMGDU+UFJl8zb+TrmNPU9hTOULvsfGzqBWJ3Ao2sQ4T4VstFqLhY05ivGiZTASa88Dyw1CC0LPW8HfUHjc+qrpYuNskKDE0Xg3fwTDZ+/liMX7+Xks4ZEdj3EXoS0p2MKXevoyHgdIc84zK9CJUhnt0R7+UPiqbdPQ7g74WxirwlrGQ/6W5PvgafPULVIi91LVrcPCT0wVhIwEpjTj5Rv2dKo5uSP6Tfjf4DtRT63oeeqcBUmClMEZy6/2ycqoENzUfSz+6JZVvRf0GZFROblamRwY+o47JuOFklE6GIhC3pNCj4Wh3j2QO9sCpKJ+KpDYlGyaOZgB09nPvTMCuwxkpn5EKYfGPHiOEvaxxPaTQZ0s4aXAySidDFZRT/YJkRqEdHQ/t1AzzHWkL+fVhoLdhuVbAd8N+A26AllkUKJObLwaMODvfhR1SM1NmtBwt1jfgaJSORkWQvs3liLDRNqnoGZd+57iUjQsoLYoGkmVNgiHheHwTPFAiC0skjgZWb+GrcSDKB0LXT19eaMFxNLbaRB0jOBsls6EBsTw2TkZauQH5HpCQsujpYXFyuxU3Hd+CCl09HQyhxcjRYGvCSCuNhNQ4K6WzoktaWcu7QMAjrDErLU5G+WSoTN1XPGqaa7yemg1eB+AbwKGT25pRw+NkN+VnTkXpVIiCxHBzDhCOJRfmV1p8w+Z0fAM6lGw/dokhKyIhPIo2dCY5qGFxa47IUUQK2Z6TL0AmEy4htPb5AhEPeMU1rbna2ar9dEYpPQjwyNaN760WHALGEBxJHqWneDx29TC3uerLUD0pQ5Se4vGAVMdDuzFbD3M3vBFPAeJeN2FxGI4EYyQq8qmZIT1A8ChUY7VwocL43IA5CCqpugM91eNBpyQrT1jCG2ZgTeBNEz6Nl/1gjgIglROkCAMeYrq+vl478MwQgbQOzDK9YIQ1HTgXzLkgpWsmu7SLpwKPMY1W/jyFYIAEjOyFLlzVpSskUcFE84q1s+SXD9ZsEDvmJS1KCmcj2TV9wEYXycIId/kvfA+JKDIZnAO2HJCa5VG7cqTv92CniA8FD4cCD/569eHHTS3G0EJJEtEjY+N4XRgOByU4dImQEEGqUlwMHHjYEX5o11igywOaVyBzgXahcQqYUqAlCdNsTASht+5mYYSWgDNQGgOAZaBBwkOQzU0Yc+JxyFK0T0qepKd9PA6ZbD/m6i9F/brKNL4g4XHGloMuAK2BtXDDTcWcALYTQVKGGz39E/YFW8gChDFGn2/SKsVRJG/JogcBIY/NtQx0FVgb26TAdHZFKvA8N3D4BYK5edAJ84OKSosMPNBYTSoPcs2z1Tw5j5GaUQCE3DTXO6geOlwbi6t9qlosLI4FcywUUq4SLYsACNt3Z2iu4ECxWAa65b0iIMKcV5Qf31/EnQpyR4SZ9MJrWLJmZpj9IVqqqAocoAigSviDAZQtzqpdFZIUq+SaKwLxmlCkXKYHFR6OxDDINhxaT53AGoZVj0Bj7RtIqdNghpotiTkuUG+h8OcoREe+uQUIVhRz3ei0xKweyBWQ8ouT4/5OrniA71zlqkonilyQpSwWIWU8hJbdJbSvKsw3F36e8V8EGfkW87kt64SLJa3mCwDg4bUsGY97t4qTwZwMVc608CG43PTIIOwyDXd7CJFvFVMxgULnYFCeUYtpDYHPVmBI1eiLQQEPwcVbQDgLZbCQ7RIRGgl2NMxeq7vtLyX40wT9h762uGkOxz9JiGAkLFEvWXjTmRm2daDbDkoIvPOWTuiFgcbYCwJvBg8IMwVR8VA7nAIeSPc1/DnKh7FchP0rG6/OBk0ca+Epq8mokIzA2yGzoBrdlVphB9LaZoY8w7vbnvSyrcnjp83K3AmOcTsQzIb30QETMNkqoLtVPsyZ+dF9q667dX03mZlO+3YajG+UXX8+XRpPin83/OVNbgfrvqN9wGeBztzcdWb69mWrbfqjd6UDouPaTg0YTwPBaAhO9+1lbdXbtnHzuHiRpsLdsL3p39ZkeIz08ufXznjSV2is89aE53tZvPyZ1MfA1ttvVbtbr257TnXTr7dRl7Xb2nRyY9sv8FXHw+qm3Xi2R/XqplevSu3m2u6O7u3usNZtN9pSu/GePAafjcaaAvy/DY+Dz+06NRW+g93k9teHIT3obac3e5k9O+2bl8X4Zg3vd7f9p7b08tZ2OjtZ6wAovZ2M9FXIhFquoKJP+/ocWrY/h14htOcgeIP/Q1NU7CugPo2V3uPOWjUCc/iudX9uG+AnkPG4w5WkuoltyHwX1P+svOSBn1GXFNQBB4pos38Q3rLR37Rhbu7lzPT7sH8GeEVNaiuHQ//racP2vNEJoUCic0aPHB3OfeEnxnKa+m3eKnCduRV3howHDxy3nOF3c0bBj1R41GikjXjyFmHfhT42P7MNlOZier22xq5ne8vriW+sHQ/gzqNYVWrV1IbHAQ0Ft/XZ4w42B+PXqSIuAELWsZT0awL7gNAlCPz75vHwru8hLNLHbpDwut4EtY1u/hc=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(238, 238, 238);"><defs><clipPath id="mx-clip-25-144-112-26-0"><rect x="25" y="144" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-176-112-26-0"><rect x="25" y="176" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-208-112-26-0"><rect x="25" y="208" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-241-227-35-0"><rect x="25" y="241" width="227" height="35"/></clipPath><clipPath id="mx-clip-25-273-112-26-0"><rect x="25" y="273" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-305-112-26-0"><rect x="25" y="305" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-337-112-26-0"><rect x="25" y="337" width="112" height="26"/></clipPath><clipPath id="mx-clip-202-237-10-20-0"><rect x="202" y="237" width="10" height="20"/></clipPath><clipPath id="mx-clip-132-144-192-26-0"><rect x="132" y="144" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-176-195-26-0"><rect x="132" y="176" width="195" height="26"/></clipPath><clipPath id="mx-clip-132-208-192-26-0"><rect x="132" y="208" width="192" height="26"/></clipPath><clipPath id="mx-clip-226-241-109-26-0"><rect x="226" y="241" width="109" height="26"/></clipPath><clipPath id="mx-clip-132-273-192-26-0"><rect x="132" y="273" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-305-192-26-0"><rect x="132" y="305" width="192" height="26"/></clipPath><clipPath id="mx-clip-132-337-211-26-0"><rect x="132" y="337" width="211" height="26"/></clipPath><clipPath id="mx-clip-385-112-82-26-0"><rect x="385" y="112" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-144-92-26-0"><rect x="385" y="144" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-176-82-26-0"><rect x="385" y="176" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-208-92-26-0"><rect x="385" y="208" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-241-82-26-0"><rect x="385" y="241" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-273-92-26-0"><rect x="385" y="273" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-305-108-26-0"><rect x="385" y="305" width="108" height="26"/></clipPath><clipPath id="mx-clip-385-337-102-26-0"><rect x="385" y="337" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-112-147-26-0"><rect x="506" y="112" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-144-147-26-0"><rect x="506" y="144" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-176-147-26-0"><rect x="506" y="176" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-208-204-26-0"><rect x="506" y="208" width="204" height="26"/></clipPath><clipPath id="mx-clip-506-241-102-26-0"><rect x="506" y="241" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-273-138-26-0"><rect x="506" y="273" width="138" height="26"/></clipPath><clipPath id="mx-clip-506-305-137-26-0"><rect x="506" y="305" width="137" height="26"/></clipPath><clipPath id="mx-clip-506-337-128-26-0"><rect x="506" y="337" width="128" height="26"/></clipPath><clipPath id="mx-clip-378-432-158-26-0"><rect x="378" y="432" width="158" height="26"/></clipPath><clipPath id="mx-clip-378-496-122-26-0"><rect x="378" y="496" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-529-122-26-0"><rect x="378" y="529" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-561-152-26-0"><rect x="378" y="561" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-593-122-26-0"><rect x="378" y="593" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-626-125-26-0"><rect x="378" y="626" width="125" height="26"/></clipPath><clipPath id="mx-clip-378-658-122-26-0"><rect x="378" y="658" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-690-122-26-0"><rect x="378" y="690" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-722-122-26-0"><rect x="378" y="722" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-755-122-26-0"><rect x="378" y="755" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-787-122-26-0"><rect x="378" y="787" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-819-122-26-0"><rect x="378" y="819" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-883-122-26-0"><rect x="378" y="883" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-916-122-26-0"><rect x="378" y="916" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-851-122-26-0"><rect x="378" y="851" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-432-117-26-0"><rect x="548" y="432" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-497-142-26-0"><rect x="548" y="497" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-529-142-26-0"><rect x="548" y="529" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-561-122-26-0"><rect x="548" y="561" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-593-142-26-0"><rect x="548" y="593" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-626-142-26-0"><rect x="548" y="626" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-658-142-26-0"><rect x="548" y="658" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-690-142-26-0"><rect x="548" y="690" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-722-142-26-0"><rect x="548" y="722" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-755-142-26-0"><rect x="548" y="755" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-787-142-26-0"><rect x="548" y="787" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-819-142-26-0"><rect x="548" y="819" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-851-142-26-0"><rect x="548" y="851" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-883-142-26-0"><rect x="548" y="883" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-916-142-26-0"><rect x="548" y="916" width="142" height="26"/></clipPath><clipPath id="mx-clip-425-1006-239-20-0"><rect x="425" y="1006" width="239" height="20"/></clipPath><clipPath id="mx-clip-425-1037-258-20-0"><rect x="425" y="1037" width="258" height="20"/></clipPath><clipPath id="mx-clip-745-112-92-26-0"><rect x="745" y="112" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-144-92-26-0"><rect x="745" y="144" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-305-72-26-0"><rect x="745" y="305" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-176-92-26-0"><rect x="745" y="176" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-273-92-26-0"><rect x="745" y="273" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-241-78-26-0"><rect x="745" y="241" width="78" height="26"/></clipPath><clipPath id="mx-clip-745-337-72-26-0"><rect x="745" y="337" width="72" height="26"/></clipPath><clipPath id="mx-clip-854-112-162-26-0"><rect x="854" y="112" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-144-162-26-0"><rect x="854" y="144" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-305-162-26-0"><rect x="854" y="305" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-176-162-26-0"><rect x="854" y="176" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-273-162-26-0"><rect x="854" y="273" width="162" height="26"/></clipPath><clipPath id="mx-clip-854-241-152-26-0"><rect x="854" y="241" width="152" height="26"/></clipPath><clipPath id="mx-clip-854-337-85-26-0"><rect x="854" y="337" width="85" height="26"/></clipPath><clipPath id="mx-clip-745-432-222-26-0"><rect x="745" y="432" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-464-232-26-0"><rect x="745" y="464" width="232" height="26"/></clipPath><clipPath id="mx-clip-745-496-222-26-0"><rect x="745" y="496" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-529-222-26-0"><rect x="745" y="529" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-561-222-26-0"><rect x="745" y="561" width="222" height="26"/></clipPath><clipPath id="mx-clip-1005-432-408-26-0"><rect x="1005" y="432" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-464-408-26-0"><rect x="1005" y="464" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-496-262-26-0"><rect x="1005" y="496" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-528-262-26-0"><rect x="1005" y="528" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-561-298-26-0"><rect x="1005" y="561" width="298" height="26"/></clipPath><clipPath id="mx-clip-745-658-82-26-0"><rect x="745" y="658" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-690-82-26-0"><rect x="745" y="690" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-722-82-26-0"><rect x="745" y="722" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-787-82-27-0"><rect x="745" y="787" width="82" height="27"/></clipPath><clipPath id="mx-clip-745-819-82-26-0"><rect x="745" y="819" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-851-82-26-0"><rect x="745" y="851" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-884-82-26-0"><rect x="745" y="884" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-916-82-26-0"><rect x="745" y="916" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-948-102-26-0"><rect x="745" y="948" width="102" height="26"/></clipPath><clipPath id="mx-clip-745-980-82-26-0"><rect x="745" y="980" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1013-98-26-0"><rect x="745" y="1013" width="98" height="26"/></clipPath><clipPath id="mx-clip-745-1045-101-26-0"><rect x="745" y="1045" width="101" height="26"/></clipPath><clipPath id="mx-clip-855-658-132-26-0"><rect x="855" y="658" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-690-132-26-0"><rect x="855" y="690" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-722-132-26-0"><rect x="855" y="722" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-786-195-28-0"><rect x="855" y="786" width="195" height="28"/></clipPath><clipPath id="mx-clip-855-819-132-26-0"><rect x="855" y="819" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-851-132-26-0"><rect x="855" y="851" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-884-132-26-0"><rect x="855" y="884" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-916-132-26-0"><rect x="855" y="916" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-948-202-26-0"><rect x="855" y="948" width="202" height="26"/></clipPath><clipPath id="mx-clip-855-981-132-26-0"><rect x="855" y="981" width="132" height="26"/></clipPath><clipPath id="mx-clip-855-1013-206-26-0"><rect x="855" y="1013" width="206" height="26"/></clipPath><clipPath id="mx-clip-855-1045-132-26-0"><rect x="855" y="1045" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-893-102-26-0"><rect x="1105" y="893" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-926-102-26-0"><rect x="1105" y="926" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-958-102-26-0"><rect x="1105" y="958" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-990-102-26-0"><rect x="1105" y="990" width="102" height="26"/></clipPath><clipPath id="mx-clip-1215-893-132-26-0"><rect x="1215" y="893" width="132" height="26"/></clipPath><clipPath id="mx-clip-1215-926-188-26-0"><rect x="1215" y="926" width="188" height="26"/></clipPath><clipPath id="mx-clip-1215-958-112-26-0"><rect x="1215" y="958" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-990-112-26-0"><rect x="1215" y="990" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-112-112-26-0"><rect x="1105" y="112" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-144-112-26-0"><rect x="1105" y="144" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-176-112-26-0"><rect x="1105" y="176" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-208-112-26-0"><rect x="1105" y="208" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-241-112-26-0"><rect x="1105" y="241" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-273-112-26-0"><rect x="1105" y="273" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-305-112-26-0"><rect x="1105" y="305" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-337-132-26-0"><rect x="1105" y="337" width="132" height="26"/></clipPath><clipPath id="mx-clip-1245-112-141-26-0"><rect x="1245" y="112" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-144-170-26-0"><rect x="1245" y="144" width="170" height="26"/></clipPath><clipPath id="mx-clip-1245-176-177-26-0"><rect x="1245" y="176" width="177" height="26"/></clipPath><clipPath id="mx-clip-1245-208-168-26-0"><rect x="1245" y="208" width="168" height="26"/></clipPath><clipPath id="mx-clip-1245-241-141-26-0"><rect x="1245" y="241" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-273-141-26-0"><rect x="1245" y="273" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-305-122-26-0"><rect x="1245" y="305" width="122" height="26"/></clipPath><clipPath id="mx-clip-1245-337-132-26-0"><rect x="1245" y="337" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-657-92-26-0"><rect x="1105" y="657" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-690-92-26-0"><rect x="1105" y="690" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-722-92-26-0"><rect x="1105" y="722" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-754-92-26-0"><rect x="1105" y="754" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-787-92-26-0"><rect x="1105" y="787" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-657-112-26-0"><rect x="1215" y="657" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-690-112-26-0"><rect x="1215" y="690" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-722-112-26-0"><rect x="1215" y="722" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-754-112-26-0"><rect x="1215" y="754" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-787-112-26-0"><rect x="1215" y="787" width="112" height="26"/></clipPath><clipPath id="mx-clip-1084-76-165-26-0"><rect x="1084" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-76-165-26-0"><rect x="725" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-369-76-165-26-0"><rect x="369" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-5-76-165-26-0"><rect x="5" y="76" width="165" height="26"/></clipPath><clipPath id="mx-clip-4-397-165-26-0"><rect x="4" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-365-397-165-26-0"><rect x="365" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-397-165-26-0"><rect x="725" y="397" width="165" height="26"/></clipPath><clipPath id="mx-clip-1085-621-165-26-0"><rect x="1085" y="621" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-621-165-26-0"><rect x="725" y="621" width="165" height="26"/></clipPath><clipPath id="mx-clip-191-1-273-52-0"><rect x="191" y="1" width="273" height="52"/></clipPath><clipPath id="mx-clip-745-208-80-26-0"><rect x="745" y="208" width="80" height="26"/></clipPath><clipPath id="mx-clip-854-208-180-26-0"><rect x="854" y="208" width="180" height="26"/></clipPath><clipPath id="mx-clip-378-464-142-26-0"><rect x="378" y="464" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-464-115-26-0"><rect x="548" y="464" width="115" height="26"/></clipPath><clipPath id="mx-clip-855-755-132-26-0"><rect x="855" y="755" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-754-82-26-0"><rect x="745" y="754" width="82" height="26"/></clipPath><clipPath id="mx-clip-132-112-192-26-0"><rect x="132" y="112" width="192" height="26"/></clipPath><clipPath id="mx-clip-25-112-112-26-0"><rect x="25" y="112" width="112" height="26"/></clipPath><clipPath id="mx-clip-100-140-10-20-0"><rect x="100" y="140" width="10" height="20"/></clipPath><clipPath id="mx-clip-25-432-132-26-0"><rect x="25" y="432" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-464-132-26-0"><rect x="25" y="464" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-497-132-26-0"><rect x="25" y="497" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-529-132-26-0"><rect x="25" y="529" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-561-132-26-0"><rect x="25" y="561" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-593-132-26-0"><rect x="25" y="593" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-626-132-26-0"><rect x="25" y="626" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-658-132-26-0"><rect x="25" y="658" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-690-132-26-0"><rect x="25" y="690" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-722-132-26-0"><rect x="25" y="722" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-755-132-26-0"><rect x="25" y="755" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-787-132-26-0"><rect x="25" y="787" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-819-132-26-0"><rect x="25" y="819" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-851-132-26-0"><rect x="25" y="851" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-884-132-26-0"><rect x="25" y="884" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-916-132-26-0"><rect x="25" y="916" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-948-132-26-0"><rect x="25" y="948" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-981-132-26-0"><rect x="25" y="981" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1013-132-26-0"><rect x="25" y="1013" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1045-132-26-0"><rect x="25" y="1045" width="132" height="26"/></clipPath><clipPath id="mx-clip-165-432-142-26-0"><rect x="165" y="432" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-464-142-26-0"><rect x="165" y="464" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-497-142-26-0"><rect x="165" y="497" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-529-142-26-0"><rect x="165" y="529" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-561-142-26-0"><rect x="165" y="561" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-593-142-26-0"><rect x="165" y="593" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-626-142-26-0"><rect x="165" y="626" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-658-179-26-0"><rect x="165" y="658" width="179" height="26"/></clipPath><clipPath id="mx-clip-165-690-151-26-0"><rect x="165" y="690" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-722-142-26-0"><rect x="165" y="722" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-916-173-26-0"><rect x="165" y="916" width="173" height="26"/></clipPath><clipPath id="mx-clip-165-787-142-26-0"><rect x="165" y="787" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-819-142-26-0"><rect x="165" y="819" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-851-142-26-0"><rect x="165" y="851" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-884-142-26-0"><rect x="165" y="884" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-948-142-26-0"><rect x="165" y="948" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-755-142-26-0"><rect x="165" y="755" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-981-168-26-0"><rect x="165" y="981" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1013-142-26-0"><rect x="165" y="1013" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1045-148-26-0"><rect x="165" y="1045" width="148" height="26"/></clipPath><clipPath id="mx-clip-485-18-448-26-0"><rect x="485" y="18" width="448" height="26"/></clipPath><clipPath id="mx-clip-1105-819-92-26-0"><rect x="1105" y="819" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-852-92-26-0"><rect x="1105" y="852" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-819-112-26-0"><rect x="1215" y="819" width="112" height="26"/></clipPath><clipPath id="mx-clip-1216-852-112-26-0"><rect x="1216" y="852" width="112" height="26"/></clipPath></defs><g><image x="387.08" y="1004.5" width="24.83" height="24.83" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSI+PHBhdGggc3Ryb2tlPSIjMjliNmYyIiBmaWxsPSIjMjliNmYyIiBkPSJNMTUuNTUgNS41NUwxMSAxdjMuMDdDNy4wNiA0LjU2IDQgNy45MiA0IDEyczMuMDUgNy40NCA3IDcuOTN2LTIuMDJjLTIuODQtLjQ4LTUtMi45NC01LTUuOTFzMi4xNi01LjQzIDUtNS45MVYxMGw0LjU1LTQuNDV6TTE5LjkzIDExYy0uMTctMS4zOS0uNzItMi43My0xLjYyLTMuODlsLTEuNDIgMS40MmMuNTQuNzUuODggMS42IDEuMDIgMi40N2gyLjAyek0xMyAxNy45djIuMDJjMS4zOS0uMTcgMi43NC0uNzEgMy45LTEuNjFsLTEuNDQtMS40NGMtLjc1LjU0LTEuNTkuODktMi40NiAxLjAzem0zLjg5LTIuNDJsMS40MiAxLjQxYy45LTEuMTYgMS40NS0yLjUgMS42Mi0zLjg5aC0yLjAyYy0uMTQuODctLjQ4IDEuNzItMS4wMiAyLjQ4eiIvPjwvc3ZnPg==" preserveAspectRatio="none"/><rect x="7" y="425" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="489" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="457" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="522" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="554" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="618" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="651" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1038" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1006" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="973" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="941" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="425" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="489" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="522" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="554" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="618" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="457" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="651" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="330" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="298" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="266" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="233" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="201" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="169" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="137" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="105" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="425" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="457" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="489" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="521" width="700" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="554" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="747" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="780" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="844" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="876" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="909" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="973" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="941" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1006" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1038" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="683" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="715" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="747" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="779" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="886" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="918" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="951" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="983" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="21" y="139" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-144-112-26-0)" font-size="12px"><text x="26.5" y="156.5">(Shift+)Enter</text></g><rect x="21" y="171" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-176-112-26-0)" font-size="12px"><text x="26.5" y="188.5">Enter / Tab</text></g><rect x="21" y="203" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-208-112-26-0)" font-size="12px"><text x="26.5" y="220.5">Enter / F2</text></g><rect x="21" y="235.5" width="235" height="34.5" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-241-227-35-0)" font-size="12px"><text x="26.5" y="253">Ctrl+Enter / Shift+Tab / F2 / Esc</text></g><rect x="21" y="268" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-273-112-26-0)" font-size="12px"><text x="26.5" y="285.5">Ctrl+B / I</text></g><rect x="21" y="300" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-305-112-26-0)" font-size="12px"><text x="26.5" y="317.5">Ctrl+U</text></g><rect x="21" y="332" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-337-112-26-0)" font-size="12px"><text x="26.5" y="349.5">Ctrl+. / ,</text></g><rect x="202" y="235.5" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-202-237-10-20-0)" font-size="10px"><text x="203.5" y="247">1</text></g><rect x="128" y="139" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-144-192-26-0)" font-size="12px"><text x="133.5" y="156.5">New line in formatted labels</text></g><rect x="128" y="171" width="203" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-176-195-26-0)" font-size="12px"><text x="133.5" y="188.5">Line break / Tab / Indent in labels</text></g><rect x="128" y="203" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-208-192-26-0)" font-size="12px"><text x="133.5" y="220.5">Start editing label of selected cell</text></g><rect x="222" y="235.5" width="117" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-226-241-109-26-0)" font-size="12px"><text x="227.5" y="253">Stop editing</text></g><rect x="128" y="268" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-273-192-26-0)" font-size="12px"><text x="133.5" y="285.5">Toggle bold / italic on selected text</text></g><rect x="128" y="300" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-305-192-26-0)" font-size="12px"><text x="133.5" y="317.5">Toggle underline on selected text</text></g><rect x="128" y="332" width="219" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-337-211-26-0)" font-size="12px"><text x="133.5" y="349.5">Superscript / Subscript on selected text</text></g><rect x="381" y="107" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-112-82-26-0)" font-size="12px"><text x="386.5" y="124.5">(Shift+)Tab</text></g><rect x="381" y="139" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-144-92-26-0)" font-size="12px"><text x="386.5" y="156.5">Alt+Tab</text></g><rect x="381" y="171" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-176-82-26-0)" font-size="12px"><text x="386.5" y="188.5">Shift+Drag</text></g><rect x="381" y="203" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-208-92-26-0)" font-size="12px"><text x="386.5" y="220.5">Alt+Drag</text></g><rect x="381" y="235.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-241-82-26-0)" font-size="12px"><text x="386.5" y="253">Ctrl+(Shift+)A</text></g><rect x="381" y="268" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-273-92-26-0)" font-size="12px"><text x="386.5" y="285.5">Ctrl+Shift+I / E</text></g><rect x="381" y="300" width="116" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-305-108-26-0)" font-size="12px"><text x="386.5" y="317.5">Ctrl / Shift+Select</text></g><rect x="381" y="332" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-337-102-26-0)" font-size="12px"><text x="386.5" y="349.5">Alt+Click</text></g><rect x="502" y="107" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-112-147-26-0)" font-size="12px"><text x="507.5" y="124.5">Select next / previous</text></g><rect x="502" y="139" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-144-147-26-0)" font-size="12px"><text x="507.5" y="156.5">Select parent</text></g><rect x="502" y="171" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-176-147-26-0)" font-size="12px"><text x="507.5" y="188.5">Toggle to selection</text></g><rect x="502" y="203" width="212" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-208-204-26-0)" font-size="12px"><text x="507.5" y="220.5">Start selection / Select intersection</text></g><rect x="502" y="235.5" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-241-102-26-0)" font-size="12px"><text x="507.5" y="253">Select all / none</text></g><rect x="502" y="268" width="146" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-273-138-26-0)" font-size="12px"><text x="507.5" y="285.5">Select vertices / edges</text></g><rect x="502" y="300" width="145" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-305-137-26-0)" font-size="12px"><text x="507.5" y="317.5">Toggle selection state</text></g><rect x="502" y="332" width="136" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-337-128-26-0)" font-size="12px"><text x="507.5" y="349.5">Select cell below</text></g><rect x="374" y="427" width="166" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-432-158-26-0)" font-size="12px"><text x="379.5" y="444.5">Alt+Wheel</text></g><rect x="374" y="491.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-496-122-26-0)" font-size="12px"><text x="379.5" y="509">Wheel</text></g><rect x="374" y="524" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-529-122-26-0)" font-size="12px"><text x="379.5" y="541.5">Shift+Wheel</text></g><rect x="374" y="556" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-561-152-26-0)" font-size="12px"><text x="379.5" y="573.5">Space / Right-click+Drag</text></g><rect x="374" y="588" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-593-122-26-0)" font-size="12px"><text x="379.5" y="605.5">Alt+Ctrl+Shift+Drag</text></g><rect x="374" y="620.5" width="133" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-626-125-26-0)" font-size="12px"><text x="379.5" y="638">Alt+Resize / Move</text></g><rect x="374" y="653" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-658-122-26-0)" font-size="12px"><text x="379.5" y="670.5">Shift+Home</text></g><rect x="374" y="685" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-690-122-26-0)" font-size="12px"><text x="379.5" y="702.5">End</text></g><rect x="374" y="717" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-722-122-26-0)" font-size="12px"><text x="379.5" y="734.5">Enter / Home</text></g><rect x="374" y="749.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-755-122-26-0)" font-size="12px"><text x="379.5" y="767">Ctrl+Shift+H</text></g><rect x="374" y="782" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-787-122-26-0)" font-size="12px"><text x="379.5" y="799.5">Ctrl+J</text></g><rect x="374" y="814" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-819-122-26-0)" font-size="12px"><text x="379.5" y="831.5">Ctrl+Shift+J</text></g><rect x="374" y="878.5" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-883-122-26-0)" font-size="12px"><text x="379.5" y="896">Ctrl + (Numpad)</text></g><rect x="374" y="911" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-916-122-26-0)" font-size="12px"><text x="379.5" y="928.5">Ctrl - (Numpad)</text></g><rect x="374" y="846" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-851-122-26-0)" font-size="12px"><text x="379.5" y="863.5">Ctrl+0</text></g><rect x="544" y="427" width="125" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-432-117-26-0)" font-size="12px"><text x="549.5" y="444.5">Canvas zoom in/out</text></g><rect x="544" y="491.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-497-142-26-0)" font-size="12px"><text x="549.5" y="509">Canvas vertical scroll</text></g><rect x="544" y="524" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-529-142-26-0)" font-size="12px"><text x="549.5" y="541.5">Canvas horizontal scroll</text></g><rect x="544" y="556" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-561-122-26-0)" font-size="12px"><text x="549.5" y="573.5">Pan canvas</text></g><rect x="544" y="588" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-593-142-26-0)" font-size="12px"><text x="549.5" y="605.5">Create / Remove space</text></g><rect x="544" y="620.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-626-142-26-0)" font-size="12px"><text x="549.5" y="638">Ignore grid</text></g><rect x="544" y="653" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-658-142-26-0)" font-size="12px"><text x="549.5" y="670.5">Home</text></g><rect x="544" y="685" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-690-142-26-0)" font-size="12px"><text x="549.5" y="702.5">Refresh</text></g><rect x="544" y="717" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-722-142-26-0)" font-size="12px"><text x="549.5" y="734.5">Reset view</text></g><rect x="544" y="749.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-755-142-26-0)" font-size="12px"><text x="549.5" y="767">Fit window</text></g><rect x="544" y="782" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-787-142-26-0)" font-size="12px"><text x="549.5" y="799.5">Fit page</text></g><rect x="544" y="814" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-819-142-26-0)" font-size="12px"><text x="549.5" y="831.5">Fit two pages</text></g><rect x="544" y="846" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-851-142-26-0)" font-size="12px"><text x="549.5" y="863.5">Custom zoom</text></g><rect x="544" y="878.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-883-142-26-0)" font-size="12px"><text x="549.5" y="896">Zoom in</text></g><rect x="544" y="911" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-916-142-26-0)" font-size="12px"><text x="549.5" y="928.5">Zoom out</text></g><rect x="425" y="951" width="248" height="48" rx="7.2" ry="7.2" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="426.5" y="965.5">Click to connect and clone (Ctrl+Click to clone,</text><text x="426.5" y="979.5">Shift+Click to connect), Drag to connect</text><text x="426.5" y="993.5">(Ctrl+Drag to clone)</text></g><image x="391.99" y="1034.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg=="/><rect x="425" y="1006" width="239" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-425-1006-239-20-0)" font-size="12px"><text x="426.5" y="1020.5">Click to rotate 90° clockwise, Drag to rotate</text></g><rect x="425" y="1037" width="258" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-425-1037-258-20-0)" font-size="12px"><text x="426.5" y="1051.5">Ctrl: Ask   Alt: Origin   Shift: As Image</text></g><rect x="741" y="107" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-112-92-26-0)" font-size="12px"><text x="746.5" y="124.5">Ctrl+Shift+L</text></g><rect x="741" y="139" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-144-92-26-0)" font-size="12px"><text x="746.5" y="156.5">Ctrl+Shift+O</text></g><rect x="741" y="300" width="80" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-305-72-26-0)" font-size="12px"><text x="746.5" y="317.5">Ctrl+M</text></g><rect x="741" y="171" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-176-92-26-0)" font-size="12px"><text x="746.5" y="188.5">Ctrl+Shift+P</text></g><rect x="741" y="268" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-273-92-26-0)" font-size="12px"><text x="746.5" y="285.5">Ctrl+Shift+M</text></g><rect x="741" y="235.5" width="86" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-241-78-26-0)" font-size="12px"><text x="746.5" y="253">Ctrl+K</text></g><rect x="741" y="332" width="80" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-337-72-26-0)" font-size="12px"><text x="746.5" y="349.5">F1</text></g><rect x="850" y="107" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-112-162-26-0)" font-size="12px"><text x="855.5" y="124.5">Toggle Layers</text></g><rect x="850" y="139" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-144-162-26-0)" font-size="12px"><text x="855.5" y="156.5">Toggle Outline</text></g><rect x="850" y="300" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-305-162-26-0)" font-size="12px"><text x="855.5" y="317.5">Edit metadata</text></g><rect x="850" y="171" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-176-162-26-0)" font-size="12px"><text x="855.5" y="188.5">Toggle Format</text></g><rect x="850" y="268" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-273-162-26-0)" font-size="12px"><text x="855.5" y="285.5">Edit vertex geometry</text></g><rect x="850" y="235.5" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-241-152-26-0)" font-size="12px"><text x="855.5" y="253">Toggle Tags</text></g><rect x="850" y="332" width="93" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-337-85-26-0)" font-size="12px"><text x="855.5" y="349.5">About</text></g><rect x="741" y="427" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-432-222-26-0)" font-size="12px"><text x="746.5" y="444.5">Alt+(Shift+)Drag shape from library</text></g><rect x="741" y="459" width="240" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-464-232-26-0)" font-size="12px"><text x="746.5" y="476.5">Alt+(Shift / Ctrl)+Click on a library shape</text></g><rect x="741" y="491" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-496-222-26-0)" font-size="12px"><text x="746.5" y="508.5">Shift+Click on a library shape</text></g><rect x="741" y="523.5" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-529-222-26-0)" font-size="12px"><text x="746.5" y="541">Click on a library shape</text></g><rect x="741" y="556" width="230" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-561-222-26-0)" font-size="12px"><text x="746.5" y="573.5">Alt / Shift+Connect</text></g><rect x="1001" y="427" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-432-408-26-0)" font-size="12px"><text x="1006.5" y="444.5">Disable replace and connect on drop targets (Shift ignores current style)</text></g><rect x="1001" y="459" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-464-408-26-0)" font-size="12px"><text x="1006.5" y="476.5">Insert and connect the selected item (Shift ignores current style)</text></g><rect x="1001" y="491" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-496-262-26-0)" font-size="12px"><text x="1006.5" y="508.5">Replace the selected item with the clicked item</text></g><rect x="1001" y="523.5" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-528-262-26-0)" font-size="12px"><text x="1006.5" y="541">Connect to unconnected side of selected edge</text></g><rect x="1001" y="556" width="306" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-561-298-26-0)" font-size="12px"><text x="1006.5" y="573.5">Ignore shape / Connect to a fixed point</text></g><rect x="741" y="652.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-658-82-26-0)" font-size="12px"><text x="746.5" y="670">Ctrl+(Shift+)S</text></g><rect x="741" y="685" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-690-82-26-0)" font-size="12px"><text x="746.5" y="702.5">Ctrl+Z</text></g><rect x="741" y="717" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-722-82-26-0)" font-size="12px"><text x="746.5" y="734.5">Alt+Shift+A</text></g><rect x="741" y="781.5" width="90" height="27" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-787-82-27-0)" font-size="12px"><text x="746.5" y="799">Hold Alt</text></g><rect x="741" y="814" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-819-82-26-0)" font-size="12px"><text x="746.5" y="831.5">Ctrl+Shift+G</text></g><rect x="741" y="846" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-851-82-26-0)" font-size="12px"><text x="746.5" y="863.5">Ctrl+P</text></g><rect x="741" y="878.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-884-82-26-0)" font-size="12px"><text x="746.5" y="896">Ctrl+Y</text></g><rect x="741" y="911" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-916-82-26-0)" font-size="12px"><text x="746.5" y="928.5">Ctrl+Shift+Z</text></g><rect x="741" y="943" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-948-102-26-0)" font-size="12px"><text x="746.5" y="960.5">A / S / D / F / C</text></g><rect x="741" y="975.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-980-82-26-0)" font-size="12px"><text x="746.5" y="993">X</text></g><rect x="741" y="1008" width="106" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1013-98-26-0)" font-size="12px"><text x="746.5" y="1025.5">Ctrl / Right click</text></g><rect x="741" y="1040" width="109" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-1045-101-26-0)" font-size="12px"><text x="746.5" y="1057.5">(Ctrl / Shift)+Esc</text></g><rect x="851" y="652.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-658-132-26-0)" font-size="12px"><text x="856.5" y="670">Save (as)</text></g><rect x="851" y="685" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-690-132-26-0)" font-size="12px"><text x="856.5" y="702.5">Undo</text></g><rect x="851" y="717" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-722-132-26-0)" font-size="12px"><text x="856.5" y="734.5">Connection arrows</text></g><rect x="851" y="781" width="203" height="28" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-786-195-28-0)" font-size="12px"><text x="856.5" y="798.5">Ignore handles under the mouse</text></g><rect x="851" y="814" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-819-132-26-0)" font-size="12px"><text x="856.5" y="831.5">Toggle grid</text></g><rect x="851" y="846" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-851-132-26-0)" font-size="12px"><text x="856.5" y="863.5">Print</text></g><rect x="851" y="878.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-884-132-26-0)" font-size="12px"><text x="856.5" y="896">Redo (Windows)</text></g><rect x="851" y="911" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-916-132-26-0)" font-size="12px"><text x="856.5" y="928.5">Redo (Linux/macOS)</text></g><rect x="851" y="943" width="210" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-948-202-26-0)" font-size="12px"><text x="856.5" y="960.5">Add Text/Note/Rectangle/Ellipse/Line</text></g><rect x="851" y="975.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-981-132-26-0)" font-size="12px"><text x="856.5" y="993">Toggle Freehand Mode</text></g><rect x="851" y="1008" width="214" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-1013-206-26-0)" font-size="12px"><text x="856.5" y="1025.5">Context Menu</text></g><rect x="851" y="1040" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-1045-132-26-0)" font-size="12px"><text x="856.5" y="1057.5">Cancel editing / action</text></g><rect x="1101" y="888" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-893-102-26-0)" font-size="12px"><text x="1106.5" y="905.5">Drag</text></g><rect x="1101" y="920.5" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-926-102-26-0)" font-size="12px"><text x="1106.5" y="938">Tap and hold</text></g><rect x="1101" y="953" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-958-102-26-0)" font-size="12px"><text x="1106.5" y="970.5">Pinch</text></g><rect x="1101" y="985" width="110" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-990-102-26-0)" font-size="12px"><text x="1106.5" y="1002.5">Tap selected cell</text></g><rect x="1211" y="888" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-893-132-26-0)" font-size="12px"><text x="1216.5" y="905.5">Move cell / Pan canvas</text></g><rect x="1211" y="921" width="196" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-926-188-26-0)" font-size="12px"><text x="1216.5" y="938.5">Toggle selection / Rubberband</text></g><rect x="1211" y="953" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-958-112-26-0)" font-size="12px"><text x="1216.5" y="970.5">Zoom</text></g><rect x="1211" y="985" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-990-112-26-0)" font-size="12px"><text x="1216.5" y="1002.5">Context menu</text></g><rect x="1101" y="107" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-112-112-26-0)" font-size="12px"><text x="1106.5" y="124.5">Cursor</text></g><rect x="1101" y="139" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-144-112-26-0)" font-size="12px"><text x="1106.5" y="156.5">Shift+Cursor</text></g><rect x="1101" y="171" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-176-112-26-0)" font-size="12px"><text x="1106.5" y="188.5">Ctrl+Cursor</text></g><rect x="1101" y="203" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-208-112-26-0)" font-size="12px"><text x="1106.5" y="220.5">Ctrl+Shift+Cursor</text></g><rect x="1101" y="235.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-241-112-26-0)" font-size="12px"><text x="1106.5" y="253">Alt+Shift+Cursor</text></g><rect x="1101" y="268" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-273-112-26-0)" font-size="12px"><text x="1106.5" y="285.5">Alt+Cursor</text></g><rect x="1101" y="300" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-305-112-26-0)" font-size="12px"><text x="1106.5" y="317.5">Ctrl+Shift+Pg Up</text></g><rect x="1101" y="332" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-337-132-26-0)" font-size="12px"><text x="1106.5" y="349.5">Ctrl+Shift+Pg Down</text></g><rect x="1241" y="107" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-112-141-26-0)" font-size="12px"><text x="1246.5" y="124.5">Scroll / Move cell (pt)</text></g><rect x="1241" y="139" width="178" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-144-170-26-0)" font-size="12px"><text x="1246.5" y="156.5">Move cell (grid) or page</text></g><rect x="1241" y="171" width="185" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-176-177-26-0)" font-size="12px"><text x="1246.5" y="188.5">Resize cell (pt) or select page</text></g><rect x="1241" y="203" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-208-168-26-0)" font-size="12px"><text x="1246.5" y="220.5">Resize cell (grid size)</text></g><rect x="1241" y="235.5" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-241-141-26-0)" font-size="12px"><text x="1246.5" y="253">Clone and connect</text></g><rect x="1241" y="268" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-273-141-26-0)" font-size="12px"><text x="1246.5" y="285.5">Scroll page</text></g><rect x="1241" y="300" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-305-122-26-0)" font-size="12px"><text x="1246.5" y="317.5">Previous page</text></g><rect x="1241" y="332" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-337-132-26-0)" font-size="12px"><text x="1246.5" y="349.5">Next page</text></g><rect x="1101" y="652" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-657-92-26-0)" font-size="12px"><text x="1106.5" y="669.5">Ctrl+Shift+R</text></g><rect x="1101" y="685" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-690-92-26-0)" font-size="12px"><text x="1106.5" y="702.5">Ctrl+E</text></g><rect x="1101" y="717" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-722-92-26-0)" font-size="12px"><text x="1106.5" y="734.5">Ctrl+Shift+D</text></g><rect x="1101" y="749" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-754-92-26-0)" font-size="12px"><text x="1106.5" y="766.5">Ctrl+Shift+C</text></g><rect x="1101" y="781.5" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-787-92-26-0)" font-size="12px"><text x="1106.5" y="799">Ctrl+Shift+V</text></g><rect x="1211" y="652" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-657-112-26-0)" font-size="12px"><text x="1216.5" y="669.5">Clear default style</text></g><rect x="1211" y="685" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-690-112-26-0)" font-size="12px"><text x="1216.5" y="702.5">Edit style</text></g><rect x="1211" y="717" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-722-112-26-0)" font-size="12px"><text x="1216.5" y="734.5">Set as default style</text></g><rect x="1211" y="749" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-754-112-26-0)" font-size="12px"><text x="1216.5" y="766.5">Copy style</text></g><rect x="1211" y="781.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-787-112-26-0)" font-size="12px"><text x="1216.5" y="799">Paste style</text></g><rect x="1080" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1084-76-165-26-0)" font-size="14px"><text x="1085.5" y="90.5">CURSOR / PAGE KEYS</text></g><rect x="721" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-76-165-26-0)" font-size="14px"><text x="726.5" y="90.5">TOOLS</text></g><rect x="365" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-369-76-165-26-0)" font-size="14px"><text x="370.5" y="90.5">SELECTION</text></g><rect x="1" y="71" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-5-76-165-26-0)" font-size="14px"><text x="6.5" y="90.5">LABELS</text></g><rect x="0" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-4-397-165-26-0)" font-size="14px"><text x="5.5" y="411.5">CANVAS</text></g><rect x="361" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-365-397-165-26-0)" font-size="14px"><text x="366.5" y="411.5">VIEW</text></g><rect x="721" y="392" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-397-165-26-0)" font-size="14px"><text x="726.5" y="411.5">LIBRARY / CONNECT</text></g><rect x="1081" y="616" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1085-621-165-26-0)" font-size="14px"><text x="1086.5" y="635.5">STYLES</text></g><rect x="721" y="616" width="173" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-725-621-165-26-0)" font-size="14px"><text x="726.5" y="635.5">DOCUMENT</text></g><rect x="187" y="0.5" width="281" height="51.5" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-191-1-273-52-0)" font-size="27px"><text x="192.5" y="38.25">Keyboard Shortcuts</text></g><rect x="741" y="203" width="88" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-208-80-26-0)" font-size="12px"><text x="746.5" y="220.5">Ctrl+Shift+K</text></g><rect x="850" y="203" width="188" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-854-208-180-26-0)" font-size="12px"><text x="855.5" y="220.5">Toggle Shapes</text></g><a xlink:href="https://app.diagrams.net/#Uhttps%3A%2F%2Fapp.diagrams.net%2Fshortcuts.svg" target="_blank"><rect x="1111.67" y="1046" width="132.33" height="18" fill="none" stroke="none" pointer-events="all"/><g fill="#F08705" font-family="Helvetica" text-decoration="underline" font-size="12px"><text x="1113.17" y="1059.5">Open in diagrams.net...</text></g></a><rect x="374" y="459" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-378-464-142-26-0)" font-size="12px"><text x="379.5" y="476.5">Ctrl+Shift+Wheel</text></g><rect x="544" y="459" width="123" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-464-115-26-0)" font-size="12px"><text x="549.5" y="476.5">Canvas zoom in/out</text></g><rect x="851" y="749.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-855-755-132-26-0)" font-size="12px"><text x="856.5" y="767">Connection points</text></g><rect x="741" y="749.5" width="90" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-745-754-82-26-0)" font-size="12px"><text x="746.5" y="767">Alt+Shift+P</text></g><rect x="128" y="107" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-132-112-192-26-0)" font-size="12px"><text x="133.5" y="124.5">Insert text or add an edge label</text></g><rect x="21" y="107" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-112-112-26-0)" font-size="12px"><text x="26.5" y="124.5">Double-click</text></g><rect x="100" y="139" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-100-140-10-20-0)" font-size="10px"><text x="101.5" y="150.5">1</text></g><rect x="1112" y="1023" width="255" height="19" rx="2.85" ry="2.85" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1037">Ctrl / Shift+Enter: New Line / Apply in Safari</text></g><rect x="1105.33" y="1017" width="20" height="10" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="10px"><text x="1106.83" y="1028.5">1</text></g><rect x="21" y="427" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-432-132-26-0)" font-size="12px"><text x="26.5" y="444.5">Ctrl+X / C</text></g><rect x="21" y="459" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-464-132-26-0)" font-size="12px"><text x="26.5" y="476.5">Ctrl+V</text></g><rect x="21" y="491.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-497-132-26-0)" font-size="12px"><text x="26.5" y="509">Ctrl+G</text></g><rect x="21" y="524" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-529-132-26-0)" font-size="12px"><text x="26.5" y="541.5">Ctrl+Shift+U</text></g><rect x="21" y="556" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-561-132-26-0)" font-size="12px"><text x="26.5" y="573.5">Ctrl+L / Alt+Shift+L</text></g><rect x="21" y="588" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-593-132-26-0)" font-size="12px"><text x="26.5" y="605.5">Ctrl+Enter / D</text></g><rect x="21" y="620.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-626-132-26-0)" font-size="12px"><text x="26.5" y="638">Backspace or Delete</text></g><rect x="21" y="653" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-658-132-26-0)" font-size="12px"><text x="26.5" y="670.5">Ctrl / Shift+Delete</text></g><rect x="21" y="685" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-690-132-26-0)" font-size="12px"><text x="26.5" y="702.5">Ctrl+R</text></g><rect x="21" y="717" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-722-132-26-0)" font-size="12px"><text x="26.5" y="734.5">Shift+Resize</text></g><rect x="21" y="749.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-755-132-26-0)" font-size="12px"><text x="26.5" y="767">Ctrl+Resize</text></g><rect x="21" y="782" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-787-132-26-0)" font-size="12px"><text x="26.5" y="799.5">Ctrl+Home</text></g><rect x="21" y="814" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-819-132-26-0)" font-size="12px"><text x="26.5" y="831.5">Ctrl+End</text></g><rect x="21" y="846" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-851-132-26-0)" font-size="12px"><text x="26.5" y="863.5">Ctrl+Shift+Home</text></g><rect x="21" y="878.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-884-132-26-0)" font-size="12px"><text x="26.5" y="896">Ctrl+Shift+End</text></g><rect x="21" y="911" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-916-132-26-0)" font-size="12px"><text x="26.5" y="928.5">Ctrl+Shift+F / B</text></g><rect x="21" y="943" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-948-132-26-0)" font-size="12px"><text x="26.5" y="960.5">Ctrl+F</text></g><rect x="21" y="975.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-981-132-26-0)" font-size="12px"><text x="26.5" y="993">Alt+Shift+C / T</text></g><rect x="21" y="1008" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1013-132-26-0)" font-size="12px"><text x="26.5" y="1025.5">Ctrl+Shift+Y</text></g><rect x="21" y="1040" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-25-1045-132-26-0)" font-size="12px"><text x="26.5" y="1057.5">Ctrl / Shift+Drag</text></g><rect x="161" y="427" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-432-142-26-0)" font-size="12px"><text x="166.5" y="444.5">Cut / Copy</text></g><rect x="161" y="459" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-464-142-26-0)" font-size="12px"><text x="166.5" y="476.5">Paste</text></g><rect x="161" y="491.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-497-142-26-0)" font-size="12px"><text x="166.5" y="509">Group</text></g><rect x="161" y="524" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-529-142-26-0)" font-size="12px"><text x="166.5" y="541.5">Ungroup</text></g><rect x="161" y="556" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-561-142-26-0)" font-size="12px"><text x="166.5" y="573.5">Lock/Unlock / Edit link</text></g><rect x="161" y="588" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-593-142-26-0)" font-size="12px"><text x="166.5" y="605.5">Duplicate</text></g><rect x="161" y="620.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-626-142-26-0)" font-size="12px"><text x="166.5" y="638">Delete selected cells</text></g><rect x="161" y="653" width="187" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-658-179-26-0)" font-size="12px"><text x="166.5" y="670.5">...with connections / labels</text></g><rect x="161" y="685" width="159" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-690-151-26-0)" font-size="12px"><text x="166.5" y="702.5">Turn / Rotate 90° clockwise</text></g><rect x="161" y="717" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-722-142-26-0)" font-size="12px"><text x="166.5" y="734.5">Maintain proportions</text></g><rect x="161" y="911" width="181" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-916-173-26-0)" font-size="12px"><text x="166.5" y="928.5">Bring to front / Send to back</text></g><rect x="161" y="782" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-787-142-26-0)" font-size="12px"><text x="166.5" y="799.5">Collapse container</text></g><rect x="161" y="814" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-819-142-26-0)" font-size="12px"><text x="166.5" y="831.5">Expand container</text></g><rect x="161" y="846" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-851-142-26-0)" font-size="12px"><text x="166.5" y="863.5">Exit group</text></g><rect x="161" y="878.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-884-142-26-0)" font-size="12px"><text x="166.5" y="896">Enter group</text></g><rect x="161" y="943" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-948-142-26-0)" font-size="12px"><text x="166.5" y="960.5">Find/Replace</text></g><rect x="161" y="749.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-755-142-26-0)" font-size="12px"><text x="166.5" y="767">Centered resize</text></g><rect x="161" y="976" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-981-168-26-0)" font-size="12px"><text x="166.5" y="993.5">Clear waypoints / Edit tooltip</text></g><rect x="161" y="1008" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1013-142-26-0)" font-size="12px"><text x="166.5" y="1025.5">Autosize</text></g><rect x="161" y="1040" width="156" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1045-148-26-0)" font-size="12px"><text x="166.5" y="1057.5">Clone / Swap / Constrain</text></g><rect x="481" y="13.25" width="456" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#777777" font-family="Helvetica" clip-path="url(#mx-clip-485-18-448-26-0)" font-size="18px"><text x="486.5" y="36.75">Cmd instead of Ctrl, Option instead of Alt for macOS </text></g><rect x="1087" y="812" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="844" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1101" y="814" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-819-92-26-0)" font-size="12px"><text x="1106.5" y="831.5">Alt+Shift+X / B</text></g><rect x="1101" y="846.5" width="100" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-1105-852-92-26-0)" font-size="12px"><text x="1106.5" y="864">Alt+Shift+V / E</text></g><rect x="1211" y="814" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-819-112-26-0)" font-size="12px"><text x="1216.5" y="831.5">Copy size / data</text></g><rect x="1212" y="846.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1216-852-112-26-0)" font-size="12px"><text x="1217.5" y="864">Paste size / data</text></g><image x="386.49" y="956.5" width="26" height="18" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjZweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNiAxOCI+PHBhdGggZD0ibSAxIDYgTCAxNCA2IEwgMTQgMSBMIDI2IDkgTCAxNCAxOCBMIDE0IDEyIEwgMSAxMiB6IiBzdHJva2U9IiNmZmYiIGZpbGw9IiMyOWI2ZjIiLz48L3N2Zz4=" preserveAspectRatio="none"/><path d="M 42 45.62 C 42 46.18 41.4 46.69 40.97 46.69 L 7.93 46.69 C 7.47 46.69 7 46.18 7 45.76 L 7 12.9 C 7 12.28 7.33 11.75 8.02 11.75 L 41.17 11.78 C 41.67 11.78 41.99 12.23 42 12.82 Z" fill="#f08707" stroke="none" pointer-events="all"/><path d="M 19.94 46.69 L 14.54 38.6 L 27.06 19.97 L 28.5 19.71 L 42 33.48 L 42 45.66 C 42 46.1 41.44 46.75 41 46.69 Z" fill="#db6112" stroke="none" pointer-events="all"/><path d="M 15.13 38.69 C 14.28 38.69 13.88 37.99 13.88 37.42 L 13.88 32.83 C 13.88 32.28 14.3 31.6 14.89 31.6 L 18.5 31.6 L 21.72 26.27 L 21.29 26.27 C 21.04 26.27 20.27 25.77 20.27 25.24 L 20.27 20.34 C 20.27 19.79 20.96 19.09 21.48 19.09 L 27.31 19.09 C 27.84 19.09 28.7 19.39 28.7 20.39 L 28.7 25.1 C 28.7 25.65 28.21 26.27 27.7 26.27 L 27.28 26.27 L 30.51 31.6 L 33.95 31.6 C 34.76 31.6 35.16 32.05 35.16 32.71 L 35.16 37.42 C 35.16 38.14 34.54 38.69 33.93 38.69 L 28.14 38.69 C 27.4 38.69 26.76 38.21 26.76 37.48 L 26.76 32.53 C 26.84 32.03 27.31 31.6 27.87 31.6 L 28.96 31.6 L 25.86 26.27 L 23.19 26.27 L 20.1 31.6 L 21.29 31.6 C 21.81 31.6 22.26 32.1 22.26 32.69 L 22.26 37.71 C 22.26 38.12 21.78 38.69 21.23 38.69 Z" fill="#ffffff" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 29px; margin-left: 48px;"><div data-drawio-colors="color: #1A5BA3; " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(26, 91, 163); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: nowrap;"><font style="font-size: 20px">diagrams.<font style="font-size: 20px" color="#f08707">net</font></font></div></div></div></foreignObject><text x="48" y="34" fill="#1A5BA3" font-family="Helvetica" font-size="15px" font-weight="bold">diagr...</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg> \ No newline at end of file
diff --git a/src/main/webapp/teams.html b/src/main/webapp/teams.html
index 2c8533b4..1ccef438 100644
--- a/src/main/webapp/teams.html
+++ b/src/main/webapp/teams.html
@@ -379,8 +379,8 @@
padding-top:0px;
}
.geEditor *:not(.geScrollable)::-webkit-scrollbar {
- width:14px;
- height:14px;
+ width:10px;
+ height:10px;
}
.geEditor ::-webkit-scrollbar-track {
background-clip:padding-box;